Re: carriage return in text

Shawn Driscoll <[email protected]> Tue, 10 Dec 2013 07:47:37 +0000 (UTC)
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
altern <altern2 <at> gmail.com> writes:

> def text(s,x,y,z):
> 	glRasterPos3f(x,y,z)
> 	for char in s:
> 		glutBitmapCharacter(GLUT_BITMAP_8_BY_13, ord(char))
> 
> I tried to pass \n\ in  the string to mark the carriage return but i
> guess this doesnt work with opengl.
> any tips?
 

You want to check char for \n character and then adjust the raster position 
manually.  Like you're doing a carriage return.




------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net