• Advertisement
Sign in to follow this  

How to handle fonts, that begin offscreen

This topic is 3035 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement