always calls glBindBuffer(0) after disabling vao

This commit is contained in:
degasus 2012-12-29 12:50:42 +01:00
parent cd54d6efdd
commit 30dd9c2e17
5 changed files with 11 additions and 21 deletions

View file

@ -203,8 +203,8 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms
glTexCoordPointer(2, GL_FLOAT, 6*sizeof(GLfloat), (GLfloat*)NULL+4);
// TODO: this after merging with graphic_update
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
// EFB framebuffer is currently bound, make sure to clear its alpha value to 1.f
glViewport(0, 0, m_targetWidth, m_targetHeight);
@ -360,9 +360,6 @@ void XFBSource::Draw(const MathUtil::Rectangle<float> &sourcerc,
};
glBindBuffer(GL_ARRAY_BUFFER, s_VBO);
glBufferData(GL_ARRAY_BUFFER, 2*4*3*sizeof(GLfloat), vertices, GL_STREAM_DRAW);
// TODO: this after merging with graphic_update
glBindBuffer(GL_ARRAY_BUFFER, 0);
s_cached_sourcerc = sourcerc;
s_cached_drawrc = drawrc;
@ -373,6 +370,7 @@ void XFBSource::Draw(const MathUtil::Rectangle<float> &sourcerc,
// TODO: this after merging with graphic_update
glBindVertexArray(0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
GL_REPORT_ERRORD();
}