how to send vertices to the renderer

Started by
3 comments, last by nagromo 20 years, 3 months ago
I''m writing a simple 2D "engine" using ortho, and I''m trying to decide how to sent polys to OpenGL. I don''t really care that much about performance, but I don''t want immediate mode. I don''t want to use extensions, and it should run on low-end hardware.
Advertisement
Vertex arrays.


"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
Probably in 2D your bottleneck is fill rate so there is no real difference...and on low end hardware (and not only) passing glVertex2i can be FASTER than use VertexArrays (in theory VertexArrays should work better but it is not always true).


[edited by - blizzard999 on January 12, 2004 1:38:34 PM]
Of course VertexArray should work better if you have a VERY LONG run of triangles...
OK, would I be able to call
GLBegin()
for(i=0...)
{
Object->Draw()
}
GLEnd()

I don''t think so. I don''t want to use GLBegin/End for every sprite. If that would work, I might use immediate mode, but there will be a variable number of objects.

This topic is closed to new replies.

Advertisement