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

Author Topic: RenderTarget.Draw(Vertex[]) missing size parameter  (Read 3189 times)

0 Members and 1 Guest are viewing this topic.

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
RenderTarget.Draw(Vertex[]) missing size parameter
« on: May 09, 2012, 10:41:42 am »
Why the above method omits the size parameter? In most cases you have one big array for vertex cache, its size don't usually change, but number of actual vertices does. Right now you need to reallocate the array every time the call is made and that puts a lot of strain on the GC.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
Re: RenderTarget.Draw(Vertex[]) missing size parameter
« Reply #2 on: May 09, 2012, 10:48:08 am »
Whoops, I search a bit but stopped at 2 months in the past. Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: RenderTarget.Draw(Vertex[]) missing size parameter
« Reply #3 on: May 09, 2012, 08:25:52 pm »
I've added the Draw(Vertex[], start, count, ...) overloads.
Laurent Gomila - SFML developer

omeg

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • http://omeg.pl/
Re: RenderTarget.Draw(Vertex[]) missing size parameter
« Reply #4 on: May 09, 2012, 09:08:05 pm »
Awesome - it seems to work fine and I see visible FPS gain in my GWEN.Net renderer ;)