diff --git a/filament/backend/src/opengl/OpenGLDriver.cpp b/filament/backend/src/opengl/OpenGLDriver.cpp index 27e6b501d6..b0c625853b 100644 --- a/filament/backend/src/opengl/OpenGLDriver.cpp +++ b/filament/backend/src/opengl/OpenGLDriver.cpp @@ -823,7 +823,7 @@ void OpenGLDriver::framebufferTexture(backend::TargetBufferInfo const& binfo, } CHECK_GL_ERROR(utils::slog.e) } else -#if GLES30_HEADERS +#ifdef GL_EXT_multisampled_render_to_texture if (gl.ext.EXT_multisampled_render_to_texture && t->depth <= 1) { assert(rt->gl.samples > 1); // We have a multi-sample rendertarget and we have EXT_multisampled_render_to_texture, diff --git a/filament/backend/src/opengl/gl_headers.h b/filament/backend/src/opengl/gl_headers.h index 16fb13aa35..7eef4038b8 100644 --- a/filament/backend/src/opengl/gl_headers.h +++ b/filament/backend/src/opengl/gl_headers.h @@ -40,7 +40,7 @@ extern PFNGLPUSHGROUPMARKEREXTPROC glPushGroupMarkerEXT; extern PFNGLPOPGROUPMARKEREXTPROC glPopGroupMarkerEXT; #endif -#if GL_EXT_multisampled_render_to_texture +#ifdef GL_EXT_multisampled_render_to_texture extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisampleEXT; extern PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC glFramebufferTexture2DMultisampleEXT; #endif @@ -83,11 +83,16 @@ #include /* The iOS SDK only provides OpenGL ES headers up to 3.0. Filament works with OpenGL 3.0, but - * requires the following 3.1 define in order to compile. */ + * requires the following 3.1 declarations in order to compile. */ #define GL_TEXTURE_2D_MULTISAMPLE 0x9100 #define GL_TIME_ELAPSED 0x88BF +#ifdef GL_EXT_multisampled_render_to_texture + extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisampleEXT; + extern PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC glFramebufferTexture2DMultisampleEXT; +#endif + #else #include #endif