mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-03 18:14:01 +00:00
Merge pull request #73 from dimag0g/experimental
Compatibility with non-standard build environments
This commit is contained in:
commit
b3b3d98f79
4 changed files with 10 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
#/*
|
||||
/*
|
||||
Copyright (C) 2007, 2010 - Bit-Blot
|
||||
|
||||
This file is part of Aquaria.
|
||||
|
@ -42,6 +42,8 @@ extern "C"
|
|||
|
||||
#include "../BBGE/MathFunctions.h"
|
||||
|
||||
#undef quad // avoid conflict with quad precision types
|
||||
|
||||
// Define this to 1 to check types of pointers passed to functions,
|
||||
// and warn if a type mismatch is detected. In this case,
|
||||
// the pointer is treated as NULL, to avoid crashing or undefined behavior.
|
||||
|
|
|
@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "Base.h"
|
||||
#include "Core.h"
|
||||
#include <algorithm>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef BBGE_BUILD_WINDOWS
|
||||
#include <shellapi.h>
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
//WARNING: FrameBuffer objects have to have reloadDevice/unloadDevice called manually!
|
||||
|
||||
#ifdef BBGE_BUILD_FRAMEBUFFER
|
||||
#if defined(BBGE_BUILD_FRAMEBUFFER) && defined(BBGE_BUILD_OPENGL_DYNAMIC)
|
||||
PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT = NULL;
|
||||
PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT = NULL;
|
||||
PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT = NULL;
|
||||
|
@ -131,6 +131,7 @@ bool FrameBuffer::init(int width, int height, bool fitToScreen, GLint filter)
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined(BBGE_BUILD_OPENGL_DYNAMIC)
|
||||
if (!glIsRenderbufferEXT)
|
||||
{
|
||||
glIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC)SDL_GL_GetProcAddress("glIsRenderbufferEXT");
|
||||
|
@ -162,6 +163,7 @@ bool FrameBuffer::init(int width, int height, bool fitToScreen, GLint filter)
|
|||
debugLog("One or more EXT_framebuffer_object functions were not found");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// Create a frame-buffer object and a render-buffer object...
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "Shader.h"
|
||||
#include "algorithmx.h"
|
||||
|
||||
#ifdef BBGE_BUILD_SHADERS
|
||||
#if defined(BBGE_BUILD_SHADERS) && defined(BBGE_BUILD_OPENGL_DYNAMIC)
|
||||
// GL_ARB_shader_objects
|
||||
PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL;
|
||||
PFNGLDELETEOBJECTARBPROC glDeleteObjectARB = NULL;
|
||||
|
@ -77,6 +77,7 @@ void Shader::staticInit()
|
|||
}
|
||||
else
|
||||
{
|
||||
#if defined(BBGE_BUILD_OPENGL_DYNAMIC)
|
||||
glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glCreateProgramObjectARB");
|
||||
glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)SDL_GL_GetProcAddress("glDeleteObjectARB");
|
||||
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glUseProgramObjectARB");
|
||||
|
@ -110,6 +111,7 @@ void Shader::staticInit()
|
|||
goto end;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// everything fine when we are here
|
||||
_useShaders = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue