gnu3dkit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu3dkit-dev] Strings and parameter lists


From: Brent Gulanowski
Subject: Re: [Gnu3dkit-dev] Strings and parameter lists
Date: Tue, 11 Feb 2003 18:42:41 -0500


On Sunday, February 9, 2003, at 03:51  PM, Philippe C.D. Robert wrote:

Hi,

working on the renderer API I encounter some problem/issues with strinsgs. In RenderMan everything is handled via C strings (tokens), back in the NEXTSTEP days this would have been used directly 'as is'. Now since OpenStep the use of NSString is recommended and C strings are more or less banned from the API although this imposes some overhead. My problem now is how to map the RenderMan C interface to a proper G3DRenderer Objective-C interface: should we use plain C strings or NSStrings?

Moreover RenderMan uses parameter lists in many places which could be handled either via variable argument lists or NSDictionary objects. I'd prefer to use the latter (from an OO perspective), but I'd like to hear your opinion on that as well before I go on here.

So the main question here is probably whether we want to design a pure Objective-C API or mix it with a C interface. Again, I'd choose the Objective-C approach, but...

What do you think?

I am most happy to choose the Objective-C approach as well. I see it as better for getting the design put in place first.

While I still have not learned RenderMan (hence my failure to contribute much here), I am intrigued by the idea of using the RIB as not only a file format, but as a means of passing rendering instructions to the renderer. There are many questions I will have to answer for myself before I can discern if this is feasible.

What if we had a means to convert a RIB file, as a single string or data stream, to and from a dictionary or NSString? I am still thinking that using RIB as our "native" file format is not very Cocoa-like.

Brent Gulanowski
--
Ten thousand years ago, the state of the art was a goat. -- Cory Doctorow





reply via email to

[Prev in Thread] Current Thread [Next in Thread]