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

Method Draw

src/Nazara/Graphics/TextureBackground.cpp:70–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 */
69
70 void TextureBackground::Draw(const AbstractViewer* viewer) const
71 {
72 NazaraUnused(viewer);
73
74 static RenderStates states(BuildRenderStates());
75
76 Renderer::SetRenderStates(states);
77 Renderer::SetTexture(0, m_texture);
78
79 m_uberShaderInstance->Activate();
80
81 const Shader* shader = m_uberShaderInstance->GetShader();
82 shader->SendColor(m_materialDiffuseUniform, Color::White);
83 shader->SendFloat(m_vertexDepthUniform, 1.f);
84 shader->SendInteger(m_materialDiffuseMapUniform, 0);
85
86 Renderer::DrawFullscreenQuad();
87 }
88
89 /*!
90 * \brief Gets the background type

Callers

nothing calls this directly

Calls 6

SendColorMethod · 0.80
SendFloatMethod · 0.80
SendIntegerMethod · 0.80
BuildRenderStatesFunction · 0.70
ActivateMethod · 0.45
GetShaderMethod · 0.45

Tested by

no test coverage detected