![]() ![]() Fortunately I cover VAOs in the OpenGL tutorial. However, OpenGL 3.2 requires you create a VAO. The thing is this code works fine for version 3.1 core, which it isĭesigned to be. If you want to learn more about modern opengl, I have OpenGL shader tutorials too.Īlso, I get e-mails of how this code is broken because if you set the version to 3.2 it won't work because it doesn't use vertex array objects (or VAOs). Core OpenGL just removes OpenGL calls that don't reflect modern hardware. The fact is that this code will work with an OpenGL 2.1Ĭontext as well as a 3.0 context (Well, except for the shader code because OpenGL 2.1 only supports up to #version 120). We disable the vertex attribute and unbind the program.Īgain this tutorial is more for people with some OpenGL experience that want to know how to switch over to core functionality. In our rendering function, we bind our shader program, enable vertex positions, bind the VBO, set the data offset, bind the IBO, and draw the quad as a triangle fan. Printf( "Name %d is not a shader\n", shader ) GlGetShaderInfoLog( shader, maxLength,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |