OPENGL: Fix building the SDL backend with USE_GLES2
This commit is contained in:
parent
b5dcf5d4bc
commit
22006859f9
1 changed files with 9 additions and 10 deletions
|
@ -24,9 +24,7 @@
|
|||
|
||||
#if defined(USE_OPENGL) && !defined(AMIGAOS)
|
||||
|
||||
#ifdef USE_OPENGL_SHADERS
|
||||
#include "graphics/opengl/framebuffer.h"
|
||||
#elif defined(SDL_BACKEND)
|
||||
#if defined(SDL_BACKEND) && !defined(USE_GLEW) && !defined(USE_GLES2)
|
||||
#define GL_GLEXT_PROTOTYPES // For the GL_EXT_framebuffer_object extension
|
||||
#include "graphics/opengl/framebuffer.h"
|
||||
#ifndef GL_ARB_framebuffer_object
|
||||
|
@ -40,7 +38,9 @@
|
|||
#define GL_DEPTH24_STENCIL8 0x88F0
|
||||
#endif
|
||||
#include "backends/platform/sdl/sdl-sys.h"
|
||||
#endif // defined(SDL_BACKEND)
|
||||
#else
|
||||
#include "graphics/opengl/framebuffer.h"
|
||||
#endif
|
||||
|
||||
#include "graphics/opengl/context.h"
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
namespace OpenGL {
|
||||
|
||||
#if defined(SDL_BACKEND) && !defined(USE_GLEW)
|
||||
#if defined(SDL_BACKEND) && !defined(USE_GLEW) && !defined(USE_GLES2)
|
||||
static bool framebuffer_object_functions = false;
|
||||
static PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebuffer;
|
||||
static PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbuffer;
|
||||
|
@ -96,7 +96,7 @@ static void grabFramebufferObjectPointers() {
|
|||
u.obj_ptr = SDL_GL_GetProcAddress("glRenderbufferStorage");
|
||||
glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEEXTPROC)u.func_ptr;
|
||||
}
|
||||
#endif // defined(SDL_BACKEND) && !defined(USE_OPENGL_SHADERS)
|
||||
#endif // defined(SDL_BACKEND) && !defined(USE_GLES2)
|
||||
|
||||
|
||||
|
||||
|
@ -106,12 +106,11 @@ static bool usePackedBuffer() {
|
|||
|
||||
FrameBuffer::FrameBuffer(uint width, uint height) :
|
||||
Texture(width, height) {
|
||||
#ifdef SDL_BACKEND
|
||||
if (!OpenGLContext.framebufferObjectSupported) {
|
||||
error("GL_EXT_framebuffer_object extension is not supported!");
|
||||
error("FrameBuffer Objects are not supported by the current OpenGL context");
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_BACKEND) && !defined(USE_GLEW)
|
||||
|
||||
#if defined(SDL_BACKEND) && !defined(USE_GLEW) && !defined(USE_GLES2)
|
||||
grabFramebufferObjectPointers();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue