Sign in to follow this  
jon4075

Strange texCoord behaviour

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this