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

Author Topic: Image Deformation in SFML  (Read 12971 times)

0 Members and 2 Guests are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Image Deformation in SFML
« Reply #15 on: October 22, 2012, 08:58:40 am »
It's an old code based on the SFML 1.6 renderer. The implementation would be totally different with SFML 2.
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Image Deformation in SFML
« Reply #16 on: October 22, 2012, 12:24:16 pm »
Oh, I can't read it for a few more days so I didn't know. :-X
It's mindblowing to achieve this without vertices from 2.0
Back to C++ gamedev with SFML in May 2023

Spidyy

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
Re: Image Deformation in SFML
« Reply #17 on: October 24, 2012, 10:35:12 pm »
Someone really wanted to use the Stroke class, so I'm working on it to port it to SFML 2.0 and give it a few enhancements.

And regarding this, what would be the faster way to display dynamic mesh? Directly calling glVertex3, like the old renderer.AddVertex(), or using a vertex array we clear and rebuild each frame?
« Last Edit: October 24, 2012, 10:37:23 pm by Spidyy »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Image Deformation in SFML
« Reply #18 on: October 24, 2012, 10:43:22 pm »
And regarding this, what would be the faster way to display dynamic mesh? Directly calling glVertex3, like the old renderer.AddVertex(), or using a vertex array we clear and rebuild each frame?
The 'clean' way would probably be to use a sf::VertexArray or use your own arrays of sf::Vertex, SFML will then pass that on to OpenGL, but if you really want to watch out for 'fast' as in performance, then the direct OpenGL calls might be faster. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Image Deformation in SFML
« Reply #19 on: October 24, 2012, 10:50:25 pm »
OpenGL (if used optimally) will always be faster than something which is a layer on top of OpenGL ;)
Laurent Gomila - SFML developer

Spidyy

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
Re: Image Deformation in SFML
« Reply #20 on: October 24, 2012, 10:54:00 pm »
Roger

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Image Deformation in SFML
« Reply #21 on: October 24, 2012, 11:10:40 pm »
... but SFML vertex arrays should be more than enough for that ;)
Laurent Gomila - SFML developer

Spidyy

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
Re: Image Deformation in SFML
« Reply #22 on: October 24, 2012, 11:11:52 pm »
Roger (bis)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Image Deformation in SFML
« Reply #23 on: October 24, 2012, 11:20:04 pm »
If someone can't wait to get a 'working' copy of the class, I've rewritten the rendering part, but since I don't quite know on how to handle the class to get nice effects, I can't really test everything, anyways here you go. ;)
You could for instance use to get to know the class a bit better and then once Spidyy will have finished the remake (with different function names and improvements ;) ) you should definitely use his version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

masskiller

  • Sr. Member
  • ****
  • Posts: 284
  • Pointers to Functions rock!
    • MSN Messenger - kyogre_jb@hotmail.com
    • View Profile
    • Email
Re: Image Deformation in SFML
« Reply #24 on: October 25, 2012, 01:06:23 am »
Quote
If someone can't wait to get a 'working' copy of the class, I've rewritten the rendering part, but since I don't quite know on how to handle the class to get nice effects, I can't really test everything, anyways here you go. ;)

I wasn't really that eager for it, but it is very well appreciated, I'll be able to give it a lot of use. Thanks.

Quote
You could for instance use to get to know the class a bit better and then once Spidyy will have finished the remake (with different function names and improvements ;) ) you should definitely use his version.

I'll most likely will. I at least now have a bit more of understanding towards vertexes (openGL forces you to) so I'll be able to take far more from the code now than I would have before getting into it.
Programmer, Artist, Composer and Storyline/Script Writer of "Origin of Magic". If all goes well this could turn into a commercial project!

Finally back into the programming world!