Open heinezen opened 4 months ago
OpenGL generates an error when a bufferless quad is drawn but no VAO is bound. This can happen in the renderer here (line 57):
https://github.com/SFTtech/openage/blob/29df8ac2a9ca164d52f27bbc05f7867ec0ba6560/libopenage/renderer/opengl/geometry.cpp#L56-L58
Even though glDrawArrays doesn't read from a buffer, it requires a VAO as stated in the OpenGL Wiki:
glDrawArrays
A non-zero Vertex Array Object must be bound (though no arrays have to be enabled, so it can be a freshly-created vertex array object).
GlGeometry
renderer::opengl::GlRenderer::add_bufferless_quad()
An empty VAO should be created and bound when trying to render a bufferless quad.
Description
OpenGL generates an error when a bufferless quad is drawn but no VAO is bound. This can happen in the renderer here (line 57):
https://github.com/SFTtech/openage/blob/29df8ac2a9ca164d52f27bbc05f7867ec0ba6560/libopenage/renderer/opengl/geometry.cpp#L56-L58
Even though
glDrawArrays
doesn't read from a buffer, it requires a VAO as stated in the OpenGL Wiki:How To Reproduce
GlGeometry
object with a bufferless quad, e.g. withrenderer::opengl::GlRenderer::add_bufferless_quad()
Expected Behavior
An empty VAO should be created and bound when trying to render a bufferless quad.