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>2017-05-24 17:34:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-24 18:40:15 +0300
commitf2cc6c9254be5fe093e112f3b6e2192b392a1843 (patch)
treeca772903df80752dceb9250eb5090ff7b41f4487 /source/gameengine/Ketsji
parent7a9ad029dd1d1afe42d54c9c181de887636db7c0 (diff)
TexFace removal part 2
- Derived-mesh drawing. - All non UV members of TexFace structs. MTexPoly is now redundant but keeping with a dummy member, will check on complete removal later.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/BL_Material.cpp1
-rw-r--r--source/gameengine/Ketsji/BL_Material.h1
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp21
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.h1
4 files changed, 5 insertions, 19 deletions
diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp
index 4f707e6267f..40384b43054 100644
--- a/source/gameengine/Ketsji/BL_Material.cpp
+++ b/source/gameengine/Ketsji/BL_Material.cpp
@@ -69,7 +69,6 @@ void BL_Material::Initialize()
alpha = 1.f;
emit = 0.f;
material = 0;
- memset(&mtexpoly, 0, sizeof(mtexpoly));
materialindex = 0;
amb=0.5f;
num_enabled = 0;
diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h
index 9207a41f56d..710c02f4871 100644
--- a/source/gameengine/Ketsji/BL_Material.h
+++ b/source/gameengine/Ketsji/BL_Material.h
@@ -84,7 +84,6 @@ public:
Material* material;
- MTexPoly mtexpoly; /* copy of the derived meshes tface */
Image* img[MAXTEX];
EnvMap* cubemap[MAXTEX];
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 0aa17c59337..98d27ef3685 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -160,12 +160,6 @@ KX_BlenderMaterial::~KX_BlenderMaterial()
OnExit();
}
-MTexPoly *KX_BlenderMaterial::GetMTexPoly() const
-{
- // fonts on polys
- return &mMaterial->mtexpoly;
-}
-
unsigned int* KX_BlenderMaterial::GetMCol() const
{
// fonts on polys
@@ -290,11 +284,6 @@ void KX_BlenderMaterial::OnExit()
mTextures[i].DeleteTex();
mTextures[i].DisableUnit();
}
-
- /* used to call with 'mMaterial->tface' but this can be a freed array,
- * see: [#30493], so just call with NULL, this is best since it clears
- * the 'lastface' pointer in GPU too - campbell */
- GPU_set_tpage(NULL, 1, mMaterial->alphablend);
}
@@ -310,7 +299,7 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras)
mLastShader = NULL;
}
- ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(GPU_BLEND_SOLID);
BL_Texture::DisableAllTextures();
return;
}
@@ -334,7 +323,7 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras)
ras->SetAlphaBlend(mMaterial->alphablend);
}
else {
- ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(GPU_BLEND_SOLID);
ras->SetAlphaBlend(-1); // indicates custom mode
// tested to be valid enums
@@ -346,7 +335,7 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras)
void KX_BlenderMaterial::setBlenderShaderData( bool enable, RAS_IRasterizer *ras)
{
if ( !enable || !mBlenderShader->Ok() ) {
- ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(GPU_BLEND_SOLID);
// frame cleanup.
if (mLastBlenderShader) {
@@ -377,7 +366,7 @@ void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras)
BL_Texture::DisableAllTextures();
if ( !enable ) {
- ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(GPU_BLEND_SOLID);
return;
}
@@ -420,7 +409,7 @@ void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras)
ras->SetAlphaBlend(mMaterial->alphablend);
}
else {
- ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(GPU_BLEND_SOLID);
ras->SetAlphaBlend(-1); // indicates custom mode
glEnable(GL_BLEND);
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h
index a3d10c0a89d..c562ee0c583 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.h
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h
@@ -84,7 +84,6 @@ public:
Material* GetBlenderMaterial() const;
Image* GetBlenderImage() const;
- MTexPoly *GetMTexPoly() const;
unsigned int* GetMCol() const;
BL_Texture * getTex (unsigned int idx) {
return (idx < MAXTEX) ? mTextures + idx : NULL;