RoiiG
08-15-2010, 11:16 AM
Hello i'm trying to use 3.3 core profile, but there are not many tutorials out there :(.
When I learned OpenGL I did it the old way.. fixed pipeline and now I find very hard the transition because I have more questions without answers than never. So let's start...
1) From what I read, VAOs are just Buffer Objects used to store vertex information. So if i have 3 meshes i have to store the vertex in 1 Vertex Array (VA), all the vertex information will be stored in the GPU memory. Then create 3 Buffer Objects and bind them to each mesh 1by1 . Finally, I have to create 1 VAO and bind it all the 3 VBO? or only the the VA?
2) Which vertex will be passed to the Vertex shader? I suppose only the ones specified by a VAO. So can I have various meshes rendered with only a VAO?
3) I always used glloadidentity, gluperspective, glrotate etc.. i have to implement it, ok it's no problem at all, but what about modelview and projection matrix? Have I to maintain a stack?
4) glViewport is not deprecated, but I made a project without it and it works using opengl 3.3 with a simple vertex shader and a simple fragment shader. Why?
5) If i have a cube with 6 different textures one for each face. Which is the best way to handle it? creating one VAO? 6 VAOs? how many VBO? :S im really lost here.
If I said something that is really wrong please correct me.
Well thanks! I think is enough for now :o
When I learned OpenGL I did it the old way.. fixed pipeline and now I find very hard the transition because I have more questions without answers than never. So let's start...
1) From what I read, VAOs are just Buffer Objects used to store vertex information. So if i have 3 meshes i have to store the vertex in 1 Vertex Array (VA), all the vertex information will be stored in the GPU memory. Then create 3 Buffer Objects and bind them to each mesh 1by1 . Finally, I have to create 1 VAO and bind it all the 3 VBO? or only the the VA?
2) Which vertex will be passed to the Vertex shader? I suppose only the ones specified by a VAO. So can I have various meshes rendered with only a VAO?
3) I always used glloadidentity, gluperspective, glrotate etc.. i have to implement it, ok it's no problem at all, but what about modelview and projection matrix? Have I to maintain a stack?
4) glViewport is not deprecated, but I made a project without it and it works using opengl 3.3 with a simple vertex shader and a simple fragment shader. Why?
5) If i have a cube with 6 different textures one for each face. Which is the best way to handle it? creating one VAO? 6 VAOs? how many VBO? :S im really lost here.
If I said something that is really wrong please correct me.
Well thanks! I think is enough for now :o