Exemplo n.º 1
0
        //---------------------------------------------------
        //---------------------------------------------------
        MaterialSPtr MaterialFactory::CreateStatic(const std::string& in_uniqueId, const TextureCSPtr& in_texture) const
        {
            MaterialSPtr material(CreateCustom(in_uniqueId));
            Core::ResourcePool* resourcePool = Core::Application::Get()->GetResourcePool();
            material->SetShader(ShaderPass::k_ambient, resourcePool->LoadResource<Shader>(Core::StorageLocation::k_chilliSource, "Shaders/Static.csshader"));
            material->AddTexture(in_texture);
            material->SetTransparencyEnabled(false);
            material->SetCullFace(CullFace::k_back);
            material->SetFaceCullingEnabled(true);
			return material;
        }
Exemplo n.º 2
0
        //---------------------------------------------------
        //---------------------------------------------------
        MaterialSPtr MaterialFactory::CreateAnimatedDirectionalShadowMap(const std::string& in_uniqueId) const
        {
            MaterialSPtr material(CreateCustom(in_uniqueId));
            Core::ResourcePool* resourcePool = Core::Application::Get()->GetResourcePool();
            material->SetShader(ShaderPass::k_ambient, resourcePool->LoadResource<Shader>(Core::StorageLocation::k_chilliSource, "Shaders/AnimatedDirectionalShadowMap.csshader"));
            material->SetTransparencyEnabled(false);
            material->SetCullFace(CullFace::k_back);
            material->SetFaceCullingEnabled(true);
            
#ifdef CS_ENABLE_DEBUGSHADOW
            material->SetColourWriteEnabled(true);
#else
            material->SetColourWriteEnabled(false);
#endif
            
			return material;
        }
Exemplo n.º 3
0
        //---------------------------------------------------
        //---------------------------------------------------
        MaterialSPtr MaterialFactory::CreateAnimatedBlinnPerVertexShadowed(const std::string& in_uniqueId, const TextureCSPtr& in_texture) const
        {
        	if (m_renderCapabilities->IsShadowMappingSupported() == false)
        	{
        		return CreateAnimatedBlinnPerVertex(in_uniqueId, in_texture);
        	}

            MaterialSPtr material(CreateCustom(in_uniqueId));
            Core::ResourcePool* resourcePool = Core::Application::Get()->GetResourcePool();
            material->SetShader(ShaderPass::k_ambient, resourcePool->LoadResource<Shader>(Core::StorageLocation::k_chilliSource, "Shaders/AnimatedAmbient.csshader"));
            material->SetShader(ShaderPass::k_directional, resourcePool->LoadResource<Shader>(Core::StorageLocation::k_chilliSource, "Shaders/AnimatedBlinnPerVertexShadowedDirectional.csshader"));
            material->SetShader(ShaderPass::k_point, resourcePool->LoadResource<Shader>(Core::StorageLocation::k_chilliSource, "Shaders/AnimatedBlinnPerVertexPoint.csshader"));
            material->AddTexture(in_texture);
            material->SetTransparencyEnabled(false);
            material->SetCullFace(CullFace::k_back);
            material->SetFaceCullingEnabled(true);
			return material;
        }
Exemplo n.º 4
0
void nuiMessageBox::AddButton(nuiWidget* pWidget, Button btn)
{
  mpBtnBox->AddCell(CreateCustom(pWidget, btn));
}
Exemplo n.º 5
0
void nuiMessageBox::AddButton(const nglString& rName, Button btn)
{
  mpBtnBox->AddCell(CreateCustom(rName, btn));
}