Fix bug when glVertexPointer etc. is called without client state enabled

This commit is contained in:
Luke Benstead 2021-10-02 20:01:44 +01:00
parent 5df2190536
commit e225f54386

View File

@ -1293,6 +1293,11 @@ void APIENTRY glEnableClientState(GLenum cap) {
default:
_glKosThrowError(GL_INVALID_ENUM, __func__);
}
/* It's possible that we called glVertexPointer and friends before
* calling glEnableClientState, so we should recheck to make sure
* everything is in the right format with this new information */
_glRecalcFastPath();
}
void APIENTRY glDisableClientState(GLenum cap) {
@ -1316,6 +1321,9 @@ void APIENTRY glDisableClientState(GLenum cap) {
default:
_glKosThrowError(GL_INVALID_ENUM, __func__);
}
/* State changed, recalculate */
_glRecalcFastPath();
}
GLuint _glGetActiveClientTexture() {