esfml icon indicating copy to clipboard operation
esfml copied to clipboard

VertexArrays with sf::Quads won't render

Open MarioLiebisch opened this issue 11 years ago • 4 comments

Subject pretty much sums it up.

If I try to draw sf::VertexArray(sf::Quads) with four vertices nothing happens at all. Will probably try to fix it on my own once I've got some time, but don't want it getting lost.

MarioLiebisch avatar Sep 01 '13 10:09 MarioLiebisch

GL_QUADS doesn't exist in OpenGL ES. If you look at your standard output you should see a nice message saying that.

LaurentGomila avatar Sep 02 '13 05:09 LaurentGomila

Yes, I'm aware of that limitation, but I expected an already implemented workaround. Anyway, going to come up with some patch soon™.

MarioLiebisch avatar Sep 02 '13 09:09 MarioLiebisch

The only possible workaround would be to create a new vertex array on the fly and split every quad to a pair of triangles, but that would be really inefficient. I prefer to deprecate the sf::Quads primitive type rather than to offer a hacky support and giving users a bad habit.

LaurentGomila avatar Sep 02 '13 10:09 LaurentGomila

You're right, didn't think about having to store the fake-quad... So yeah, might be the only proper way to "fix" this.

MarioLiebisch avatar Sep 02 '13 10:09 MarioLiebisch