| 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 | { |
nothing calls this directly
no test coverage detected