How to handle fonts, that begin offscreen

Started by
2 comments, last by szecs 14 years, 5 months ago
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!
Advertisement
In my framework (C#), I convert on the fly TTF fonts to texture font. Look at the SVN for more informations.
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
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.
Quote:Original post by Brother Bob
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.
I'm still in the gl 1.1 era...
But works nicely, thank you!

This topic is closed to new replies.

Advertisement