| 43 | */ |
| 44 | |
| 45 | TextureBackground::TextureBackground(TextureRef texture) |
| 46 | { |
| 47 | m_uberShader = UberShaderLibrary::Get("Basic"); |
| 48 | |
| 49 | ParameterList list; |
| 50 | list.SetParameter("DIFFUSE_MAPPING", true); |
| 51 | list.SetParameter("TEXTURE_MAPPING", true); |
| 52 | list.SetParameter("UNIFORM_VERTEX_DEPTH", true); |
| 53 | |
| 54 | m_uberShaderInstance = m_uberShader->Get(list); |
| 55 | |
| 56 | const Shader* shader = m_uberShaderInstance->GetShader(); |
| 57 | m_materialDiffuseUniform = shader->GetUniformLocation("MaterialDiffuse"); |
| 58 | m_materialDiffuseMapUniform = shader->GetUniformLocation("MaterialDiffuseMap"); |
| 59 | m_vertexDepthUniform = shader->GetUniformLocation("VertexDepth"); |
| 60 | |
| 61 | SetTexture(std::move(texture)); |
| 62 | } |
| 63 | |
| 64 | /*! |
| 65 | * \brief Draws this relatively to the viewer |
nothing calls this directly
no test coverage detected