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:
authorCampbell Barton <ideasman42@gmail.com>2015-07-14 15:27:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-14 15:36:00 +0300
commit0918461d61127f5d7e9dd7d81441a77b4bdd962d (patch)
tree256a28c9b586ab8588797bc3e63dec31f485bff8 /source/gameengine/Rasterizer
parent2cffd6649b0e9b646bc090e4bba90e9873fb2982 (diff)
Move from MTFace to MTexPoly w/ texture checks
Part of moving away from MFace.
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp2
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp11
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp4
4 files changed, 14 insertions, 7 deletions
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
index 03f6e567771..d07b4910968 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
@@ -233,7 +233,7 @@ Image *RAS_IPolyMaterial::GetBlenderImage() const
{
return NULL;
}
-MTFace *RAS_IPolyMaterial::GetMTFace() const
+MTexPoly *RAS_IPolyMaterial::GetMTexPoly() const
{
return NULL;
}
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
index 14223fc59bd..a34f7a9b390 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
@@ -41,7 +41,7 @@
#endif
class RAS_IRasterizer;
-struct MTFace;
+struct MTexPoly;
struct Material;
struct Image;
struct Scene;
@@ -167,7 +167,7 @@ public:
virtual Material* GetBlenderMaterial() const;
virtual Image* GetBlenderImage() const;
- virtual MTFace* GetMTFace() const;
+ virtual MTexPoly* GetMTexPoly() const;
virtual unsigned int* GetMCol() const;
virtual Scene* GetBlenderScene() const;
virtual void ReleaseMaterial();
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 4904fdd0eb0..5b7b752ee98 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -670,7 +670,9 @@ void RAS_OpenGLRasterizer::IndexPrimitives_3DText(RAS_MeshSlot& ms,
// triangle and quad text drawing
for (i=0; i<it.totindex; i+=numvert)
{
- float v[4][3];
+ float v[4][3];
+ const float *v_ptr[4] = {NULL};
+ const float *uv_ptr[4] = {NULL};
int glattrib, unit;
for (j=0; j<numvert; j++) {
@@ -679,6 +681,9 @@ void RAS_OpenGLRasterizer::IndexPrimitives_3DText(RAS_MeshSlot& ms,
v[j][0] = vertex->getXYZ()[0];
v[j][1] = vertex->getXYZ()[1];
v[j][2] = vertex->getXYZ()[2];
+ v_ptr[j] = v[j];
+
+ uv_ptr[j] = vertex->getUV(0);
}
// find the right opengl attribute
@@ -688,7 +693,9 @@ void RAS_OpenGLRasterizer::IndexPrimitives_3DText(RAS_MeshSlot& ms,
if (m_attrib[unit] == RAS_TEXCO_UV)
glattrib = unit;
- GPU_render_text(polymat->GetMTFace(), polymat->GetDrawingMode(), mytext, mytext.Length(), polymat->GetMCol(), v[0], v[1], v[2], v[3], glattrib);
+ GPU_render_text(
+ polymat->GetMTexPoly(), polymat->GetDrawingMode(), mytext, mytext.Length(), polymat->GetMCol(),
+ v_ptr, uv_ptr, glattrib);
ClearCachingInfo();
}
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp
index e0613350b77..c978b908a6a 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageIM.cpp
@@ -179,12 +179,12 @@ static int CheckTexfaceDM(void *mcol, int index)
}
*/
-static DMDrawOption CheckTexDM(MTFace *tface, const bool has_mcol, int matnr)
+static DMDrawOption CheckTexDM(MTexPoly *mtexpoly, const bool has_mcol, int matnr)
{
// index is the original face index, retrieve the polygon
if (matnr == current_blmat_nr &&
- (tface == NULL || tface->tpage == current_image)) {
+ (mtexpoly == NULL || mtexpoly->tpage == current_image)) {
// must handle color.
if (current_wireframe)
return DM_DRAW_OPTION_NO_MCOL;