[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] PyGlyph



The PyGlyph examples work except for the unimportant resizing problem, but when I tried to apply the code to my own project and draw some text atop my 3D landscape, nothing appeared. After some experimentation (like turning off drawing everything else, then running a dedicated draw-some-text loop instead of my normal drawing loop), I made a version of PyGlyph's "hello" example in a format I can use, ie. not using the example framework. This is what happened:
http://kschnee.xepher.net/code/font_test.jpg
(Text that looks like my monitor needs a new ink cartridge, and not centered.)
This is the code itself:
http://kschnee.xepher.net/code/font_test.py.txt


I'm not sure what the difference is that would cause this trouble. Something about the way I'm setting up OpenGL? For clarification, I'm using a function called OpenGLSwitchMode to switch between 2D (ortho) and 3D drawing modes because I'm trying to put text on the screen in an otherwise 3D game.

Kris