diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-15 16:40:17 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-15 16:40:17 +0400 |
commit | dc2594c81b5d67cc290f88ca846c5285ba45a412 (patch) | |
tree | 1eda1227129fa8b32f84fc48c557195d6b7ed6ef /source | |
parent | fd3a40a12969085c16927bd2b2240f9ac98d951f (diff) |
Added -d debug option for blenderplayer, and remove some
invalid/unnecessary opengl calls on shader errors.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 3 | ||||
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index d900f9c63f2..c6e9c5aeafd 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -706,7 +706,6 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, GPUSh glGetObjectParameterivARB(shader->vertex, GL_OBJECT_COMPILE_STATUS_ARB, &status); if (!status) { - glValidateProgramARB(shader->vertex); glGetInfoLogARB(shader->vertex, sizeof(log), &length, log); shader_print_errors("compile", log, vertexcode); @@ -723,7 +722,6 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, GPUSh glGetObjectParameterivARB(shader->fragment, GL_OBJECT_COMPILE_STATUS_ARB, &status); if (!status) { - glValidateProgramARB(shader->fragment); glGetInfoLogARB(shader->fragment, sizeof(log), &length, log); shader_print_errors("compile", log, fragcode); @@ -771,7 +769,6 @@ GPUShader *GPU_shader_create_lib(const char *code) glGetObjectParameterivARB(shader->lib, GL_OBJECT_COMPILE_STATUS_ARB, &status); if (!status) { - glValidateProgramARB(shader->lib); glGetInfoLogARB(shader->lib, sizeof(log), &length, log); shader_print_errors("compile", log, code); diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index c4e738c1896..8fd23318df1 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -52,6 +52,7 @@ extern "C" { #endif // __cplusplus +#include "MEM_guardedalloc.h" #include "BKE_global.h" #include "BKE_icons.h" #include "BKE_node.h" @@ -185,6 +186,7 @@ void usage(char* program) #ifdef _WIN32 printf(" -c: keep console window open\n"); #endif + printf(" -d: turn debugging on\n"); printf(" -g: game engine options:\n"); printf(" Name Default Description\n"); printf(" ----------------------------------------\n"); @@ -414,6 +416,12 @@ int main(int argc, char** argv) } } break; + + case 'd': + i++; + G.f |= G_DEBUG; /* std output printf's */ + MEM_set_memory_debug(); + break; case 'p': // Parse window position and size options |