Optimized OpenGL samplers binding

Former-commit-id: 6afb2ed4d9851e09ff1006cf7c81df0cac0bed7d
This commit is contained in:
Lynix
2014-04-16 09:02:32 +02:00
parent 9428097b53
commit 4026e310bc
3 changed files with 53 additions and 2 deletions

View File

@@ -286,7 +286,7 @@ void NzTextureSampler::Bind(unsigned int unit) const
if (!m_samplerId)
UpdateSamplerId();
glBindSampler(unit, m_samplerId);
NzOpenGL::BindSampler(unit, m_samplerId);
}
unsigned int NzTextureSampler::GetOpenGLID() const
@@ -379,7 +379,7 @@ void NzTextureSampler::Uninitialize()
{
NzContext::EnsureContext();
for (const std::pair<nzUInt32, GLuint>& pair : s_samplers)
glDeleteSamplers(1, &pair.second);
NzOpenGL::DeleteSampler(pair.second);
s_samplers.clear();
}