Results 1 to 3 of 3

Thread: Visual C++ Design Question

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    Madras, OR
    Posts
    1

    Visual C++ Design Question

    Howdy!
    I'm a beginner at OpenGL.
    I have a question about implentation of OpenGL objects and data manipulation as it might pertain to the view/doc archetecture. I can't decide weather to make the OpenGL engine and objects local to the view or doc archetecture. Or to seperate them. Does anybody have any suggestions? Thanks for any help you might suggest.
    ogre
    It's not a bug.
    It's a feature!

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Visual C++ Design Question

    Hi !

    What I am doing is putting every information about the world in the Document.
    It does not make sense to put them in the View because ONE Document should be for ONE world.
    This does not mean that the View shouldn't have specific members (such as the rendering mode (filled/lines) or the state of the lights (on/off)) but the vertices/normals/maps should belong to the Document.
    You can create a separated class (let's say CModel) and put a member CModel *m_pModel in your Document but this is more or less the same (except that your CModel object can be used in another program more easily !).

    Hope this will help you !

    As far as I am concerned, I have used both methods for different programs.

    Eric

  3. #3
    Member Newbie
    Join Date
    Mar 2000
    Location
    UK
    Posts
    36

    Re: Visual C++ Design Question

    The best way to deal with this sort of problem, is to figure out what information would need to be shared amongst several different views (CView derived objects), and make sure that this is contained in the CDoc.

    Information about objects in the scene would be common to all views, so the neatest OOP way, is to create a load of objects (maybe in a tree structure) which are contained in the CDoc, so that any of the attached views can access this information when required.

    Hope that this makes secnse.

Similar Threads

  1. GLSL design & glVertexAttribPointer question.
    By Red_Riot in forum OpenGL: GLSL
    Replies: 7
    Last Post: 03-10-2011, 03:46 PM
  2. Design Question: How to handle rendering order?
    By Jengu in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-11-2006, 08:18 PM
  3. "Salvation" - Visual OpenGL design
    By Trey in forum OpenGL: Advanced Coding
    Replies: 22
    Last Post: 09-12-2003, 02:17 PM
  4. C++ question on "clean code design"
    By rhmazza in forum OpenGL: Basic Coding
    Replies: 24
    Last Post: 06-28-2002, 04:01 PM
  5. Engine design theory question
    By jefftkd in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 03-01-2002, 03:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean