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

Method SetTextureSampler

src/Nazara/Renderer/Renderer.cpp:1296–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1294 }
1295
1296 void Renderer::SetTextureSampler(unsigned int unit, const TextureSampler& sampler)
1297 {
1298 #if NAZARA_RENDERER_SAFE
1299 if (unit >= s_maxTextureUnit)
1300 {
1301 NazaraError("Texture unit out of range (" + String::Number(unit) + " >= " + String::Number(s_maxTextureUnit) + ')');
1302 return;
1303 }
1304 #endif
1305
1306 s_textureUnits[unit].sampler = sampler;
1307 s_textureUnits[unit].samplerUpdated = false;
1308
1309 if (s_textureUnits[unit].texture)
1310 s_textureUnits[unit].sampler.UseMipmaps(s_textureUnits[unit].texture->HasMipmaps());
1311
1312 s_dirtyTextureUnits.push_back(unit);
1313 s_updateFlags |= Update_Textures;
1314 }
1315
1316 void Renderer::SetVertexBuffer(const VertexBuffer* vertexBuffer)
1317 {

Callers

nothing calls this directly

Calls 3

UseMipmapsMethod · 0.80
HasMipmapsMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected