Sign in to follow this  

Strange texCoord behaviour

This topic is 3909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Still learning, but currently suffering; I have an image loader for use with fonts. All the letters are on the one image and the texture co-ords are tampered with to pick out the right letter. It's nothing special and worked fine up until the point I tried to implement the switching of the texture co-ords. Currently, whenever I call my "drawLetter(GLuint letter)" function which creates a single quad with the specified letter drawn on, it will completely mangle the texture co-ordinates. However, repeat the request for the same letter and it will draw it just fine and dandy. For example, requesting the letters 'y' 'y' 'b' 'b' 'b' 'y' in this order, translating in between, would result in only the second 'y' and the 2nd and 3rd 'b's being correctly displayed. Yet if anthing's going right, it's not how I calculated the coords.. Am I missing something simple about how textureObjects behave or have I just added/removed something quirky in my editting? EDIT: Er..k..just explicately set it all back to show the entire font map; Even with simple 1.0/0.0 numerical values, it mangles the first attempt and gets the rest right.. =(

Share this post


Link to post
Share on other sites
Could you post the code for this function? It may be that something isn't initialized or bound the first time you render the letter, however the function happens to set everything up for the next call.

Share this post


Link to post
Share on other sites
Sign in to follow this