Merge branch 'master' of https://github.com/supertuxkart/stk-code
This commit is contained in:
commit
b4133d8d54
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -11,12 +11,16 @@
|
||||
#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:
|
||||
return material->getShaderType();
|
||||
return material->getShaderType();
|
||||
case Material::SHADERTYPE_SOLID:
|
||||
if (MaterialType == irr_driver->getShader(ES_NORMAL_MAP))
|
||||
return Material::SHADERTYPE_NORMAL_MAP;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user