Studying the examples from this site developer guides [qt-project.org]
From the source codes of hello-opengl, the paintGL function call “setAttributeArray” to
set the data of the vertices, the weird thing is I never see anything like “glGenBuffers”
The source codes of “setAttributeArray” just do some preprocess and call the “glVertexAttribPointer”
Without “glGenBuffers”, “glBindBuffer”, “glBufferData”, how could the gpu know it should
allocate a buffer and hold the data?Thanks
↧