mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Misc] (FramebufferState): Rename some functions.
This commit is contained in:
@@ -397,11 +397,11 @@ void UpdateProgramUniformMatrix##suffix##Vector(GLint location, GLsizei count, G
|
|||||||
|
|
||||||
GLenum MG_State::AttachTexture2DToFramebuffer(GLenum target, GLenum attachment, GLenum textarget,
|
GLenum MG_State::AttachTexture2DToFramebuffer(GLenum target, GLenum attachment, GLenum textarget,
|
||||||
GLuint texture, GLint level) {
|
GLuint texture, GLint level) {
|
||||||
return MG_State_T::framebufferState->glAttachTexture2D(target, attachment, textarget,
|
return MG_State_T::framebufferState->AttachTexture2D(target, attachment, textarget,
|
||||||
texture, level);
|
texture, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLenum MG_State::ValidateFramebufferCompleteness(GLenum target) {
|
GLenum MG_State::ValidateFramebufferCompleteness(GLenum target) {
|
||||||
return MG_State_T::framebufferState->glValidateCompleteness(target);
|
return MG_State_T::framebufferState->ValidateCompleteness(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,8 +55,8 @@ GLenum FramebufferState::Bind(GLenum target, GLuint framebuffer) {
|
|||||||
return GL_NO_ERROR;
|
return GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLenum FramebufferState::glAttachTexture2D(GLenum target, GLenum attachment,
|
GLenum FramebufferState::AttachTexture2D(GLenum target, GLenum attachment,
|
||||||
GLenum textarget, GLuint texture, GLint level) {
|
GLenum textarget, GLuint texture, GLint level) {
|
||||||
if (MG_Constants::Framebuffer::VALID_ATTACHMENTS.find(attachment) == MG_Constants::Framebuffer::VALID_ATTACHMENTS.end() ||
|
if (MG_Constants::Framebuffer::VALID_ATTACHMENTS.find(attachment) == MG_Constants::Framebuffer::VALID_ATTACHMENTS.end() ||
|
||||||
MG_Constants::Texture::VALID_TARGETS.find(textarget) == MG_Constants::Texture::VALID_TARGETS.end())
|
MG_Constants::Texture::VALID_TARGETS.find(textarget) == MG_Constants::Texture::VALID_TARGETS.end())
|
||||||
return GL_INVALID_ENUM;
|
return GL_INVALID_ENUM;
|
||||||
@@ -84,7 +84,7 @@ GLenum FramebufferState::glAttachTexture2D(GLenum target, GLenum attachment,
|
|||||||
return GL_NO_ERROR;
|
return GL_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLenum FramebufferState::glValidateCompleteness(GLenum target) {
|
GLenum FramebufferState::ValidateCompleteness(GLenum target) {
|
||||||
if (target == GL_FRAMEBUFFER) target = GL_DRAW_FRAMEBUFFER;
|
if (target == GL_FRAMEBUFFER) target = GL_DRAW_FRAMEBUFFER;
|
||||||
FramebufferObject* fbo = GetCurrentFBO(target);
|
FramebufferObject* fbo = GetCurrentFBO(target);
|
||||||
if (!fbo) return GL_INVALID_OPERATION;
|
if (!fbo) return GL_INVALID_OPERATION;
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ public:
|
|||||||
GLenum CreateN(GLsizei n, GLuint* framebuffers);
|
GLenum CreateN(GLsizei n, GLuint* framebuffers);
|
||||||
GLenum Delete(GLuint framebuffer);
|
GLenum Delete(GLuint framebuffer);
|
||||||
GLenum Bind(GLenum target, GLuint framebuffer);
|
GLenum Bind(GLenum target, GLuint framebuffer);
|
||||||
GLenum glAttachTexture2D(GLenum target, GLenum attachment,
|
GLenum AttachTexture2D(GLenum target, GLenum attachment,
|
||||||
GLenum textarget, GLuint texture, GLint level);
|
GLenum textarget, GLuint texture, GLint level);
|
||||||
GLenum glValidateCompleteness(GLenum target);
|
GLenum ValidateCompleteness(GLenum target);
|
||||||
FramebufferObject* GetCurrentFBO(GLenum target);
|
FramebufferObject* GetCurrentFBO(GLenum target);
|
||||||
|
|
||||||
std::unordered_map<GLenum, GLuint> currentBindings_; // READ/DRAW/FRAMEBUFFER
|
std::unordered_map<GLenum, GLuint> currentBindings_; // READ/DRAW/FRAMEBUFFER
|
||||||
|
|||||||
Reference in New Issue
Block a user