Re: Core Data with OpenGL
Re: Core Data with OpenGL
- Subject: Re: Core Data with OpenGL
- From: Richard Somers <email@hidden>
- Date: Mon, 12 Oct 2009 15:30:27 -0600
On Oct 12, 2009, at 2:27 PM, Ben Trumbull wrote:
It sounds like you're trying to create a tight 1:1 binding between
your model objects and controller objects to avoid actually writing
a controller layer.
That may be the case. I am currently using an off the shelf
NSObjectController and NSArrayController.
This is hard, because you're going in the wrong direction. Put a
stake in the ground, that your model objects will never ever call
directly into OpenGL.
I have a collection of model objects in a core data store. I enumerate
all the objects in the store one by one and draw them. It seems only
natural to have the draw method in the model object class. (There are
several examples of sample code from Apple and others where the draw
method is implemented in the model object.)
So you are saying that I should abandon this and put the draw method
somewhere else like in a controller. Perhaps you could fill the
picture in a little more for me. So far I have yet to find any sample
code that is a document based core data application that uses OpenGL.
Richard
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden