SFML community forums

Help => Graphics => Topic started by: CombatWombat on September 03, 2012, 08:04:00 pm

Title: No way to transform VertexArray?
Post by: CombatWombat on September 03, 2012, 08:04:00 pm
Maybe I'm missing something obvious here, but is there no way to translate and/or rotate a vertexArray?

Regenerating the entire geometry each frame is too slow already.  Essentially I need something like:

glTranslatef(x,y);
glRotatef(angle);
window.draw(vertexArray);

Would mixing opengl and sfml in that way cause unexpected effects with regards to their transforms fighting?
Title: Re: No way to transform VertexArray?
Post by: FRex on September 03, 2012, 08:09:44 pm
Pass sf::RederStates object, it can contain a transformation or derieve from vertexarray and transformable and impelement own virtual draw function.
Title: Re: No way to transform VertexArray?
Post by: CombatWombat on September 03, 2012, 08:11:40 pm
ooh, excellent.  Didn't realize that was hidden in the render states bit.  Thanks.