View Full Version : how to place objects into video card memory ?
06-07-2004, 10:30 PM
The problem I have is the following.
I use glDrawPixel to draw a background but it is too slow because every time it has to transfer data from ram to video buffer.
I search for a solution to place data into video card memory and use it from there.
Have you tried display lists?
Historically, those things were used to store pixel data in fast server memory. Then texture objects went there anyway, that's my two cents.
06-08-2004, 12:11 PM
DrawPixel is slow as snails. It would be better to use texture mapping. Modern 3d cards are pretty darn good at that. Just draw a full screen quad with your background texture on it and you're set. Just set the appropriate filtering modes as needed on texture load.
06-10-2004, 10:20 AM
You should search for information on vertex buffer objects.
06-10-2004, 11:53 AM
Vertex buffer objects don't help with the transfer rate of DrawPixels.
To get DrawPixels as fast as it can be, you should make sure that your data is 4-byte aligned, and that it is in GL_BGRA format in memory, using unsigned bytes.
However, some implmentations of DrawPixels are still slow, and you'll get better performance by uploading the data to a texture (each frame) and drawing a single quad with the texture on it, positioned correctly, using glOrtho() projection.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.