Revert "a bunch of junk, merging 'shitty' branch"

This reverts commit c68cbfa37b.
This commit is contained in:
BZLZHH
2025-05-17 11:13:31 +08:00
parent 9297542dcf
commit 3b1ab8d9d9
14 changed files with 10 additions and 797 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ public:
void Delete(GLuint buffer);
GLuint GetCurrentBinding(GLenum target) const;
public: // TODO
private:
std::unordered_map<GLuint, BufferObject> buffers_;
std::set<GLuint> freeIds_;
GLuint lastId_ = 0;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "../../../Includes.h"
class CommonState {
public: // TODO
private:
// Pixel storage parameters
std::unordered_map<GLenum, GLint> pixelStoreParams;
@@ -35,7 +35,7 @@ public:
GLenum glValidateCompleteness(GLenum target);
FramebufferObject* GetCurrentFBO(GLenum target);
public: // TODO
private:
std::unordered_map<GLuint, FramebufferObject> framebuffers_;
std::unordered_map<GLenum, GLuint> currentBindings_; // READ/DRAW/FRAMEBUFFER
std::set<GLuint> freeIds_;
+1 -1
View File
@@ -47,7 +47,7 @@ struct ProgramObject {
};
class ProgramState {
public: // TODO
private:
std::unordered_map<GLuint, ShaderObject> shaders_;
std::unordered_map<GLuint, ProgramObject> programs_;
std::set<GLuint> freeShaderIds_;
+1 -1
View File
@@ -54,7 +54,7 @@ public:
};
class TextureState {
public: // TODO
private:
std::vector<TextureUnitState> textureUnits_;
GLuint activeTextureUnit_ = 0;
@@ -19,7 +19,7 @@ GLenum VertexArrayState::Create(GLuint* array) {
}
*array = id;
// vaos_[id].generated = true;
vaos_[id].generated = true;
return GL_NO_ERROR;
}
@@ -41,9 +41,8 @@ GLenum VertexArrayState::CreateN(GLsizei n, GLuint* arrays) {
}
GLenum VertexArrayState::Bind(GLuint array) {
if (array != 0 && vaos_.find(array) == vaos_.end()) return GL_INVALID_OPERATION;
if (array != 0 && !vaos_.count(array)) return GL_INVALID_OPERATION;
currentVao_ = array;
GetCurrentVAO()->generated = true;
return GL_NO_ERROR;
}
@@ -43,7 +43,7 @@ public:
GLuint GetBoundElementBuffer();
VertexArrayObject* GetCurrentVAO();
public: // TODO
private:
std::unordered_map<GLuint, VertexArrayObject> vaos_;
std::set<GLuint> freeIds_;
GLuint lastId_ = 0;