-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area: rendererConcerns our graphics rendererConcerns our graphics rendererbugBehaving differently as it should behaveBehaving differently as it should behavegood first issueSuitable for newcomersSuitable for newcomerslang: c++Done in C++ codeDone in C++ codeopengl
Description
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):
openage/libopenage/renderer/opengl/geometry.cpp
Lines 56 to 58 in 29df8ac
| case geometry_t::bufferless_quad: | |
| glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); | |
| break; |
Even though glDrawArrays doesn't read from a buffer, it requires a VAO as stated in the OpenGL Wiki:
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).
How To Reproduce
- Create a
GlGeometryobject with a bufferless quad, e.g. withrenderer::opengl::GlRenderer::add_bufferless_quad() - Create a renderable with the geometry
- Add the renderable to a render pass
- Render the render pass and observe the error
Expected Behavior
An empty VAO should be created and bound when trying to render a bufferless quad.
Metadata
Metadata
Assignees
Labels
area: rendererConcerns our graphics rendererConcerns our graphics rendererbugBehaving differently as it should behaveBehaving differently as it should behavegood first issueSuitable for newcomersSuitable for newcomerslang: c++Done in C++ codeDone in C++ codeopengl
Type
Projects
Status
✅ Done
Status
renderer