Skip to main content
GameDev.net gamedev.net
🔒 Locked

need some help with bitmaps

Started by Oni Sephiroth Nov 20, 2008 at 7:08 PM 5 replies 650+ views
Original Post
Oni Sephiroth
Oni Sephiroth
Can someone show me a decent function for loading and drawing a bitmap with the glDrawPixels function? I've tried using several from the internet and textbooks, none of them want to work. Does anyone have one they're willing to share that actually works?
Stani R
Stani R
What is it you are actually trying to do? I dunno about how fast or slow drawPixels is but my first gut reaction would be to just texture a quad instead.
Oni Sephiroth
Oni Sephiroth
Yea, I eventually want to texture it onto a quad, but I want to see if I can actually get the bitmap to load and display properly first before jumping into texture mapping.
Oni Sephiroth
Oni Sephiroth
Someone around here has to have one they can show...
Stani R
Stani R
Since it's just for looking, I suggest you just jump into texture mapping. You'll have to do it eventually, and it's not rocket science. There are also a lot of tutorials for it (including NeHe, which I can recommend to learn the very basics - don't actually adopt any of it for program architecture - but your first stop should be the Red Book itself).

If you do want to stick to glDrawPixels, post your code and I'll try looking at it to see what could the the problem. Can't promise anything though, I'm not too familiar with how that function works.
Oni Sephiroth
Oni Sephiroth
I actually used Nehe's tutorial already, which didn't work due to the lack of the glaux library. Well, give me a minute to type up the function from my book again since I removed it.
Oni Sephiroth
Oni Sephiroth
...Well, this is odd. It seems to be working now. Huh...interesting. I did nothing any differently. Well, good, now I can move onto texture mapping. Thank you for posting, even though it was fixed on its own.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.