gameplayer will use blender materials automatically
authorErwin Coumans <blender@erwincoumans.com>
Mon, 13 Feb 2006 03:37:00 +0000 (03:37 +0000)
committerErwin Coumans <blender@erwincoumans.com>
Mon, 13 Feb 2006 03:37:00 +0000 (03:37 +0000)
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

index 2ab98750881f0d241b85041ac2baa4838aa44d4f..8de9e5784fedb0c66e270e5db189969f971fe382 100644 (file)
@@ -494,11 +494,12 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
                bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0);
                bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
                bool useVertexArrays = SYS_GetCommandLineInt(syshandle,"vertexarrays",1) != 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", 0) != 0);
+                       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;
index 5b67f8b8029b940307703ac52e10f4ea9caf7ad6..79a5171eec5bec64f517662789dac91505cf7d1e 100644 (file)
@@ -59,7 +59,7 @@
 extern "C"
 {
 #endif  // __cplusplus
-       
+#include "BKE_global.h"        
 #include "BLI_blenlib.h"
 #include "DNA_scene_types.h"
 #include "BLO_readfile.h"
@@ -605,7 +605,7 @@ int main(int argc, char** argv)
 #ifdef NDEBUG
                                                if (closeConsole)
                                                {
-                                                       ::FreeConsole();    // Close a console window
+                                                       //::FreeConsole();    // Close a console window
                                                }
 #endif // NDEBUG
 #endif // WIN32
@@ -613,7 +613,8 @@ int main(int argc, char** argv)
                                                Scene *scene = bfd->curscene;
                                                strcpy (pathname, maggie->name);
                                                char *startscenename = scene->id.name + 2;
-                                               
+                                               G.fileflags  = bfd->fileflags;
+
                                                titlename = maggie->name;
                                                
                                                // Check whether the game should be displayed full-screen