intjelic / esfml

SFML for supporting OpenGL ES available for smartphones/tablets
Other
34 stars 3 forks source link

VertexArrays with sf::Quads won't render #33

Open MarioLiebisch opened 11 years ago

MarioLiebisch commented 11 years ago

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.

LaurentGomila commented 11 years ago

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

MarioLiebisch commented 11 years ago

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

LaurentGomila commented 11 years ago

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.

MarioLiebisch commented 11 years ago

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