glDrawPixels problem in CAD application !

glDrawPixels is slow in OnBoard display card, does anyone know the fastest way that can give the same result. The speed is very important in a CAD program. i am not going to use wgl extension because not every display card support this function So can anyone tell me the best way to make my CAD program run smoothly even thought there are many object in the background when i am drawing? Does anyone know how autocad do it?(its good in every display card even in tnt2 & OnBoard display card. I wonder how autocad do it)
Please help me!! because i need to submit my program to my boss soon. Thanks

The fastest alternative to glDrawPixels() on a hw-accelerated board is to use a textured quad. Combined with glTexSubImage2D(), this should give you much better performance compared to glDrawPixels(). Use glOrtho to correctly draw the quad in the window.

(a) You only need to ask once. People will answer your question if they see merit in doing so.

(b) I would bet autocad doesn’t use glDrawPixels. It probably uses a “rubber banding” technique like a bitwise operation such as NOT or the like. And it’s probably single buffered. It’s either that or a glCopyTexSubImage() call of some sort.

sorry for duplicate question, and thanks for ur reply, i will try the method you suggest

> I would bet autocad doesn’t use glDrawPixels

I wouldn’t bet on that, Blender still use glDrawPixels for background image drawing for example, and the reason I was given was that it was faster this way at the time the code was written for the target hardware.

Originally posted by rgpc:
b You only need to ask once. People will answer your question if they see merit in doing so.

(b) I would bet autocad doesn’t use glDrawPixels. It probably uses a “rubber banding” technique like a bitwise operation such as NOT or the like. And it’s probably single buffered. It’s either that or a glCopyTexSubImage() call of some sort.[/b]

what is rubber banding technique and bitwise operation? how to use it? Do you have any example or website to find all this stuff. Thanks in advance.

Originally posted by rgpc:
b You only need to ask once. People will answer your question if they see merit in doing so.

(b) I would bet autocad doesn’t use glDrawPixels. It probably uses a “rubber banding” technique like a bitwise operation such as NOT or the like. And it’s probably single buffered. It’s either that or a glCopyTexSubImage() call of some sort.[/b]

now i have know how to use rubber binding. but if there are many object say 20000 object. When i use rubber binding techniq, i will draw the object 2 times which is 200002 and if i have four view then it would be 200002*4 times.

POSITION pos = m_objects.GetHeadPosition();
while (pos != NULL)
{
CBomObj* pObj = m_objects.GetNext(pos);
pObj->DrawShade(pView,1,shade);
}
everytime when i move the object to new position. I have to wait for the object list to complete the while loop first. So in 4 view case, I would have to wait for 4 while loop and it really take a long time.

In autocad, when i move the object to new position, the object will regenerate from the beginning instead of drawing all the object in this case the mouse pointer will never delay when moving i wonder how autocad do it. Does anyone know the techniq?
i would appreciate for any reply.