PDA

View Full Version : Draw Bitmaps



06-09-2001, 05:09 AM
I am currently writing a Machine Vision App for tracking people. I am thinking of using OpenGL for visualisation and GLUT to handle the windowing.

My question is is it easy to draw a bitmap image into a GLUT window? how do I do it?

Thanks tim

styx
06-09-2001, 11:44 AM
well, usually glDrawPixels() should work.
or upload your bitmap as texture and draw a quad right over your screen
you could use a 512x512 texture, only use 512x384 res (because that's our magical 0.75 aspect ratio) and then opengl scales it to your respective resolution (if you use different ones)
that's how I did it in fullscreen, but I'd wodner if it won't work in a glut window.

MrShoe
06-09-2001, 05:54 PM
If you would like, I could give you code in GLUT that loads a BMP file and textures it over a quad, done in a glut window. Just email me if you would like the code.

Leyder Dylan
06-10-2001, 01:36 AM
Hi,

On my site, I've a little exemple who display a BMP like a splash screen.

The function can be imported for GLUT with no problems.
http://ibelgique.ifrance.com/Slug-Production

"Download" section

Gavin
06-11-2001, 05:35 AM
Hi, just seen this, could you have a look at my Q on texture quality...

gav