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

glDrawPixels()

Started by Xtreme Nov 6, 2000 at 6:58 PM 9 replies 800+ views
Original Post
Xtreme
Xtreme
Is there a way to speed up the process of displaying a picture using glDrawPixels()? (or any other function that does the same thing?) Currently, it takes about 1-2 seconds to display a picture of size 800x600x32bit even though I have a p3-700 with a 16MB TNT video card. Why is it soooooooooo slowwwwww? What other gl Functions can I do to achieve the same thing? sig u say?
Yes! There are kangaroos in Australia but I haven't seen them...yet
Blackstream
Blackstream
Holy Maceral, 1-2 seconds!!! Hmmm, does your video card have OpenGL Hardware Acceleration? That could be it. I don''t really know OpenGL so I can''t get any deeper.

-Blackstream
-Blackstream Will you, won't you, will you, won't you, won't you take my virus?-The Mad HackerBlackstream's Webpage
zedzeek
zedzeek
glDrawPixels is a slow operation, though the lastest nvidia drivers 6.xx have increased the previous speed at least 10x.
your best bet is to stick what u wanna draw into a texture and render that with a glBegin(..) glEnd() command.
BTW tnt1 aint to quick in 32bit

http://members.xoom.com/myBollux
Xtreme
Xtreme
yeah, about 2 seconds more like it. In 16-bit mode its slightly faster, but still is slow. (about 1 second).

Yes, I''m running in OGL Hardware Acceleration. That I know.
Using texture method is faster but aren''t i''m limited to 2 to the power of n resolutions? for eg, 512x512, 256x256. I want to draw 800x600, 640x480, etc.
Yes! There are kangaroos in Australia but I haven't seen them...yet
TheGecko
TheGecko
Yeah I had that problem too.You have to divide your bitmap into sections of 256x256,32x32 etc and then use them all as texture maps onto your polygon.That''s what I did and it works great.
Xtreme
Xtreme
Gecko, thats the last option I want to try
Isn''t there another OGL function thats faster than the DrawPixels() command?
Yes! There are kangaroos in Australia but I haven't seen them...yet
Null and Void
Null and Void
If you look in NeHe''s tutorials (the one about mip-mapping, and lighting) there is a really cheesy way to have differently sized textures...
Xtreme
Xtreme
Damn!

Zedzeek, isn''t glTexSubImage2D() still similar to glTexImage2D()?
Yes! There are kangaroos in Australia but I haven't seen them...yet

Topic Locked

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

Sign in to reply to this topic.