diff options
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 28 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/Makefile | 3 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/SConscript | 4 |
3 files changed, 24 insertions, 11 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index dcc70db9eed..0fd1812cb3c 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -57,6 +57,7 @@ #include <iostream> #include <MT_assert.h> +#include <stdlib.h> /********************************** * Begin Blender include block @@ -509,20 +510,25 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool useVertexArrays = SYS_GetCommandLineInt(syshandle,"vertexarrays",1) != 0; bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", G.fileflags & G_FILE_DIAPLAY_LISTS) != 0); -#ifdef GL_ARB_multitexture - int gameflag =(G.fileflags & G_FILE_GAME_MAT); - // ---------------------------------- - if(bgl::RAS_EXT_support._ARB_multitexture && bgl::QueryVersion(1, 1)) { - m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", gameflag) != 0); - int unitmax=0; - glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&unitmax); - bgl::max_texture_units = MAXTEX>unitmax?unitmax:MAXTEX; - //std::cout << "using(" << bgl::max_texture_units << ") of(" << unitmax << ") texture units." << std::endl; + +#if defined(GL_ARB_multitexture) && defined(WITH_GLEXT) + if (!getenv("WITHOUT_GLEXT")) { + int gameflag =(G.fileflags & G_FILE_GAME_MAT); + + if(bgl::RAS_EXT_support._ARB_multitexture && bgl::QueryVersion(1, 1)) { + m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", gameflag) != 0); + int unitmax=0; + glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&unitmax); + bgl::max_texture_units = MAXTEX>unitmax?unitmax:MAXTEX; + //std::cout << "using(" << bgl::max_texture_units << ") of(" << unitmax << ") texture units." << std::endl; + } else { + bgl::max_texture_units = 0; + } } else { - bgl::max_texture_units = 0; + m_blendermat=0; } #else - m_blendermat=0; + m_blendermat=0; #endif//GL_ARB_multitexture // ---------------------------------- diff --git a/source/gameengine/GamePlayer/ghost/Makefile b/source/gameengine/GamePlayer/ghost/Makefile index 857b274cbae..3c32079c652 100644 --- a/source/gameengine/GamePlayer/ghost/Makefile +++ b/source/gameengine/GamePlayer/ghost/Makefile @@ -80,4 +80,7 @@ CPPFLAGS += -I$(NAN_STRING)/include CPPFLAGS += -I$(NAN_GHOST)/include CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) +ifeq ($(WITH_BF_GLEXT),true) + CPPFLAGS += -DWITH_GLEXT +endif diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript index f76e926e6d4..cc2d7de8002 100644 --- a/source/gameengine/GamePlayer/ghost/SConscript +++ b/source/gameengine/GamePlayer/ghost/SConscript @@ -46,4 +46,8 @@ cflags = [] if env['OURPLATFORM']=='win32-vc': cflags = ['/GR'] +if env['WITH_BF_GLEXT'] == 1: + env['CPPFLAGS'].append('-DWITH_GLEXT') + + env.BlenderLib (libname='gp_ghost', sources=source_files, includes = incs, defines = [], libtype='player',priority=0, compileflags=cflags) |