This commit is contained in:
vlj 2014-10-02 02:53:35 +02:00
commit b4133d8d54
5 changed files with 22 additions and 7 deletions

View File

@ -285,7 +285,7 @@ void CGUIButton::draw()
}
}
if (SpriteBank)
if (false) //SpriteBank)
{
// pressed / unpressed animation
u32 state = Pressed ? (u32)EGBS_BUTTON_DOWN : (u32)EGBS_BUTTON_UP;

View File

@ -142,7 +142,11 @@ void STKAnimatedMesh::updateGL()
if (!rnd->isTransparent())
{
Material* material = material_manager->getMaterialFor(mb->getMaterial().getTexture(0), mb);
Material::ShaderType MatType = MaterialTypeToMeshMaterial(type, mb->getVertexType(), material);
Material* material2 = NULL;
if (mb->getMaterial().getTexture(1) != NULL)
material2 = material_manager->getMaterialFor(mb->getMaterial().getTexture(1), mb);
Material::ShaderType MatType = MaterialTypeToMeshMaterial(type, mb->getVertexType(), material, material2);
InitTextures(mesh, MatType);
}

View File

@ -11,8 +11,12 @@
#include "modes/world.hpp"
Material::ShaderType MaterialTypeToMeshMaterial(video::E_MATERIAL_TYPE MaterialType, video::E_VERTEX_TYPE tp, Material* material)
Material::ShaderType MaterialTypeToMeshMaterial(video::E_MATERIAL_TYPE MaterialType, video::E_VERTEX_TYPE tp,
Material* material, Material* layer2Material)
{
if (layer2Material != NULL && layer2Material->getShaderType() == Material::SHADERTYPE_SPLATTING)
return Material::SHADERTYPE_SPLATTING;
switch (material->getShaderType())
{
default:

View File

@ -174,7 +174,8 @@ class ListDisplacement : public MiscList<ListDisplacement, GLMesh *, core::matri
class ListInstancedGlow : public Singleton<ListInstancedGlow>, public std::vector<GLMesh *>
{};
Material::ShaderType MaterialTypeToMeshMaterial(video::E_MATERIAL_TYPE MaterialType, video::E_VERTEX_TYPE tp, Material* material);
Material::ShaderType MaterialTypeToMeshMaterial(video::E_MATERIAL_TYPE MaterialType, video::E_VERTEX_TYPE tp,
Material* material, Material* layer2Material);
TransparentMaterial MaterialTypeToTransparentMaterial(video::E_MATERIAL_TYPE, f32 MaterialTypeParam, Material* material);
void InitTextures(GLMesh &mesh, Material::ShaderType);

View File

@ -143,7 +143,10 @@ void STKMeshSceneNode::updateNoGL()
else
{
assert(!isDisplacement);
Material::ShaderType MatType = MaterialTypeToMeshMaterial(type, mb->getVertexType(), material);
Material* material2 = NULL;
if (mb->getMaterial().getTexture(1) != NULL)
material2 = material_manager->getMaterialFor(mb->getMaterial().getTexture(1), mb);
Material::ShaderType MatType = MaterialTypeToMeshMaterial(type, mb->getVertexType(), material, material2);
if (!immediate_draw)
MeshSolidMaterial[MatType].push_back(&mesh);
}
@ -179,7 +182,10 @@ void STKMeshSceneNode::updateGL()
if (!rnd->isTransparent())
{
Material* material = material_manager->getMaterialFor(mb->getMaterial().getTexture(0), mb);
Material::ShaderType MatType = MaterialTypeToMeshMaterial(type, mb->getVertexType(), material);
Material* material2 = NULL;
if (mb->getMaterial().getTexture(1) != NULL)
material2 = material_manager->getMaterialFor(mb->getMaterial().getTexture(1), mb);
Material::ShaderType MatType = MaterialTypeToMeshMaterial(type, mb->getVertexType(), material, material2);
if (!immediate_draw)
InitTextures(mesh, MatType);
}