glPortal
glPortal copied to clipboard
Validation Failed: No vertex array object bound. Mac OS X
Describe the bug
Build worked fine, but running does not work: app shows only the black screen. Related: #156
Console shows this error:
Validation Failed: No vertex array object bound.

To Reproduce Steps to reproduce the behavior:
- clone on Mac OS X
- build
- run
Expected behavior App runs OK.
Desktop (please complete the following information):
- OS: Mac OS X Mojave 10.14
- Computer: Macbook Pro Early 2015
Additional context
- Shaders had another error, which I fixed replacing
#version 120
to#version 140
, as in #125 - Some references I googled: (https://stackoverflow.com/questions/32067530/vertex-array-object-not-binding-correctly-in-opengl-4-1, https://www.opengl.org/discussion_boards/showthread.php/185964-vertex-array-object-not-bound-opengl-core-4-1) basically say about deleting
#define glGenVertexArrays glGenVertexArraysAPPLE
- The error even shows for this small shader:
$ cat data/shaders/whitefill.frag
#version 140
out vec4 out_Color;
void main(void) {
out_Color = vec4(1, 1, 1, 1);
}
anyone got solution of this?
I'm programming OpenGL in Java, not C++, but it should be the same concept. You can't validate your shader if you haven't assigned a VAO to the shader. glValidateProgram() checks whether the "executables contained in the program [shader] can execute given the current OpenGL state." If you haven't assigned a VAO to the shader, it can't validate because there's no VAO to check. Bind your VAO with glBindVertexArray(vaoID).