Strange glDrawPixels Problems
I setup a simple Win32 Console mode application that uses GLUT. I created an array of bytes that holds pixel data that is plotted on a window at coordinates 0,0 with glDrawPixels. The image appears fine but when I resize the window, the image moves; especially when I resize the window vertically the image moves in the opposite direction and actually it gets drawn over the desktop if it moves outside the window! I used GLSetup and my video card is an ATI 3D Rage Pro. Has anyone encountered such problems? Any suggestions will be appreciated.
------------------------------------------------
DaWizard
http://members.home.com/ahmadkabani
http://www.geocities.com/ahmadkabani
------------------------------------------------
drawpixels draws at the current rasterization position.
use glRasterPosi(..) to change
http://members.xoom.com/myBollux
use glRasterPosi(..) to change
http://members.xoom.com/myBollux
I am using glRasterPos2i(). Here''s the code to display the image:
glClear( GL_COLOR_BUFFER_BIT );
glRasterPos2i( 0.0, 0.0 );
glDrawPixels( 64, 64, GL_RGB, GL_UNSIGNED_BYTE, image );
glFlush();
glClear( GL_COLOR_BUFFER_BIT );
glRasterPos2i( 0.0, 0.0 );
glDrawPixels( 64, 64, GL_RGB, GL_UNSIGNED_BYTE, image );
glFlush();
It seems its a problem with the OpenGL drivers. The code works fine on a different machine.
------------------------------------------------
DaWizard
http://members.home.com/ahmadkabani
http://www.geocities.com/ahmadkabani
------------------------------------------------
------------------------------------------------
DaWizard
http://members.home.com/ahmadkabani
http://www.geocities.com/ahmadkabani
------------------------------------------------
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement