[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48297] branches/soc-2012-swiss_cheese/ source/gameengine/GamePlayer/ghost/GPG_ghost.cpp: Fixing the Blenderplayer for matrix stack and GPU_compatibility changes.
Mitchell Stokes
mogurijin at gmail.com
Tue Jun 26 06:40:52 CEST 2012
Revision: 48297
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48297
Author: moguri
Date: 2012-06-26 04:40:43 +0000 (Tue, 26 Jun 2012)
Log Message:
-----------
Fixing the Blenderplayer for matrix stack and GPU_compatibility changes.
Modified Paths:
--------------
branches/soc-2012-swiss_cheese/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
Modified: branches/soc-2012-swiss_cheese/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- branches/soc-2012-swiss_cheese/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2012-06-26 01:22:05 UTC (rev 48296)
+++ branches/soc-2012-swiss_cheese/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2012-06-26 04:40:43 UTC (rev 48297)
@@ -86,6 +86,8 @@
#endif // __cplusplus
#include "GPU_draw.h"
+#include "GPU_compatibility.h"
+#include "GPU_matrix.h"
/**********************************
* End Blender include block
@@ -757,6 +759,15 @@
}
GPU_set_anisotropic(U.anisotropic_filter);
+ GPU_ms_init();
+
+ GPUimmediate *immediate = gpuNewImmediate();
+ gpuImmediateMakeCurrent(immediate);
+ gpuImmediateMaxVertexCount(500000); // XXX: temporary!
+
+ GPUindex *gindex = gpuNewIndex();
+ gpuImmediateIndex(gindex);
+ gpuImmediateMaxIndexCount(500000); // XXX: temporary!
// Create the system
if (GHOST_ISystem::createSystem() == GHOST_kSuccess)
@@ -1058,6 +1069,13 @@
error = true;
printf("error: couldn't create a system.\n");
}
+
+ gpuDeleteIndex(gindex);
+ gpuImmediateIndex(NULL);
+
+ gpuImmediateMakeCurrent(NULL);
+ gpuDeleteImmediate(immediate);
+ GPU_ms_exit();
}
// Cleanup
More information about the Bf-blender-cvs
mailing list