Better fix iOS lack of GL_EXT_multisampled_render_to_texture

This commit is contained in:
Pixelflinger
2020-05-20 22:44:53 -07:00
committed by Mathias Agopian
parent 7dfe26def8
commit 3a3cd1c0ec
2 changed files with 8 additions and 3 deletions

View File

@@ -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,

View File

@@ -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 <OpenGLES/ES3/glext.h>
/* 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 <bluegl/BlueGL.h>
#endif