Results 1 to 3 of 3

Thread: Suggestions regadring First Person View

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2010
    Posts
    213

    Suggestions regadring First Person View

    Hello,

    i needed suggestions regarding implementation of First Person View. What i thought of doing is:
    1)Render the entire scene.

    2)Depending on the input, move the camera using gluLookAt().

    (Well, i had seen an example in NeHe tutorials, which used after seeing which, i thought i can use the above mentioned approach)

    But, is this approach feasible? i mean, is there a better way to do it?

    Also, what strategy(or design) is usually used in Games?
    Any suggestions would be really helpful.

    Thanks.

  2. #2
    Junior Member Newbie
    Join Date
    Sep 2010
    Posts
    3

    Re: Suggestions regadring First Person View

    I'm just a beginner too, so no warranty on this.
    In OpenGL there isn't such a thing like a camera. It's a little bit hard to understand but moving the "camera " is actually moving all objects in the world.
    GluLookAt() creates a matrix.
    All following matrices are multiplied with this matrix and therefore rotated and translated in an appropriate way.

    So 1. Push the Cameras Matrix on top of the Matrix Stack (gluLookAt()
    2. Render the Objects (glVertex3f.....)
    3. Take the Picture ( Viewport, Projection/Orthogonal)
    4. Swap Buffers (if Double Buffered) and/or Flush


    Before starting with coding you should inform yourself about Szenegraphs, GameEngines and maby PhysicEngines this could save you looooots of time.

    There is a good Book called "OpenGL Programming Guide" (Addison-Wesley) which can also be found on the web


    Greets, Yoda

  3. #3
    Senior Member Regular Contributor
    Join Date
    Mar 2010
    Posts
    213

    Re: Suggestions regadring First Person View

    Thanks for the reply yodakohl.

Similar Threads

  1. Switching Between First/Third Person View?
    By Rome_Leader in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-04-2014, 03:22 PM
  2. ? View Matrix: 1st person to 3rd person ?
    By Z-Knight in forum OpenGL: Basic Coding
    Replies: 23
    Last Post: 01-12-2009, 10:38 AM
  3. Rendering the weapon in the first person view.
    By lgc_ustc in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-08-2004, 04:04 AM
  4. first-person view question
    By PSzalapski in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-10-2002, 03:53 PM
  5. 3rd person view...
    By Geniuz in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-08-2001, 05:34 AM

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