Quan
01-08-2001, 12:14 PM
Hi,
I'm still new to opengl. I have an opengl view to display a digital image in three bands (rgb). To make it easy, I use the rgba format and then pass it into glDrawPixels function to draw to the screen. everything works fine, resize and everything. Now i've gone back and added an overlaying semi transparent image (or polygon, whatever) and it displays correctly. But when i go to resize the window, the newly drawn item does not get resized. Is there a different surface that i am drawing to which does not know how to resize? This is my resize function, very simple:
>>glViewport(0, 0, w, h);
>>glMatrixMode(GL_PROJECTION);
>>Reset coordinate system
>>glLoadIdentity();
>>gluOrtho2D(0.0,(GLfloat) w,(GLfloat) h,0.0);
>>glMatrixMode(GL_MODELVIEW);
>>glLoadIdentity();
Is there something I am not doing correctly here? Or is it a sin to try to draw over an image after glDrawPixels have been called?
thanx for any help,
-Quan
I'm still new to opengl. I have an opengl view to display a digital image in three bands (rgb). To make it easy, I use the rgba format and then pass it into glDrawPixels function to draw to the screen. everything works fine, resize and everything. Now i've gone back and added an overlaying semi transparent image (or polygon, whatever) and it displays correctly. But when i go to resize the window, the newly drawn item does not get resized. Is there a different surface that i am drawing to which does not know how to resize? This is my resize function, very simple:
>>glViewport(0, 0, w, h);
>>glMatrixMode(GL_PROJECTION);
>>Reset coordinate system
>>glLoadIdentity();
>>gluOrtho2D(0.0,(GLfloat) w,(GLfloat) h,0.0);
>>glMatrixMode(GL_MODELVIEW);
>>glLoadIdentity();
Is there something I am not doing correctly here? Or is it a sin to try to draw over an image after glDrawPixels have been called?
thanx for any help,
-Quan