Skip to content Skip to sidebar Skip to footer

In PyOpengl To Bind Text To An Object

Is it possible in PyOpengl to bind text to an object? If I need dynamic changing text to be anchored to a specific object and move along with the object. Please,could you tell me h

Solution 1:

A text must be rendered. There is no drawText or bindText function.

The glyphs of text are often represented by textures. The textures can be generated with the FreeType library (freetype-py). You can find an example in the answer to the question How to render text with PyOpenGL?.

You can also use PyGame to generate the text with the pygame.font or pygame.freetype module. For an example of how to render text with PyOpenGL and PyGame, see the answer to question pygame + opengl = display text


Post a Comment for "In PyOpengl To Bind Text To An Object"