A little openGL help please ?
In order to support text in my game I wrote a class for handling textures that generates textures from images or text. It works fine when I generate a string texture upon program initialization but when a string texture is generated dynamically while in the game the texture comes out like pixel noise. You can sort of see the string but not really because you get all these random pixels of random colors all over the place where the texture is drawn.
Has anyone had this issue before or have a probable cause for this? What was causing it and how was it solved ?
I tried adding glFlush() calls after my GL code and CGContextFlush calls after my CG calls and it makes no difference.
Im using CG to draw the string to an image buffer than I then pass to openGL to generate a texture. It works very well when the string is static, but when it is generated as needed all I get is noise.
|