Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Ortho texture issue


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Knut   Members   -  Reputation: 107

Like
0Likes
Like

Posted 10 September 2012 - 02:28 PM

Hi all,

I am trying to render a textured quad in ortho mode. When I render it as a rectangle, it works fine, as this picture shows:
Posted Image

However, when I try to move one corner half way to the center, the texture gets weirdly skeeved:
Posted Image

Notice the red line going up. I would think that it should be sloped towards the upper right corner, but it's rendered straight up. Is this normal?
There is only one textured quad in this picture, rendered using fixed function pipeline. The texture coords are all either 0 or 1 in the corners. Why is the texture rendered like this?

Thanks in advance.
Knut

Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 8625

Like
3Likes
Like

Posted 10 September 2012 - 02:57 PM

OpenGL can only correctly render planar quads (quads where the four vertices are on a plane). Due to the way the position and texture coordinates interact to form vertices, your quad isn't planar anymore when you shift the position like that without altering the texture coordinate.

Read this: clicky.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS