I am a newbie to OpenGL. I want to display 24bit RGB (8,8,8) data of size 640x480 using OpenGL.My development target is Linux. So I found an example program to display a bitmap file at
Why can you only display 128x128? Does the application crash, give you an error, or does it just not display anything?
If your graphics hardware can display textures no larger than 128x128, there’s not a lot you can do about it. If the resolution of the 640x480 graphic can be dropped you could stretch it to cover the screen.
Otherwise, you could load a number of 128x128 graphics and tile them to create the effect of a much larger textured quad.
Also, note that non-power-of-two textures may not be supported on your hardware - 640 and 480 are non-power-of-two. You’d need to draw your 640x480 image in one corner of a 1024x512 image, then modify your texture coordinates to texture the quad with just the 640x480 part.
Thanks for ur reply cfmdobbie. I got success in displaying images of different resolutions. My requirement is to display 24-bit 1280x960 image data from camera over OpenGL at a rate of 30fps.
The problem is the time taken for displaying the 1280x960 image data is 2.23 seconds. I am using the function glDrawPixels() for displaying the image data from the camera.
Is there any way to achieve the number of frames per second.