MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / TextureBackground

Method TextureBackground

src/Nazara/Graphics/TextureBackground.cpp:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

SetParameterMethod · 0.80
GetUniformLocationMethod · 0.80
GetMethod · 0.45
GetShaderMethod · 0.45

Tested by

no test coverage detected