diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-11-20 07:28:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-11-20 07:28:02 +0300 |
commit | e435fbc3c5a00e5b63c1cd2609ab6828187660d3 (patch) | |
tree | 3f1da9c51451dee55a203cd001d37f8774d2582f /source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp | |
parent | 0a7c43c6e5fc7d5d75a4645eca1164cede2d03a6 (diff) |
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
Diffstat (limited to 'source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp index 9cad9fcf932..97cf89e963f 100644 --- a/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp +++ b/source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp @@ -115,11 +115,11 @@ static void my_make_repbind(Image *ima) } } -extern "C" int set_tpage(TFace *tface); +extern "C" int set_tpage(MTFace *tface); -int set_tpage(TFace *tface) +int set_tpage(MTFace *tface) { - static TFace *lasttface= 0; + static MTFace *lasttface= 0; Image *ima; unsigned int *rect, *bind; int tpx, tpy, tilemode, tileXRep,tileYRep; @@ -368,7 +368,7 @@ GPC_PolygonMaterial::GPC_PolygonMaterial(const STR_String& texname, bool ba, con int tile, int tileXrep, int tileYrep, int mode, bool transparant, bool zsort, int lightlayer, bool bIsTriangle, void* clientobject, void* tpage) : RAS_IPolyMaterial(texname, ba, matname, tile, tileXrep, tileYrep, mode, - transparant, zsort, lightlayer, bIsTriangle, clientobject), m_tface((struct TFace*)tpage) + transparant, zsort, lightlayer, bIsTriangle, clientobject), m_tface((struct MTFace*)tpage) { // clear local caching info my_set_tpage(0); @@ -392,7 +392,7 @@ void GPC_PolygonMaterial::Activate(RAS_IRasterizer* rasty, TCachingInfo& caching if ((m_drawingmode & 4)&& (rasty->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED) ) { - update_realtime_texture((struct TFace*) m_tface, rasty->GetTime()); + update_realtime_texture((struct MTFace*) m_tface, rasty->GetTime()); my_set_tpage(m_tface); rasty->EnableTextures(true); } else |