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_OpenGLRasterizer.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_OpenGLRasterizer.cpp')
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index b7f375e770c..647fb21988a 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -68,7 +68,7 @@ RAS_OpenGLRasterizer::~RAS_OpenGLRasterizer()
-void Myinit_gl_stuff(void)
+static void Myinit_gl_stuff(void)
{
float mat_specular[] = { 0.5, 0.5, 0.5, 1.0 };
float mat_shininess[] = { 35.0 };
@@ -259,7 +259,7 @@ void RAS_OpenGLRasterizer::Exit()
glClearDepth(1.0);
glClearColor(m_redback, m_greenback, m_blueback, m_alphaback);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glDepthMask (GL_TRUE);
+ glDepthMask (GL_TRUE);
glDepthFunc(GL_LEQUAL);
glBlendFunc(GL_ONE, GL_ZERO);
@@ -292,7 +292,7 @@ bool RAS_OpenGLRasterizer::BeginFrame(int drawingmode, double time)
glShadeModel(GL_SMOOTH);
- m_2DCanvas->BeginFrame();
+ m_2DCanvas->BeginFrame();
return true;
}
@@ -1083,7 +1083,8 @@ MT_Matrix4x4 RAS_OpenGLRasterizer::GetFrustumMatrix(
float bottom,
float top,
float frustnear,
- float frustfar
+ float frustfar,
+ bool perspective
){
MT_Matrix4x4 result;
double mat[16];
@@ -1110,10 +1111,11 @@ MT_Matrix4x4 RAS_OpenGLRasterizer::GetFrustumMatrix(
}
// leave bottom, top, bottom and top untouched
}
-
+
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(left, right, bottom, top, frustnear, frustfar);
+
glGetDoublev(GL_PROJECTION_MATRIX, mat);
result.setValue(mat);