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:
authorNick Samarin <nicks1987@bigmir.net>2011-02-16 20:07:18 +0300
committerNick Samarin <nicks1987@bigmir.net>2011-02-16 20:07:18 +0300
commitc5f6a01dd5998976addd2085470bb73a150579e5 (patch)
tree42b3345fb3ea2e7607a6d1eec379b8ce23b5ffbc /source/gameengine/Rasterizer
parent4cf62f1e7e2bb28b47f79e4bd7c1482ab742ebbd (diff)
parent9e9e028f059f29d493dc020dda965a9bea8ffd6b (diff)
synched with trunk at revision 34793
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r--source/gameengine/Rasterizer/CMakeLists.txt51
-rw-r--r--source/gameengine/Rasterizer/Makefile57
-rw-r--r--source/gameengine/Rasterizer/RAS_2DFilterManager.cpp16
-rw-r--r--source/gameengine/Rasterizer/RAS_Deformer.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp5
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_IRasterizer.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_IRenderTools.h22
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt20
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile53
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp77
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h25
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript9
-rw-r--r--source/gameengine/Rasterizer/SConscript8
15 files changed, 185 insertions, 168 deletions
diff --git a/source/gameengine/Rasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/CMakeLists.txt
index d718bf3e507..d899fc38162 100644
--- a/source/gameengine/Rasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/CMakeLists.txt
@@ -24,9 +24,7 @@
#
# ***** END GPL LICENSE BLOCK *****
-FILE(GLOB SRC *.cpp)
-
-SET(INC
+set(INC
.
../../../source/kernel/gen_system
../../../source/blender/makesdna
@@ -37,9 +35,50 @@ SET(INC
../../../extern/glew/include
../../../intern/guardedalloc
../Expressions
- ${PYTHON_INC}
+ ${PYTHON_INCLUDE_DIRS}
+)
+
+set(SRC
+ RAS_2DFilterManager.cpp
+ RAS_BucketManager.cpp
+ RAS_FramingManager.cpp
+ RAS_IPolygonMaterial.cpp
+ RAS_IRenderTools.cpp
+ RAS_MaterialBucket.cpp
+ RAS_MeshObject.cpp
+ RAS_Polygon.cpp
+ RAS_TexVert.cpp
+ RAS_texmatrix.cpp
+
+ RAS_2DFilterManager.h
+ RAS_BucketManager.h
+ RAS_CameraData.h
+ RAS_Deformer.h
+ RAS_FramingManager.h
+ RAS_ICanvas.h
+ RAS_IPolygonMaterial.h
+ RAS_IRasterizer.h
+ RAS_IRenderTools.h
+ RAS_LightObject.h
+ RAS_MaterialBucket.h
+ RAS_MeshObject.h
+ RAS_ObjectColor.h
+ RAS_Polygon.h
+ RAS_Rect.h
+ RAS_TexMatrix.h
+ RAS_TexVert.h
+ RAS_OpenGLFilters/RAS_Blur2DFilter.h
+ RAS_OpenGLFilters/RAS_Dilation2DFilter.h
+ RAS_OpenGLFilters/RAS_Erosion2DFilter.h
+ RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
+ RAS_OpenGLFilters/RAS_Invert2DFilter.h
+ RAS_OpenGLFilters/RAS_Laplacian2DFilter.h
+ RAS_OpenGLFilters/RAS_Prewitt2DFilter.h
+ RAS_OpenGLFilters/RAS_Sepia2DFilter.h
+ RAS_OpenGLFilters/RAS_Sharpen2DFilter.h
+ RAS_OpenGLFilters/RAS_Sobel2DFilter.h
)
-ADD_DEFINITIONS(-DGLEW_STATIC)
+add_definitions(-DGLEW_STATIC)
-BLENDERLIB(bf_rasterizer "${SRC}" "${INC}")
+blender_add_lib(ge_rasterizer "${SRC}" "${INC}")
diff --git a/source/gameengine/Rasterizer/Makefile b/source/gameengine/Rasterizer/Makefile
deleted file mode 100644
index d800a02b181..00000000000
--- a/source/gameengine/Rasterizer/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-#
-
-LIBNAME = rasterizer
-DIR = $(OCGDIR)/gameengine/$(LIBNAME)
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I$(NAN_GLEW)/include
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_STRING)/include
-CPPFLAGS += -I$(NAN_MOTO)/include
-CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-CPPFLAGS += -I../../kernel/gen_system
-CPPFLAGS += -I../../blender/makesdna
-CPPFLAGS += -I../SceneGraph
-CPPFLAGS += -I../BlenderRoutines
-CPPFLAGS += -I../Expressions
-CPPFLAGS += -I../Ketsji
-
-CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION)
-
-###############
-
-SOURCEDIR = source/gameengine/Rasterizer
-DIRS = RAS_OpenGLRasterizer
-
-include nan_subdirs.mk
diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
index 4527850a8e9..93d82702e90 100644
--- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
+++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
@@ -431,6 +431,8 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
glViewport(0,0, texturewidth, textureheight);
glDisable(GL_DEPTH_TEST);
+ // if the last rendered face had alpha add it would messes with the color of the plane we apply 2DFilter to
+ glDisable(GL_BLEND);
glPushMatrix(); //GL_MODELVIEW
glLoadIdentity(); // GL_MODELVIEW
glMatrixMode(GL_TEXTURE);
@@ -510,11 +512,11 @@ void RAS_2DFilterManager::EnableFilter(vector<STR_String>& propNames, void* game
return;
}
- if(mode>=RAS_2DFILTER_MOTIONBLUR && mode<=RAS_2DFILTER_INVERT)
- {
- if(m_filters[pass])
- glDeleteObjectARB(m_filters[pass]);
- m_filters[pass] = CreateShaderProgram(mode);
- m_enabled[pass] = 1;
- }
+ // We've checked all other cases, which means we must be dealing with a builtin filter
+ if(m_filters[pass])
+ glDeleteObjectARB(m_filters[pass]);
+ m_filters[pass] = CreateShaderProgram(mode);
+ m_gameObjects[pass] = NULL;
+ AnalyseShader(pass, propNames);
+ m_enabled[pass] = 1;
}
diff --git a/source/gameengine/Rasterizer/RAS_Deformer.h b/source/gameengine/Rasterizer/RAS_Deformer.h
index f61ac7ea18a..37543092e68 100644
--- a/source/gameengine/Rasterizer/RAS_Deformer.h
+++ b/source/gameengine/Rasterizer/RAS_Deformer.h
@@ -76,6 +76,10 @@ public:
{
return NULL;
}
+ virtual struct DerivedMesh* GetPhysicsMesh()
+ {
+ return NULL;
+ }
virtual class RAS_MeshObject* GetRasMesh()
{
/* m_pMesh does not seem to be being used?? */
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
index 0c81d7d8274..00f1f5f2848 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
@@ -208,6 +208,11 @@ Material *RAS_IPolyMaterial::GetBlenderMaterial() const
return NULL;
}
+Image *RAS_IPolyMaterial::GetBlenderImage() const
+{
+ return NULL;
+}
+
Scene* RAS_IPolyMaterial::GetBlenderScene() const
{
return NULL;
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
index e7bd78c2309..59554e31c36 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
@@ -45,6 +45,7 @@
class RAS_IRasterizer;
struct MTFace;
struct Material;
+struct Image;
struct Scene;
class SCA_IScene;
@@ -160,6 +161,7 @@ public:
int GetMaterialIndex() const;
virtual Material* GetBlenderMaterial() const;
+ virtual Image* GetBlenderImage() const;
virtual Scene* GetBlenderScene() const;
virtual void ReleaseMaterial();
virtual void GetMaterialRGBAColor(unsigned char *rgba) const;
diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h
index 32ba28bc395..4d23054c449 100644
--- a/source/gameengine/Rasterizer/RAS_IRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h
@@ -387,7 +387,7 @@ public:
virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)=0;
virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
- const MT_Vector3& normal, int nsector)=0;
+ const MT_Vector3& normal, int nsector)=0;
virtual void FlushDebugShapes()=0;
diff --git a/source/gameengine/Rasterizer/RAS_IRenderTools.h b/source/gameengine/Rasterizer/RAS_IRenderTools.h
index 50de4980e1d..dab28de27f4 100644
--- a/source/gameengine/Rasterizer/RAS_IRenderTools.h
+++ b/source/gameengine/Rasterizer/RAS_IRenderTools.h
@@ -99,6 +99,28 @@ public:
)=0;
/**
+ * Renders 3D text string using BFL.
+ * @param fontid The id of the font.
+ * @param text The string to render.
+ * @param size The size of the text.
+ * @param dpi The resolution of the text.
+ * @param color The color of the object.
+ * @param mat The Matrix of the text object.
+ * @param aspect A scaling factor to compensate for the size.
+ */
+ virtual
+ void
+ RenderText3D(int fontid,
+ const char* text,
+ int size,
+ int dpi,
+ float* color,
+ double* mat,
+ float aspect
+ ) = 0;
+
+
+ /**
* Renders 2D text string.
* @param mode The type of text
* @param text The string to render.
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
index cc48952dc20..d47f19eda90 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
@@ -24,9 +24,7 @@
#
# ***** END GPL LICENSE BLOCK *****
-FILE(GLOB SRC *.cpp)
-
-SET(INC
+set(INC
../../../../source/kernel/gen_system
../../../../intern/string
../../../../intern/moto/include
@@ -41,6 +39,18 @@ SET(INC
../../../../source/blender/blenloader
)
-ADD_DEFINITIONS(-DGLEW_STATIC)
+set(SRC
+ RAS_GLExtensionManager.cpp
+ RAS_ListRasterizer.cpp
+ RAS_OpenGLRasterizer.cpp
+ RAS_VAOpenGLRasterizer.cpp
+
+ RAS_GLExtensionManager.h
+ RAS_ListRasterizer.h
+ RAS_OpenGLRasterizer.h
+ RAS_VAOpenGLRasterizer.h
+)
+
+add_definitions(-DGLEW_STATIC)
-BLENDERLIB(bf_oglrasterizer "${SRC}" "${INC}")
+blender_add_lib(ge_oglrasterizer "${SRC}" "${INC}")
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
deleted file mode 100644
index 357bdf9d99b..00000000000
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# $Id$
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-# Bounce make to subdirectories.
-#
-
-LIBNAME = OpenGLrasterizer
-DIR = $(OCGDIR)/gameengine/$(LIBNAME)
-
-include nan_compile.mk
-
-CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
-
-CPPFLAGS += -I$(NAN_GLEW)/include
-CPPFLAGS += -I$(OPENGL_HEADERS)
-CPPFLAGS += -I$(NAN_STRING)/include
-CPPFLAGS += -I$(NAN_MOTO)/include
-CPPFLAGS += -I../../../kernel/gen_system
-CPPFLAGS += -I../../../blender/gpu
-CPPFLAGS += -I../../../blender/makesdna
-CPPFLAGS += -I../../../blender/blenlib
-CPPFLAGS += -I../../../blender/blenkernel
-CPPFLAGS += -I../../BlenderRoutines
-CPPFLAGS += -I../../Ketsji
-CPPFLAGS += -I../../SceneGraph
-CPPFLAGS += -I..
-CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
-
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
index 12a255b4e4e..d793a2faf7b 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp
@@ -13,7 +13,7 @@
#include "RAS_TexVert.h"
#include "MT_assert.h"
-//#ifndef NDEBUG
+//#if defined(DEBUG)
//#ifdef WIN32
//#define spit(x) std::cout << x << std::endl;
//#endif //WIN32
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index bedddb748fe..b567d8d8e2c 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -382,7 +382,7 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
continue;
glBegin(GL_LINE_LOOP);
glColor4f(m_debugShapes[i].m_color[0],m_debugShapes[i].m_color[1],m_debugShapes[i].m_color[2],1.f);
-
+
static const MT_Vector3 worldUp(0.,0.,1.);
MT_Vector3 norm = m_debugShapes[i].m_param;
MT_Matrix3x3 tr;
@@ -396,8 +396,8 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
xaxis = MT_cross(norm, worldUp);
yaxis = MT_cross(xaxis, norm);
tr.setValue(xaxis.x(), xaxis.y(), xaxis.z(),
- yaxis.x(), yaxis.y(), yaxis.z(),
- norm.x(), norm.y(), norm.z());
+ yaxis.x(), yaxis.y(), yaxis.z(),
+ norm.x(), norm.y(), norm.z());
}
MT_Scalar rad = m_debugShapes[i].m_param2.x();
int n = (int) m_debugShapes[i].m_param2.y();
@@ -413,40 +413,14 @@ void RAS_OpenGLRasterizer::FlushDebugShapes()
glEnd();
}
-
if(light) glEnable(GL_LIGHTING);
if(tex) glEnable(GL_TEXTURE_2D);
m_debugShapes.clear();
}
-void RAS_OpenGLRasterizer::DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
-{
- OglDebugShape line;
- line.m_type = OglDebugShape::LINE;
- line.m_pos= from;
- line.m_param = to;
- line.m_color = color;
- m_debugShapes.push_back(line);
-}
-
-void RAS_OpenGLRasterizer::DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
- const MT_Vector3& normal, int nsector)
-{
- OglDebugShape line;
- line.m_type = OglDebugShape::CIRCLE;
- line.m_pos= center;
- line.m_param = normal;
- line.m_color = color;
- line.m_param2.x() = radius;
- line.m_param2.y() = (float) nsector;
- m_debugShapes.push_back(line);
-}
-
void RAS_OpenGLRasterizer::EndFrame()
{
-
-
FlushDebugShapes();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@@ -799,6 +773,7 @@ static RAS_MeshSlot *current_ms;
static RAS_MeshObject *current_mesh;
static int current_blmat_nr;
static GPUVertexAttribs current_gpu_attribs;
+static Image *current_image;
static int CheckMaterialDM(int matnr, void *attribs)
{
// only draw the current material
@@ -809,6 +784,8 @@ static int CheckMaterialDM(int matnr, void *attribs)
memcpy(gattribs, &current_gpu_attribs, sizeof(GPUVertexAttribs));
return 1;
}
+
+/*
static int CheckTexfaceDM(void *mcol, int index)
{
@@ -836,6 +813,34 @@ static int CheckTexfaceDM(void *mcol, int index)
}
return 0;
}
+*/
+
+static int CheckTexDM(MTFace *tface, MCol *mcol, int matnr)
+{
+
+ // index is the original face index, retrieve the polygon
+ if (matnr == current_blmat_nr &&
+ (tface == NULL || tface->tpage == current_image)) {
+ // must handle color.
+ if (current_wireframe)
+ return 2;
+ if (current_ms->m_bObjectColor) {
+ MT_Vector4& rgba = current_ms->m_RGBAcolor;
+ glColor4d(rgba[0], rgba[1], rgba[2], rgba[3]);
+ // don't use mcol
+ return 2;
+ }
+ if (!mcol) {
+ // we have to set the color from the material
+ unsigned char rgba[4];
+ current_polymat->GetMaterialRGBAColor(rgba);
+ glColor4ubv((const GLubyte *)rgba);
+ return 2;
+ }
+ return 1;
+ }
+ return 0;
+}
void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
{
@@ -851,7 +856,14 @@ void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
current_ms = &ms;
current_mesh = ms.m_mesh;
current_wireframe = wireframe;
- MCol *mcol = (MCol*)ms.m_pDerivedMesh->getFaceDataArray(ms.m_pDerivedMesh, CD_MCOL);
+ // MCol *mcol = (MCol*)ms.m_pDerivedMesh->getFaceDataArray(ms.m_pDerivedMesh, CD_MCOL); /* UNUSED */
+
+ // handle two-side
+ if (current_polymat->GetDrawingMode() & RAS_IRasterizer::KX_TWOSIDE)
+ this->SetCullFace(false);
+ else
+ this->SetCullFace(true);
+
if (current_polymat->GetFlag() & RAS_BLENDERGLSL) {
// GetMaterialIndex return the original mface material index,
// increment by 1 to match what derived mesh is doing
@@ -868,7 +880,10 @@ void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
ms.m_pDerivedMesh->drawFacesGLSL(ms.m_pDerivedMesh, CheckMaterialDM);
GPU_set_material_blend_mode(current_blend_mode);
} else {
- ms.m_pDerivedMesh->drawMappedFacesTex(ms.m_pDerivedMesh, CheckTexfaceDM, mcol);
+ //ms.m_pDerivedMesh->drawMappedFacesTex(ms.m_pDerivedMesh, CheckTexfaceDM, mcol);
+ current_blmat_nr = current_polymat->GetMaterialIndex();
+ current_image = current_polymat->GetBlenderImage();
+ ms.m_pDerivedMesh->drawFacesTex(ms.m_pDerivedMesh, CheckTexDM);
}
return;
}
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
index e531264eaec..21f86d12cb4 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
@@ -255,10 +255,29 @@ public:
virtual void SetPolygonOffset(float mult, float add);
virtual void FlushDebugShapes();
- virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color);
- virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
- const MT_Vector3& normal, int nsector);
+ virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
+ {
+ OglDebugShape line;
+ line.m_type = OglDebugShape::LINE;
+ line.m_pos= from;
+ line.m_param = to;
+ line.m_color = color;
+ m_debugShapes.push_back(line);
+ }
+
+ virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
+ const MT_Vector3& normal, int nsector)
+ {
+ OglDebugShape line;
+ line.m_type = OglDebugShape::CIRCLE;
+ line.m_pos= center;
+ line.m_param = normal;
+ line.m_color = color;
+ line.m_param2.x() = radius;
+ line.m_param2.y() = (float) nsector;
+ m_debugShapes.push_back(line);
+ }
std::vector <OglDebugShape> m_debugShapes;
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
index 68e6789c05e..890d1efb850 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
@@ -10,4 +10,11 @@ incs += ' #source/blender/gpu #extern/glew/include ' + env['BF_OPENGL_INC']
incs += ' #source/blender/gameengine/Ketsji #source/gameengine/SceneGraph #source/blender/makesdna #source/blender/blenkernel'
incs += ' #intern/guardedalloc #source/blender/blenlib'
-env.BlenderLib ( 'bf_oglrasterizer', Split(sources), Split(incs), defines = defs, libtype=['core','player'], priority=[350,75], cxx_compileflags=env['BGE_CXXFLAGS'])
+if env['WITH_BF_CXX_GUARDEDALLOC']:
+ defs.append('WITH_CXX_GUARDEDALLOC')
+
+if env['WITH_BF_PYTHON']:
+ incs += ' ' + env['BF_PYTHON_INC']
+ defs.append('WITH_PYTHON')
+
+env.BlenderLib ( 'ge_oglrasterizer', Split(sources), Split(incs), defines = defs, libtype=['core','player'], priority=[350,75], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript
index a78a0289d98..bff2a7e2084 100644
--- a/source/gameengine/Rasterizer/SConscript
+++ b/source/gameengine/Rasterizer/SConscript
@@ -10,7 +10,9 @@ defs = [ 'GLEW_STATIC' ]
if env['WITH_BF_PYTHON']:
incs += ' ' + env['BF_PYTHON_INC']
-else:
- defs.append('DISABLE_PYTHON')
+ defs.append('WITH_PYTHON')
-env.BlenderLib ( 'bf_rasterizer', sources, Split(incs), defs, libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS'])
+if env['WITH_BF_CXX_GUARDEDALLOC']:
+ defs.append('WITH_CXX_GUARDEDALLOC')
+
+env.BlenderLib ( 'ge_rasterizer', sources, Split(incs), defs, libtype=['core','player'], priority=[350,70], cxx_compileflags=env['BGE_CXXFLAGS'])