gsdx-ogl: don't bind the 0 texture to be compatible with the Nvidia debugger

This commit is contained in:
Gregory Hainaut 2015-08-13 09:57:24 +02:00
parent 84744d429e
commit 87dcb9336f
1 changed files with 7 additions and 4 deletions

View File

@ -1260,10 +1260,13 @@ void GSDeviceOGL::IASetPrimitiveTopology(GLenum topology)
void GSDeviceOGL::PSSetShaderResource(int i, GSTexture* sr)
{
ASSERT(i < (int)countof(GLState::tex_unit));
GLuint id = sr ? sr->GetID() : 0;
if (GLState::tex_unit[i] != id) {
GLState::tex_unit[i] = id;
gl_BindTextureUnit(i, id);
// Note: Nvidia debgger doesn't support the id 0 (ie the NULL texture)
if (sr) {
GLuint id = sr->GetID();
if (GLState::tex_unit[i] != id) {
GLState::tex_unit[i] = id;
gl_BindTextureUnit(i, id);
}
}
}