Results 1 to 2 of 2

Thread: [SDL2.0 & OpenGL] When camera control goes bad...

  1. #1
    Newbie Newbie
    Join Date
    May 2015
    Posts
    2

    [SDL2.0 & OpenGL] When camera control goes bad...

    Good morning,

    I have read several tutorials about Free Fly Cameras : based on SDL2.0 to grab input and control camera look with the mouse. I then tried to make my own but I obviously failed somehow.

    What I have is a camera with a weird behaviour : when I try to look around, the entire space seems translating and rotating around something I do not know.
    Should it be caused from a matrix mode mistake or a matrix calculation error, I am definitely struggling with this one and hope you guys will know how to give me a hint.

    The bad point is that I have absolutely no clue about where it may come from, I'm not a bad C programmer I promise, but this one gives me a hard time ^^. Besides, you will find the source code as an attached document commented with Doxygen.

    Should you need any more information, just ask
    Attached Files Attached Files

  2. #2
    Newbie Newbie
    Join Date
    May 2015
    Posts
    2
    Solution : the first gluLookAt call was executed on GL_PROJECTION matrix, hence entire 3D environment corruption.

Similar Threads

  1. Draw an Image in OpenGL ES like SDL2
    By patty1991 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-09-2018, 05:37 AM
  2. C loading and rendering models (SDL2, glew, OpenGL 3.3)
    By Picpenguin in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-11-2017, 11:57 PM
  3. c++/SDL2/OpenGL ES - Camera without GLUT on Android
    By patty1991 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-10-2015, 01:48 PM
  4. Replies: 0
    Last Post: 09-22-2014, 11:51 PM
  5. Opengl camera control GUI instead of mouse control
    By zhar22 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-17-2013, 09:35 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