Subject:
|
Re: New MAC Modeller for LDRAW FILES
|
Newsgroups:
|
lugnet.cad.dev.mac
|
Date:
|
Mon, 24 Feb 2003 19:47:59 GMT
|
Viewed:
|
1558 times
|
| |
| |
In lugnet.cad.dev.mac, Andrew Allan writes:
> Rendering How fast is the rendering relative to the Carbon Version? My
> observations are as follows; on my development machine (Dual 1GHz MDD,
> OS10.2.3, 512k) the actual drawing time seems to be faster than that of
> Ldraw Viewer 0.4.2. I guess the hardware accelerated graphics of Quartz
> Extreme is working. But I do have a problem, as yet when rendering, I have
> not been able to accurately measure the rendering time as, the OS seems to
> send the info to the graphics card and then return directly to program
> operation. As yet I have not been able to get the graphic card to tell the
> program when it has completed rendering (thus offering very little useable
> feedback information for my timers), this make the rotation less smooth than
> the Carbon Version.
If you're using OpenGL, you should be able to call glFinish to force the
drawing to complete. The glFinish command blocks until all previous OpenGL
commands have completed. Do NOT call this command except at the very end of
you frame, because it will slow down rendering substantially if you call it
in the middle of your drawing.
> Chris Rendering, its a bit of both, actually Ive optimised the Cocoa
> version more than the Carbon version, however, the optimisation is more than
> offset by Objective-C which places massive overhead on the system (I guess
> this is the price of more flexibility). For this reason, I did indicate that
> I believe that earlier Macs might be better sticking to the Carbon Version.
> I will however continue to work in this area, as there are some compiler
> settings that might affect this performance for the better.
Objective-C won't have a noticable impact on performance if done carefully.
Objective-C messaging (calling methods on a class) seems like it would
introduce a huge performance hit, but the fact is that this usually isn't
the case.
If you have methods that are being called thousands of times during the
rendering of a single frame, then it can add up. However, if you have this
situation, you can either implement that part as a C function (assuming it
doesn't require access to member variables), or get a function pointer to
the method and call the function pointer directly, passing self as the first
parameter, and @selector(whatever) as the second parameter. I doubt that it
is widely known how to do this, and it does require calling Objective-C
runtime functions to get the function pointer, but it is certainly possible.
--Travis Cobbs
|
|
Message is in Reply To:
| | Re: New MAC Modeller for LDRAW FILES
|
| Thanks for the feedback guys, Its good to see that the program does run and no reported crashes? I will answer some of the comments first, Matt not all parts are drawing; have you set the Ldraw folder location in Preferences yet? Matt part (...) (22 years ago, 24-Feb-03, to lugnet.cad.dev.mac)
|
8 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|