View Full Version : glRasterPos problems
My Problem is that every time i change the raster position when displaying a bitmap
it dissappears it only works when
glRasterPos2f/i(0,0) is as such, or on
glRasterPos2f() when the change is less than
.0001 and that does virtually nothing.
What am i doing wrong?
05-11-2001, 09:46 AM
A couple of things to check.
1. If the raster position is set to something not visible, and you try and use it to draw a bitmap, none of the bitmap will show up.
2. When setting the raster position, it is modified by the current model-view and projection matrices, so if you are doing transforms that will make it go out of your viewing volume, you won't get your bitmap displayed.
One thing you could do would be something like so...
// Set matrix mode
// push current projection matrix on the matrix stack
// Set an ortho projection based on window size
glOrtho(0, width, 0, height, 0, 1);
// Switch back to model-view matrix
// Store current model-view matrix on the stack
// Clear the model-view matrix
// You can specify this in window coordinates now
// Restore the model-view matrix
// Switch to projection matrix and restore it
// Switch back to model-view matrix. This isn't
// strictly necessary, but I tend to try and
// keep the model-view matrix as the current
// matrix to keep things simple.
Works Perfectly Now, Thanks a lot.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.