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

Author Topic: How to flip image for OpenGL texture?  (Read 3901 times)

0 Members and 1 Guest are viewing this topic.

Mars_999

  • Full Member
  • ***
  • Posts: 103
    • View Profile
    • Email
How to flip image for OpenGL texture?
« on: April 03, 2011, 03:49:58 am »
Ok I have tried to use sf::Sprite and sf::Image to do this, but I am guessing I am going to have to do it myself?

sf::Image image;
sf::Sprite texture;

texture.FlipY(true);
texture.SetImage(image);

image = *texture.GetImage();

the texture isn't flipped....

Thanks!

BTW will this have a built in ability in 1.6 ever? or 2.0?

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
How to flip image for OpenGL texture?
« Reply #1 on: April 03, 2011, 03:57:24 am »
A sprite defines how to render the image for this instance. So by telling the sprite we are going to flip it doesn't flip the actual image. But when you tell the sprite to be rendered it will render the image flipped.

From a sprite's perspective the image is constant, read-only and is not allowed to change it.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio