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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-06-14 01:24:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-06-14 01:24:21 +0400
commit6d62a18a51303da845df1c04cd2b357853b7e7ed (patch)
treedbe5455cf7d57f719b58615c1c40c6a8f2903439 /source/gameengine/Rasterizer
parent9fb4cbc668ad7fc612cbb63206567066e2626173 (diff)
Apricot Branch: GLSL
==================== * Added support for lamps and shaders. All material diffuse and specular shaders are supported, for lamps especially area light support is not there yet. * Added support for these GLSL shaders in the game engine, though it is incomplete and somewhat of a hack. Specifically all the variables are completely static, which means moving lights, or animating material properties will not work. * Enabling GLSL shaders is now different. They work in textured drawmode, and can be enabled in the Game menu with the option "Blender GLSL Materials" Known issues: * The GLSL shaders don't always update correct on light changes. * The game player appears to crash with these GLSL shaders, while regular blender works fine.
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r--source/gameengine/Rasterizer/RAS_CameraData.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.cpp5
-rw-r--r--source/gameengine/Rasterizer/SConscript2
3 files changed, 5 insertions, 6 deletions
diff --git a/source/gameengine/Rasterizer/RAS_CameraData.h b/source/gameengine/Rasterizer/RAS_CameraData.h
index 6aa9b34962b..0327a3f4763 100644
--- a/source/gameengine/Rasterizer/RAS_CameraData.h
+++ b/source/gameengine/Rasterizer/RAS_CameraData.h
@@ -49,12 +49,12 @@ struct RAS_CameraData
m_clipstart(clipstart),
m_clipend(clipend),
m_perspective(perspective),
- m_focallength(focallength),
m_viewport(viewport),
m_viewportleft(viewportleft),
m_viewportbottom(viewportbottom),
m_viewportright(viewportright),
- m_viewporttop(viewporttop)
+ m_viewporttop(viewporttop),
+ m_focallength(focallength)
{
}
};
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index 96ce220ae4d..01d44245826 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -177,7 +177,6 @@ bool RAS_MaterialBucket::ActivateMaterial(const MT_Transform& cameratrans, RAS_I
bool dolights = false;
const unsigned int flag = m_material->GetFlag();
-
if( flag & RAS_BLENDERMAT)
dolights = (flag &RAS_MULTILIGHT)!=0;
else
@@ -316,14 +315,14 @@ void RAS_MaterialBucket::Render(const MT_Transform& cameratrans,
//rasty->SetMaterial(*m_material);
-
int drawmode;
for (T_MeshSlotList::const_iterator it = m_meshSlots.begin();
! (it == m_meshSlots.end()); ++it)
{
rendertools->SetClientObject((*it).m_clientObj);
- while (ActivateMaterial(cameratrans, rasty, rendertools, drawmode))
+ while (ActivateMaterial(cameratrans, rasty, rendertools, drawmode)) {
RenderMeshSlot(cameratrans, rasty, rendertools, *it, drawmode);
+ }
}
// to reset the eventual GL_CW mode
rendertools->SetClientObject(NULL);
diff --git a/source/gameengine/Rasterizer/SConscript b/source/gameengine/Rasterizer/SConscript
index ff79a5d97b8..f077833b850 100644
--- a/source/gameengine/Rasterizer/SConscript
+++ b/source/gameengine/Rasterizer/SConscript
@@ -7,7 +7,7 @@ if env['WITH_BF_GLEXT'] == 1:
env['CPPFLAGS'].append('-DWITH_GLEXT')
-incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines'
+incs = '. #source/kernel/gen_system #intern/string #intern/moto/include #source/gameengine/BlenderRoutines #extern/glew/include'
if env['OURPLATFORM']=='win32-vc':
cflags = []