Strange texCoord behaviour

Started by
0 comments, last by Zipster 16 years, 11 months ago
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.. =(
Advertisement
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.

This topic is closed to new replies.

Advertisement