PDA

View Full Version : Drawpixel too slow, Selection upside down



NeckCracker
06-04-2000, 12:09 PM
Hi!

I've got two problems
1.
I have a big scene of 30k polygons.
It runs around 7 FPS but when I draw an image directly to the frame buffer (with glDrawpixel) the scene slows down to 4-5 FPS
Why? Is this function so slow or I'm doing something wrong.
2.
I tried to select the object which is under the mouse pointer with the selection render mode. I use gluPickMatrix with gluPerspective and have a came defined with gluLookAt.
The problem is that it look as if the whole world would bee upside down in the selection buffer. The result looks mirrored horizontally. It works fine when I use gluOrtho2d projection.


Thanks in advance
NeckCracker

Kaeto
06-04-2000, 04:17 PM
Well, the answer to #1- DON'T use glDrawPixels. It is slow. You're not doing anything wrong. Direct framebuffer access is always slow (BTW, this happens in D3D, too. I was playing sports car GT today. Turned on the mirror frame (drawn with ddraw). Went from ~60fps to like 10-15.)

Eric
06-04-2000, 10:14 PM
The answer to #2 is that the Y-Axis in OpenGL is increasing from bottom to top (opposite to the PC screen).

What you should do when the user picks at (X,Y) is use the select mode with (X,YRes-Y) where YRes is your resolution in Y.

Regards.

Eric

P.S. : so you were right, your world is upside down !

NeckCracker
06-05-2000, 02:00 AM
THANK YOU FOR YOUR REPLY
My problems are solved

NeckCracker