SFML community forums

Help => Graphics => Topic started by: steveRoll on November 10, 2020, 09:06:12 am

Title: Should I not use the 'Quads' PrimitiveType?
Post by: steveRoll on November 10, 2020, 09:06:12 am
I wanted to use VertexArrays to make my own tile-based drawing system, and the 'Quads' PrimitiveType seems perfect for it, because each tile is a quad. However, I saw this note in the documentation for it:
Quote
Quads | List of individual quads (deprecated, don't work with OpenGL ES)
Does that mean that it's better to not use it, or will it still be fine?
Title: Re: Should I not use the 'Quads' PrimitiveType?
Post by: eXpl0it3r on November 10, 2020, 10:35:34 am
It's still supported on all desktop platforms, but if you plan on writing for mobile platforms, you may want to consider using two triangles instead of one quad.
Title: Re: Should I not use the 'Quads' PrimitiveType?
Post by: steveRoll on November 10, 2020, 10:38:13 am
Can I be sure that desktop platforms will keep supporting them?
Title: Re: Should I not use the 'Quads' PrimitiveType?
Post by: eXpl0it3r on November 10, 2020, 10:46:24 am
They're not removed from OpenGL, so yes.
Title: Re: Should I not use the 'Quads' PrimitiveType?
Post by: steveRoll on November 10, 2020, 10:48:57 am
Alright, I guess I'll use Quads then. Thanks