gameplayer will use blender materials automatically

This commit is contained in:
Erwin Coumans 2006-02-13 03:37:00 +00:00
parent 4c966a3141
commit 6c325d74f5
2 changed files with 7 additions and 5 deletions

@ -496,9 +496,10 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
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;

@ -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,6 +613,7 @@ 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;