Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 13:41

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Resource cloning
PostPosted: 18.07.2008, 21:41 
Offline

Joined: 03.07.2008, 01:23
Posts: 50
I was trying to clone a camera. Apparently it always returns 0. It's somewhat annoying to find this out *after* reading the documentation. I know there is a TODO in the code, maybe I should read all of those before trying anything new.

IMO, it should throw an exception stating something sensible at the very least.


Top
 Profile  
Reply with quote  
 Post subject: Re: Resource cloning
PostPosted: 18.07.2008, 22:55 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
cantele wrote:
I was trying to clone a camera. Apparently it always returns 0. It's somewhat annoying to find this out *after* reading the documentation. I know there is a TODO in the code, maybe I should read all of those before trying anything new.
You are welcome to implement this feature, and submit a patch - the engine is in beta, so patches are good, and one can't expect everything to work flawlessly from the get go.

Quote:
IMO, it should throw an exception stating something sensible at the very least.
It returns a Null reference on failure, as is consistent with the rest of the API. An exception would not be good, because the public API is accessible from C, which does not support exceptions.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: Resource cloning
PostPosted: 19.07.2008, 20:14 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
cantele wrote:
I was trying to clone a camera. Apparently it always returns 0.

You probably mean the pipeline resource bound to your camera, right? Because a camera is no resource, so cloneResource won't work on it. But I think it is really a good idea to output a debug level warning for unsupported resource types in cloneResource.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group