Thursday, March 21, 2013

[OpenGL] Display List, Vertex Array, Vertex buffer object (VBO)

Reference: http://www.songho.ca/opengl/gl_vbo.html
Reference: http://www.gamedev.net/topic/487333-glgenbuffers-vs-glgenbuffersarb/

"Using vertex array can reduce the number of function calls and redundant usage of the shared vertices. However, the disadvantage of vertex array is that vertex array functions are in the client state and the data in the arrays must be re-sent to the server each time when it is referenced.
On the other hand, display list is server side function, so it does not suffer from overhead of data transfer. But, once a display list is compiled, the data in the display list cannot be modified.
Vertex buffer object (VBO) creates "buffer objects" for vertex attributes in high-performance memory on the server side and provides same access functions to reference the arrays, which are used in vertex arrays, such as glVertexPointer(), glNormalPointer(), glTexCoordPointer(), etc."

Vertex Array: 資料存放在 Client 端, 每次畫圖時要傳送至 Server 端。可修改資料內容。
Display List: 資料放在 Serve 端(執行較快)。但不可修改資料內容。若要修改, 則必須重建 Display List。
VBO:同時兼具 Vertex Array 和 Display List 的優點。資料放在 Server 端,而且可修改資料內容。

OpenGL 1.4 版(含)之前,VBO 是 OpenGL 延伸功能 (GL_ARB_vertex_buffer_object),相關函數名後面加有 ARB。

OpenGL 1.5 版(含)之後,VBO 是 OpenGL 內函功能,相關函數名後面不加 ARB。

No comments:

Post a Comment

[Qt] 執行檔需要哪些 Dll?

 1. 使用 Qt  的 windeployqt.exe 工具 (在 C:\Qt\Qt5.14.1\5.14.1\msvc2017\bin\)。   a. 把執行檔 myProgram.exe 放在某個資料夾。   b. 在檔案總管這個資料夾按 Shift 和滑鼠右鍵,開啟 Po...