[Misc] (All): Sync with dev-es.

This commit is contained in:
BZLZHH
2025-05-17 16:29:12 +08:00
parent 9dc9572849
commit 70cf4ad7ba
11 changed files with 156 additions and 138 deletions
@@ -17,7 +17,7 @@ struct FramebufferAttachment {
struct FramebufferObject {
bool generated = false;
std::unordered_map<GLenum, FramebufferAttachment> attachments;
ankerl::unordered_map<GLenum, FramebufferAttachment> attachments;
GLenum status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;
GLsizei width = 0;
GLsizei height = 0;
@@ -35,10 +35,10 @@ public:
GLenum ValidateCompleteness(GLenum target);
FramebufferObject* GetCurrentFBO(GLenum target);
std::unordered_map<GLenum, GLuint> currentBindings_; // READ/DRAW/FRAMEBUFFER
ankerl::unordered_map<GLenum, GLuint> currentBindings_; // READ/DRAW
private:
std::unordered_map<GLuint, FramebufferObject> framebuffers_;
ankerl::unordered_map<GLuint, FramebufferObject> framebuffers_;
std::set<GLuint> freeIds_;
GLuint lastId_ = 0;
bool ValidateHandle(GLuint framebuffer);
+6 -6
View File
@@ -41,17 +41,17 @@ struct ProgramObject {
bool dirty;
GLint linkStatus;
std::string infoLog;
std::unordered_map<std::string, GLint> attribBindings;
std::unordered_map<std::string, GLint> attribLocations;
std::unordered_map<std::string, GLint> uniformLocations;
std::unordered_map<std::string, UniformValue> uniformValues;
ankerl::unordered_map<std::string, GLint> attribBindings;
ankerl::unordered_map<std::string, GLint> attribLocations;
ankerl::unordered_map<std::string, GLint> uniformLocations;
ankerl::unordered_map<std::string, UniformValue> uniformValues;
bool markedForDeletion;
};
class ProgramState {
public:
std::unordered_map<GLuint, ShaderObject> shaders_;
std::unordered_map<GLuint, ProgramObject> programs_;
ankerl::unordered_map<GLuint, ShaderObject> shaders_;
ankerl::unordered_map<GLuint, ProgramObject> programs_;
std::set<GLuint> freeShaderIds_;
std::set<GLuint> freeProgramIds_;
GLuint lastShaderId_ = 0;
+1 -1
View File
@@ -64,7 +64,7 @@ class TextureState {
private:
GLuint lastUsedID_ = 1;
// std::unordered_set<GLuint> freeIDs_;
// ankerl::unordered_set<GLuint> freeIDs_;
std::vector<GLuint> freeID_;
unordered_map<GLenum, TextureObject> proxyTextures_;
@@ -24,7 +24,7 @@ struct VertexArrayObject {
bool attribDirty = false;
bool eboDirty = false;
GLuint elementBuffer = 0;
std::unordered_map<GLuint, VertexAttribState> attribs;
ankerl::unordered_map<GLuint, VertexAttribState> attribs;
};
class VertexArrayState {
@@ -50,7 +50,7 @@ public:
bool ValidateAllocatedHandle(GLuint array);
GLuint currentVao_ = 0;
std::unordered_map<GLuint, VertexArrayObject> vaos_;
ankerl::unordered_map<GLuint, VertexArrayObject> vaos_;
private:
std::set<GLuint> freeIds_;
GLuint lastId_ = 0;