cocoa - Best way to create an MVC paradigm using OpenGL? -


i beginning learn opengl development, using mac os x , cocoa and/or cgl api's, use classes examples, question more design rather particular implementation. here's situation:

i have 'scene' object, can contain or reference data render itself, , responds 'render' message draw itself, without transformations.

i have nsview or nsopenglview object creates openglcontext , pixelformats, resizes view, , updates modelview , projection based on transformations passed it. view object contains camera struct basis opengl transformations.

i have controller object nsresponder object, , responds user inputs.

i don't know if best arrangement; 'model' in case should scene, , suppose classically controller should mediate action between model , view, seems odd view send [[controller scene] render] every time wants draw view.

and not sure if best place 'camera' in view. should have scene object include camera looking @ it, , have respond ui input controller, passed view?

or wrong approach altogether? trying shoehorn mvc isn't meant it. curious sort of design patterns people out there use opengl.

i see way described. view designed control view point , projection, keeping camera reference in logical. scene, on other side, works pure data container me, not touching rendering methods, contrary model.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -