glDrawPixels problem

At the moment I’m working on a project wich draws thumpnails via OpenGL. I’m using glDrawPixels to draw the thumpnails and it works quite nice, but whenever I try to draw a thumpnail which lays partly outside the view, it won’t show up.
So for example, if the thumpnail is 100 pixels width and I draw it at x-positon -50 so that only the half of the image is visible, it won’t show up.
I’m using glRasterPos2d to set the current drawing position.

Does anyone know a way around this problem?

I can’t use textures, because of the power of 2 limitation and because of the thumpnails changing themselves from time to time. (weird project

Read the spec. I’m pretty sure that is the correct behavior of rasterPos() (ie don’t draw if the raster position is outside of visible range).

It sounds like you have an invalid RasterPos.

You can get around this by first setting a valid rasterPos inside your current viewport and then using glBitmap to set a rasterPos that is outside the viewport but still valid.

To do this call glBitmap with a NULL bitmap and then modify the current raster position using the xmove & ymove parameters.

Hope this helps

Yes, Errin, you are right. It is the correct behavior of glRasterPos() it’s just that I tryed to find a way around this limitation.

So thanks Ledge, because your way works really good. It helped a lot.
I have wrote I nice glRasterPosHack() function, which calls glRasterPos with a valid position and change it afterwards with glBitmap.