Re: OpenGL Display List under OS X
Re: OpenGL Display List under OS X
- Subject: Re: OpenGL Display List under OS X
- From: John Stauffer <email@hidden>
- Date: Fri, 4 Jul 2003 10:09:46 -0700
On Thursday, July 3, 2003, at 07:18 PM, Steven Langer wrote:
On Thursday, July 3, 2003, at 10:29AM, Steven Langer wrote:
Message: 3
Cc: email@hidden
From: Geoff Stahl <email@hidden>
Subject: Re: X11 and OpenGL drawing together in one window
Date: Wed, 2 Jul 2003 11:17:49 -0700
To: Robert Cox <email@hidden>
On Wednesday, July 2, 2003, at 11:08 AM, Robert Cox wrote:
We have an brain surface visualization program that uses OpenGL to
render the surfaces. The user can draw a region-of-interest
(ROI) on
the projected surface. During the mouse movement part of the
drawing,
the program just draws (with XDrawLines) over the user's trace.
When
the user releases the mouse button, then the surface is
re-rendered
with the ROI properly shaded, colored, etc. This dual method is
for
speed - we can't render the surface fast enough to keep up with
mouse
movements (about 300,000 triangles - takes about 0.25 s to redraw
on
my iMac, 0.20 on my PowerBook).
I suspect this can be improved drastically. I have a 300,000
polygon
model that animates very smoothly. You should look to display lists
for static data or vertex array range or vertex array object for
dynamic data (see <http://developer.apple.com/opengl> for more info
on
these extensions).
---
Geoff Stahl
3D Software Engineer
Apple
I have an OpenGL application that uses display lists because my
users frequently want to rotate a scene around after it appears. If
you run the program across the network using glx (i.e. OpenGL
commands moved across the network by X11), the display list is
transferred once and subsequent rotations only have to send a
coordinate transformation across the network. This yields highly
interactive cross-network applications without using extensions like
server-side vertex arrays (in this context the server is the machine
where you are viewing the scene).
I have run my program on various flavors of Unix, Linux, and Windows
and never noticed a significant difference in performance between
direct rendering and using display lists when running locally.
When running under OS X, display lists are roughly half as fast as
direct rendering. I discussed this issue with John Harper
<email@hidden> and it appears that this performance issue has
nothing to do with the X11 server - it seems to be an issue with the
underlying OS X OpenGL implementation.
At this time I have to recommend using direct rendering for programs
running locally on a Mac, but I would still use display lists for
cross-network programs.
I just talked to John and we're seeing good performance using display
lists except in cases where the benchmark creates and destroys the
list each frame, which invalidates the value of using a display list
somewhat.
It could be that you are running on hardware where the display lists
can't fit in VRAM. What graphics card are you running the benchmarks
on?
John
John:
My test creates a display list, then draws it repeatedly from
different viewpoints. I have run the test on a 500 MHz G4 with a 32 MB
ATI Radeon card (I think it is a 7000, and I know it is much better
than the card that came with this G4). I also ran it on a dual 1 GHz
Xserve, which has a fairly low end ATI chip with 32 MB. On both of
these systems, it is roughly twice as fast to do direct rendering as
it is to use a display list for my typical problem size.
I was going to send this message off with just those numbers, but then
I managed to borrow a 1 GHz laptop with a radeon mobility 9000 with 64
MB for the weekend. On that machine, the display list is roughly twice
as fast as using direct rendering. That is more like what I have seen
with PC hardware.
I then went back to the 500 MHz G4 and tried again using roughly 10%
as many triangles as in the previous test on the grounds that the
resulting display list should be small enough to fit in the 32 MB of
graphics memory. The display list runs at 66% of the speed of direct
rendering. A PC with this graphics chip draws faster using display
lists than this G4 does with direct rendering, so I don't think there
is any intrinsic display list bottleneck due to the chip (unless ATI
did something funky in the Mac version of the card).
I don't think I can blame the smaller graphics memory because my
display list is now so small. Is there a chance that something in the
driver reacts badly to display lists unless there is at least 64 MB of
graphics memory?
At this point I don't understand the performance numbers. I would like
to figure out what is going on so that I know whether I need to buy
new graphics cards for all the G4s in my division.
I am glad to see that the laptop behaves reasonably, because that
implies that the current Mac software doesn't prevent good > performance.
Thanks for any further suggestions you can offer,
Steve Langer
Thanks for you the info.
I think this is worth further investigation on our side. If you would,
please write a bug describing the performance issues with the various
hw configs and steps to reproduce the numbers. I'll have someone debug
what's happening in the driver.
John
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.