diff --git a/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.cpp b/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.cpp index a7b02a0b..550a9892 100644 --- a/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.cpp +++ b/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.cpp @@ -234,7 +234,7 @@ namespace MobileGL { MG_State::pGLContext->RecordError( ErrorCode::InvalidEnum, MakeShared("MG_Impl/GLImpl", __func__, - std::format("bufs[{}] = %s is not an accepted value.", i, + std::format("bufs[{}] = {} is not an accepted value.", i, MG_Util::ConvertGLEnumToString(bufs[i])))); return; } @@ -294,6 +294,15 @@ namespace MobileGL { } } + void DrawBuffer_State(GLenum buf) { + if (buf == GL_NONE) { + DrawBuffers_State(0, nullptr); + } else { + static GLenum bufs[] = {buf}; + DrawBuffers_State(1, bufs); + } + } + void DeleteRenderbuffers_State(GLsizei n, const GLuint* renderbuffers) { if (n < 0) { MG_State::pGLContext->RecordError( @@ -449,7 +458,7 @@ namespace MobileGL { ErrorCode::InvalidEnum, MakeShared( "MG_Impl/GLImpl", "GetRenderbufferParameteriv_State", - std::format("pname %s is not an accepted value.", MG_Util::ConvertGLEnumToString(pname)))); + std::format("pname {} is not an accepted value.", MG_Util::ConvertGLEnumToString(pname)))); return; } } @@ -557,6 +566,10 @@ namespace MobileGL { FramebufferRenderbuffer_State(target, attachment, renderbuffertarget, renderbuffer); } + void DrawBuffer(GLenum buf) { + DrawBuffer_State(buf); + } + void DrawBuffers(GLsizei n, const GLenum* bufs) { DrawBuffers_State(n, bufs); } diff --git a/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.h b/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.h index ce319da0..74945b28 100644 --- a/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.h +++ b/MobileGL/MG_Impl/GLImpl/Framebuffer/GL_Framebuffer.h @@ -43,6 +43,7 @@ namespace MobileGL { void FramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); void FramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level); void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); + void DrawBuffer(GLenum buf); void DrawBuffers(GLsizei n, const GLenum* bufs); void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers); void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers);