SFML community forums
Help => Graphics => Topic started by: FRex on December 06, 2012, 04:41:04 am
-
Can there be any assumption about order of drawing primitives in vertexarray? For example 8 vertices, two quads, first one is big rectangle, other is smaller one with it's area completely contained in the area of first one. Will both always show, first in array getting drawn first or is it (implementation /un)defined?
-
OpenGL draws them in order and I didn't see any reordering in the source for sf::RenderTarget. Seems like a safe assumption.
-
Yes it should be safe, however I don't know if it's explicitely written in the OpenGL spec.
-
When glDrawArrays is called, it uses count sequential elements from each enabled array to construct a sequence of geometric primitives, beginning with element first.
Found here (http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml).
-
Thanks :)
-
Thanks too.
Err... by construct it means render, right? ;D
-
Err... by construct it means render, right?
Of course :P
-
Ah.. obviously it does.. ::)
Thanks. ;)