Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-04-11 06:50:02 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-04-11 06:50:02 +0400
commitae9233a5b05ebfc925fd542afbdb3bb9220ed65c (patch)
tree46ed278ee54325ca98540163edf9ea5dd4a88c7f /source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
parentd3e88eae711e2fd5d678ed555268647e28a9fc18 (diff)
1. Check material names passed to the physics engine (for collision sensors.)
Consider: gameobj->getClientInfo()->m_auxilary_info = (matname ? (void*)(matname+2) : NULL); It works if matname is "MAblah", but not if matname is "". 2. Added constructor for struct RAS_CameraData. 3. Added initializers to the struct KX_ClientObjectInfo constructor 4. Collision sensors won't detect near sensors. 5. A stack of minor tweaks, adjusting whitespace, using ++it for stl stuff.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
index 4ce030ed484..8a51a25e6aa 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
@@ -73,10 +73,6 @@ bool RAS_VAOpenGLRasterizer::Init(void)
if (result)
{
- // if possible, add extensions to other platforms too, if this
- // rasterizer becomes messy just derive one for each platform
- // (ie. KX_Win32Rasterizer, KX_LinuxRasterizer etc.)
-
glEnableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
@@ -187,6 +183,17 @@ void RAS_VAOpenGLRasterizer::IndexPrimitives( const vecVertexArray& vertexarrays
glColor3d(0,0,0);
}
// use glDrawElements to draw each vertexarray
+ static bool doWarning = true;
+ if (vertexarrays.size() > 1 && doWarning)
+ {
+ /* TODO: if vertexarrays.size() == 1 then if we are multitexturing
+ we can glLockArraysEXT the vertex arrays - GL will be able to cache
+ the vertex transforms. */
+ std::cout << "# vertex arrays: " << vertexarrays.size() << std::endl;
+ std::cout << "I wondered if this could happen: please inform the proper authorities." << std::endl;
+ doWarning = false;
+ }
+
for (vt=0;vt<vertexarrays.size();vt++)
{
vertexarray = &((*vertexarrays[vt]) [0]);