GlPortal / glPortal

:video_game: Open Source teleportation based first person puzzle-platformer
http://glportal.de
Other
359 stars 109 forks source link

Validation Failed: No vertex array object bound. Mac OS X #157

Open caffeinum opened 5 years ago

caffeinum commented 5 years ago

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:

  1. clone on Mac OS X
  2. build
  3. run

Expected behavior App runs OK.

Desktop (please complete the following information):

Additional context

$ cat data/shaders/whitefill.frag
#version 140

out vec4 out_Color;

void main(void) {
    out_Color = vec4(1, 1, 1, 1);
}
aj-sapkota commented 3 years ago

anyone got solution of this?

FreshSupaSulley commented 3 years ago

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).