Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: No way to transform VertexArray?  (Read 1377 times)

0 Members and 1 Guest are viewing this topic.

CombatWombat

  • Newbie
  • *
  • Posts: 13
    • View Profile
No way to transform VertexArray?
« 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?

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: No way to transform VertexArray?
« Reply #1 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.
Back to C++ gamedev with SFML in May 2023

CombatWombat

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: No way to transform VertexArray?
« Reply #2 on: September 03, 2012, 08:11:40 pm »
ooh, excellent.  Didn't realize that was hidden in the render states bit.  Thanks.

 

anything