diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-05 00:51:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-09-05 00:51:28 +0400 |
commit | cb89decfdcf5e6b2f26376d416633f4ccf0c532d (patch) | |
tree | a299a5c8729dd0cb4359d57501fd9e6970141e5d /source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | |
parent | 2167e5c341f656b2f664b1052d181e8aa32fe698 (diff) |
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index 4ee06d96603..fb3607f89f4 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -42,11 +42,8 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname, int transp, bool alpha, bool zsort, - int lightlayer, - bool bIsTriangle, - void* clientobject=NULL) : - - m_texturename(texname), + int lightlayer) + : m_texturename(texname), m_materialname(matname), m_tile(tile), m_tilexrep(tilexrep), @@ -56,7 +53,6 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname, m_alpha(alpha), m_zsort(zsort), m_lightlayer(lightlayer), - m_bIsTriangle(bIsTriangle), m_polymatid(m_newpolymatid++), m_flag(0), m_multimode(0) @@ -72,15 +68,16 @@ bool RAS_IPolyMaterial::Equals(const RAS_IPolyMaterial& lhs) const { if(m_flag &RAS_BLENDERMAT) { - return ( + bool test = ( this->m_multimode == lhs.m_multimode && this->m_flag == lhs.m_flag && this->m_drawingmode == lhs.m_drawingmode && this->m_transp == lhs.m_transp && - this->m_lightlayer == lhs.m_lightlayer && this->m_texturename.hash() == lhs.m_texturename.hash() && this->m_materialname.hash() == lhs.m_materialname.hash() ); + + return test; } else { @@ -92,8 +89,6 @@ bool RAS_IPolyMaterial::Equals(const RAS_IPolyMaterial& lhs) const this->m_alpha == lhs.m_alpha && this->m_zsort == lhs.m_zsort && this->m_drawingmode == lhs.m_drawingmode && - this->m_bIsTriangle == lhs.m_bIsTriangle && - this->m_lightlayer == lhs.m_lightlayer && this->m_texturename.hash() == lhs.m_texturename.hash() && this->m_materialname.hash() == lhs.m_materialname.hash() ); @@ -123,11 +118,6 @@ bool RAS_IPolyMaterial::IsZSort() const return m_zsort; } -bool RAS_IPolyMaterial::UsesTriangles() const -{ - return m_bIsTriangle; -} - unsigned int RAS_IPolyMaterial::hash() const { return m_texturename.hash(); @@ -172,5 +162,10 @@ bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const return dolights; } +bool RAS_IPolyMaterial::UsesObjectColor() const +{ + return !(m_flag & RAS_BLENDERGLSL); +} + unsigned int RAS_IPolyMaterial::m_newpolymatid = 0; |