View Full Version : Flickering glDrawPixels
Hi, anybody knows why glDrawPixels(0,y) flickers?
coords for glRasterPos are from gluUnProject
06-22-2004, 05:58 AM
Depends on what you mean with "flickering", the most common problem is that you are not using double buffering, glDrawPixels is a pretty slow operation and can cause flickering if you are not using doublebuffering.
To be more precise:
- i use double bufferin',
- i use gluUnProject to get coords for glRasterPos,
- every time i want to render on the left edge (x=0, y=no matter what) and then i rotate camera (gluLookAt) the bitmap drawed by glDrawPixels flicks - it's sometimes visible, sometimes not
- i got rid of the problem of performance with glDrawPixels - now it's amazingly fast! - i can draw many time ~1024 bitmaps without performance degradation :)
06-24-2004, 02:26 AM
- every time i want to render on the left edge (x=0, y=no matter what) and then i rotate camera (gluLookAt) the bitmap drawed by glDrawPixels flicks - it's sometimes visible, sometimes not That happens if the rasterpos gets invalid, which is when it's not in the 3D viewing frustum after transformations.
A simple fix would be to enable this
if it's supported by your implementation.
Otherwise you need to make sure your transformed rasterpos does not fall oout of the frustum, or if it does, clamp it to the screen and skip pixels of the source bitmap.
06-24-2004, 11:16 AM
... or just read the GL FAQ :
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.