We help IT Professionals succeed at work.

how do I display a jpeg using opengl

curtisn
curtisn asked
on
I want to display a jpeg using opengl.  It is a very simple application that takes a camera image and continuously updates it.  The camera data is created in jpeg and currently we decompress it to a bitmap to display it.  This seems an obvious waste of computation.  Any ideas?

Thanks,
Curtis
Comment
Watch Question

Please don't use the browser refresh.  You're making duplicates.
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.
CERTIFIED EXPERT

Commented:
And delete all the excess questions you have asked, because no expert is going to look into all these
                     duplicates.
Actually, there isn't really even a way to display bitmaps in OpenGL... at least not in the sense that you mean.  OpenGL provides functions to display images on the screen, sure.  However, you have to provide those images in the form of an array of pixel values which the OGL function sorts out based on the image type you specify (GL_RGB, GL_RGBA, GL_BGR, etc).

Even if you are reading a .BMP file, you still have to parse the pixel values out of the file and into an array if you want to display the image.  You will have to do the same thing with .JPG files.  You need to know the file format so that you can read in the values for each pixel.

So, in short, the answer is NO.  There is no glDisplayJPG() function or anything like that, if that is what you are asking.

Commented:

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
Commented:
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange

Explore More ContentExplore courses, solutions, and other research materials related to this topic.