Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Gosu::Image.from_text, how to get a correct OpenGL tex ?
- By bestguigui Date 2010-02-07 12:18
Hello,

I need to get a dynamic text texture, which will be mapped on a 3D object. The purpose here is to let the player choose a name for his character, and this name has to be mapped on a 3D object I created in two pieces :
- first is the 3D object itself
- then a "3D layer" only containing the text texture, to be sure that it will follow the first object 3D shape.

For now, I created a 2D texture in Photoshop containing a temporary name, and it works perfectly. But I wanna the player to be able to choose the wanted name, so I thought using Gosu::Image.from_text method. Unfortunately, it seems that Gosu::Image.from_text doesn't provide a valid texture to use with OpenGL in any situation, because the result Gosu::Image gives an error when I try to use the gl_tex_info method.

I really would like not to use another library only to generate that, and if possible, I don't want either to use letter tiles to achieve this effect. Is it possible to get a correct 512*512 texture containing the wanted text using a native Gosu method ? I'm using the Ruby version.

Thanks a lot
Up Topic Gosu / Gosu Exchange / Gosu::Image.from_text, how to get a correct OpenGL tex ?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill