开发者

OpenGL: Textured Primitives + High Framerate

Short version: What's the best practice going forward for efficiently rendering large numbers of independent texture-mapped, lighted 2D/3D primitives (circles, rects, etc.) in OpenGL?

For example: a typical particle system using billboarded quads/triangles, poi开发者_运维知识库nt sprites, or whatever other technique, with blending.

alt text http://www.codingthewheel.com/image.axd?picture=lucent1.jpg

Because after reading this thread on the messiness of OpenGL versioning/deprecation I'm starting to have my doubts.

My specific question is not the ABCs of displaying primitives in OpenGL, but rather how to do so efficiently in post-deprecation (or pre-deprecation) OpenGL, in a way that's going to be compatible with a wide range of commodity hardware and in a way that's not going to break or itself get deprecated, five years down the line.

Thanks!


I'm still trying to get a handle on the post-deprecation OpenGL world myself.

From what I understand though, the recommended methods for specifying geometry are Vertex Buffer Objects (VBOs) or vertex arrays. VBOs are the first preference, because the vertex data lives in the GPU's memory.

Also, you have to use shaders, because all the fixed-pipeline functionality is deprecated.

This stuff all works in OpenGL 2.1 and above (and OpenGL ES 2.0 it seems).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜