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

Author Topic: Texture coordinates of RenderTarget hardcoded in pixels?  (Read 1262 times)

0 Members and 1 Guest are viewing this topic.

Zylann

  • Newbie
  • *
  • Posts: 15
    • View Profile
Texture coordinates of RenderTarget hardcoded in pixels?
« on: October 12, 2013, 08:28:57 pm »
I spent 1 hour trying to figure out a texturing problem in my game.

In sf::Texture, I saw that the default mode is Normalized, which I attempt to use with a VertexArray.

However, I found that the coordinate system used in RenderTarget is Texture::Pixels.

It's hardcoded into the applyTexture function, why? Will it be customizable in future releases?
« Last Edit: October 12, 2013, 08:31:37 pm by Zylann »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Texture coordinates of RenderTarget hardcoded in pixels?
« Reply #1 on: October 12, 2013, 08:32:25 pm »
These are internals, why are they relevant for you?

The API works with pixel coordinates, not normalized ones.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: