[Solved] Why can I have an OpenGL shader class, but not a VAO class?

The problem has nothing to do with the VAO, but with the VBO. Since you pass a pointer to the constructor: void GSMesh::build(GLfloat *arrFVertex, GSShader *shader, int _intNumVertex) { glBufferData(GL_ARRAY_BUFFER, sizeof(arrFVertex), arrFVertex, GL_STATIC_DRAW); } sizeof(arrFVertex) = sizeof(GLfloat*) which is the size of the pointer, not the size of the array pointed to. The correct code … Read more

[Solved] Draw An Arc In opengl [closed]

Not necessarily the best way, but if you just need to get something working, you can modify your circle code slightly. Add a float arc_length parameter to the function signature. Replace 2.0f * 3.1415926f with arc_length. If you need to start the arc at a given offset, you can add another parameter called float arc_start. … Read more

[Solved] first program of OpenGL using c++ [closed]

You are using a cross-compiler for Windows, and you are trying to run the binary on Linux (I assume ubantu is a linux distribution). Just use normal g++ from apt-get install g++. Here’s a GLFW usage example, if you’d like to see some code. GLFW is cross-OS, so it will still work when compiled on … Read more

[Solved] LWJGL random lines inbenween shapes

I’m guessing you have all of your textures on on image? Near the edge of the block, OpenGL is sampling nearby pixels to make it smooth, so on the edge of your dirt block you can see it slightly fading into a stone block try the lwjgl version of this: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, … Read more