You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ecere/gfx/drivers/GL/GLAB: Improved handling element buffers with VAO
- Not modifying active element buffer when VAOs are on, except for default VAO
- Not using glabCurElementBuffer with VAO except for defaultVAO, as each VAO may have a different active element buffer
- Removed unecessary / wrong WebGL-specific logic
- New GLABBindVertexArray() call to keep track of active VAO
- NOTE: VAO usage currently expects a single context / display
- butterbur: Updated to use GLABBindVertexArray()
- samples/3D/CubicWorld: Updated to use GLABBindVertexArray()
- samples/3D/CubicWorld: Improved readability e.g., splitting prepareMultiDraw() into multiple methods
if(glCaps_vao) // && vao != glabCurVertexArray) // VAOs are not shared across contexts / displays
58
+
{
59
+
#ifdef _DEBUG
60
+
if(vao != glabCurVertexArray)
61
+
;//PrintLn("WARNING: Redundant VAO binding");
62
+
#endif
63
+
glBindVertexArray(vao);
64
+
glabCurVertexArray = vao;
65
+
}
66
+
#endif
67
+
}
68
+
69
+
uint glabCurVertexArray; // Currently bound VAO.
70
+
71
+
uint glabCurArrayBuffer; // Buffer currently bound for GL_ARRAY_BUFFER. *NOT* part of VAO state
72
+
uint glabCurElementBuffer; // Buffer currently bound for GL_ELEMENT_ARRAY_BUFFER. This *IS* part of the VAO state. With VAOs, this is for 'defaultVAO'.
0 commit comments