How to handle fonts, that begin offscreen
I'm using wglUseFontBitmaps to display strings, and the problem is that with negative x,y coordinates in glRasterPos3i bitmaps aren't displayed (I know why/or maybe not).
How could I overcome this? Is texture font the only solution for that?
Thanks!
In my framework (C#), I convert on the fly TTF fonts to texture font. Look at the SVN for more informations.
The raster position, when set by glRasterPos, is subject to the same transformations and clipping as any other vertex. If the raster position is clipped, it is also marked as invalid and any operation using the raster position is ignored. That's why you can't directly place the raster position outside the viewport using glRasterPos.
Since you want to set it in window coordinates (edit: rather, I assume that's what you want), I suggest you use glWindowPos instead. The whole idea of it is to specify the raster position in window coordinates, without having to setup the matrices properly, and, most importantly for you, it will not mark the raster position as invalid at any time.
Since you want to set it in window coordinates (edit: rather, I assume that's what you want), I suggest you use glWindowPos instead. The whole idea of it is to specify the raster position in window coordinates, without having to setup the matrices properly, and, most importantly for you, it will not mark the raster position as invalid at any time.
Quote:Original post by Brother BobI'm still in the gl 1.1 era...
The raster position, when set by glRasterPos, is subject to the same transformations and clipping as any other vertex. If the raster position is clipped, it is also marked as invalid and any operation using the raster position is ignored. That's why you can't directly place the raster position outside the viewport using glRasterPos.
Since you want to set it in window coordinates (edit: rather, I assume that's what you want), I suggest you use glWindowPos instead. The whole idea of it is to specify the raster position in window coordinates, without having to setup the matrices properly, and, most importantly for you, it will not mark the raster position as invalid at any time.
But works nicely, thank you!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement