[GL] Fix HTML5 builds.

Safer guards for debug functions.
GL_FRAMEBUFFER_INCOMPLETE_* functions seem to be OpenGL 4.
This commit is contained in:
Fabio Alessandrelli 2022-05-11 00:12:37 +02:00
parent 9bdb853eec
commit d2bb5b88cc
2 changed files with 2 additions and 2 deletions

View file

@ -302,7 +302,7 @@ inline void RasterizerStorageGLES3::buffer_orphan_and_upload(unsigned int p_buff
}
inline String RasterizerStorageGLES3::get_framebuffer_error(GLenum p_status) {
#ifdef DEBUG_ENABLED
#if defined(DEBUG_ENABLED) && defined(GLES_OVER_GL)
if (p_status == GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) {
return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
} else if (p_status == GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT) {

View file

@ -574,7 +574,7 @@ public:
};
inline String TextureStorage::get_framebuffer_error(GLenum p_status) {
#ifdef DEBUG_ENABLED
#if defined(DEBUG_ENABLED) && defined(GLES_OVER_GL)
if (p_status == GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) {
return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
} else if (p_status == GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT) {