PDA

View Full Version : Displaying a Bitmap



Sonny Maou
05-26-2004, 05:44 PM
I'm able to load up bitmaps and texture them to quads, and transform and zoom and size them just fine. What I want to do is simply display a bitmap in its original size in a window. This will be off to the side of the main window and not resizeable, etc...

So how do I display that bitmap in its original size and shape?!

dorbie
05-26-2004, 10:36 PM
Use glDrawPixels to draw the bitmap. glRasterPos will position the bitmap first, the location is transformed through the modelview & projection mtrix first though. It will appear provided it doesn't get clipped.

Sonny Maou
05-28-2004, 09:57 AM
Originally posted by dorbie:
Use glDrawPixels to draw the bitmap.Do I first have to load it into memory somewhere? I can't find a glLoadBitmap() function/procedure anywhere! :) And the only advice I've gotten so far is to "display a bitmap as a texture on a quad."


glRasterPos will position the bitmap first, the location is transformed through the modelview & projection matrix first though. It will appear provided it doesn't get clipped.be blessed, dorbie!

Sonny Maou
05-30-2004, 01:52 PM
bump

ZbuffeR
05-31-2004, 12:12 AM
Bump read the docs.

Sonny Maou
05-31-2004, 04:40 PM
Originally posted by ZbuffeR:
Bump read the docs.I have and I've Googled the hell out of Google and still can't figure out how to display a bitmap such that it takes up the full client rect of a window... or some less portion thereof.

<Bumping head against desk>

P.S. Could you at least direct me to a particular part of the docs? I don't mind RTFM, as long as it's friendly.

ZbuffeR
06-01-2004, 03:02 AM
Did you actually read the doc for glDrawPixels (google glDrawPixels + I'm feeling lucky) ?
Did you try the official opengl FAQ for coders ?
http://opengl.org/resources/faq/technical/rasterization.htm#rast0015

A simple search on this forum with glBitmap returned this, there is source code available :
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_to pic;f=2;t=016434 (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=016434)

And your simple 'bump' was not very polite.

Sonny Maou
06-01-2004, 06:34 AM
Originally posted by ZbuffeR:
Did you actually read the doc for glDrawPixels (google glDrawPixels + I'm feeling lucky) ?yes, I did. but... I'm a beginner! Thus, my trist into this forum. :)


Did you try the official opengl FAQ for coders ?
http://opengl.org/resources/faq/technical/rasterization.htm#rast0015 That one I might have missed. :p


A simple search on this forum with glBitmap returned this, there is source code available :
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_to pic;f=2;t=016434 (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=016434)

And your simple 'bump' was not very polite.I apologize, then, apparently not completely understanding the use of "bump" in a message board system. I had noticed people using a "bump" message as a way to repost a message without having to type it out, or get it back on the forum radar (putting it at the top of the list). What's the polite use of "bump," if not what I did?

Thanks! :)

Sonny Maou
06-01-2004, 07:01 AM
Here's exactly what I needed:

http://opengl.org/resources/faq/technical/transformations.htm#tran0090

Thanks for the help!

ZbuffeR
06-01-2004, 09:07 AM
Ok no problem , you are forgiven ! :)


Originally posted by Sonny Maou:
...I had noticed people using a "bump" message as a way to repost a message without having to type it out, or get it back on the forum radar...If nobody answers when you need more info, you can try to reformulate your question and show that you actually tried to understand things. If you give the impression of just waiting around pressing refresh button of the topic, it is not very motivating to do the actual work for you...
Some general quidelines are described here :
http://www.catb.org/~esr/faqs/smart-questions.html#forum

Good luck with OpenGL !