Re: Core Data OpenGL
Re: Core Data OpenGL
- Subject: Re: Core Data OpenGL
- From: Stefan Werner <email@hidden>
- Date: Thu, 22 Feb 2007 18:42:39 +0100
On Feb 22, 2007, at 4:49 PM, Erik Buck wrote:
I use Core Data to store textures as NSData, large point meshes as
NSData, colors as RGBA float attributes, scene graph information as
a graph of Core Data entities, etc.
I have not found that Core Data is particularly unsuited to 3D
OpenGL systems.
Think about it this way: OpenGL should be constrained to the
View layer when using Model/View/Controller (MVC). Core Data is
constrained to representing the Model. There is no coupling
between the Model and the View, so it shouldn't matter how you
represent the Model when using OpenGL. Furthermore, the same Core
Data model should work fine with other View layers such as DirectX
or ray-trace renderers etc.
Correct, the data structure on the model end is usually a winged edge
or half edge structure for polygon modeling, nothing that you would
want to use for OpenGL or ray tracing.
For example, I have a 3D Mesh editor. Each time the user
interactively changes a mesh and particularly when points are added
or removed from a mesh, I update the OpenGL Vertex Buffer or
Display List which takes up to ~400ms to change and redisplay on my
test machine. (it is computationally expensive sometimes) I also
copy the updated mesh as an NSData attribute of an scene graph
entity which only takes ~1ms.
Hm, so for CoreData your mesh is just one big blob of binary? Or does
your Core Data model store individual vertices, edges and faces and
know about their relationships? ~400 ms indicate to me that mesh
sculpting then happens at about 2fps, which - no offense - would not
be suitable for the things I do (think morphing meshes at 30fps).
Stefan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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