Results 1 to 4 of 4

Thread: Please help me to clear up my confusion about OpenGL.

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

    Please help me to clear up my confusion about OpenGL.

    Hi folks,

    I tried to get into OpenGL a couple of times now. Everything was clear while I was working in immediate mode. Well I also did understand how vbo's and voa's work. The problem is I find most of the tutorials on the web incoherent. For example a lot of them use functionality which they describe as deprecated. Plus it seems that every tutorial is using different libraries. There are:

    • GLUT
    • FreeGlut
    • GLU
    • GLFW

    So I am pretty confused. My goals are:
    1. Rendering in retained mode
    2. loading and using shaders
    3. loading + displaying meshes created with Blender (or something similar).

    Maybe at some point I want to process some user input but this is not my main goal. So I generally have two questions:
    1. What are the libraries I need to achive goals 1 + 2? And can someone point me to a tutorial where loading and using shaders is explained well. Please no NeHe, I am getting confused by those tutorials.
    2. What about Vulkan? Is it worth learning OpenGL right now? When is Vulkan coming out? Will it differ much from OpenGL? I read that it will be even more low level than OpenGL? Or would it be smarter to wait for it instead of deep diving into OpenGL right now?

    I would love to learn graphics programming but I do not want it to be DirectX, so I would be very thankful if you give me some advice.

    Regards

    P.S.: If I get it right OpenGL applications can be implemented in both C and C++, what should be my choice here? I have a feeling that most of the tutorials are in C++? What are the pros and cons here?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,100
    Quote Originally Posted by Kaesebrot View Post
    What are the libraries I need to achive goals 1 + 2?
    You don't actually need any of those libraries, although a toolkit such as GLUT (original or FreeGLUT or OpenGLUT) or GLFW or SDL will make it easier, particularly if you want to write cross-platform code.

    You don't need GLU for anything. Much of its functionality doesn't even work in conjunction with shaders or when using a core profile (which is necessary for OpenGL 3 on Macs).

    However, for modern OpenGL, you may want to use GLM for handling matrices.

    Quote Originally Posted by Kaesebrot View Post
    P.S.: If I get it right OpenGL applications can be implemented in both C and C++, what should be my choice here? I have a feeling that most of the tutorials are in C++? What are the pros and cons here?
    OpenGL is a C API, as are most of the libraries (except GLM, which is C++).

    When learning, it's probably better to stick to C (or at least C-like code), as this makes it easier to post snippets of code which other people can understand.

  3. #3
    Newbie Newbie
    Join Date
    Jul 2015
    Posts
    2
    Quote Originally Posted by GClements View Post
    You don't actually need any of those libraries, although a toolkit such as GLUT (original or FreeGLUT or OpenGLUT) or GLFW or SDL will make it easier, particularly if you want to write cross-platform code.
    So of the above mentioned which one would you pick? Which one is most suitable for beginners?

    Btw, I also would rather stick to C but like I said, all the tutorials seem to be written in C++

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,100
    Quote Originally Posted by Kaesebrot View Post
    So of the above mentioned which one would you pick? Which one is most suitable for beginners?
    Personally, I use GLUT for experimental code, SDL (or a full GUI toolkit such as GTK, Qt or wxWidgets) for anything which might have actual requirements. GLUT is the simplest but somewhat limited.

Similar Threads

  1. OpenGL Clear Buffer Crash
    By intenseza in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-18-2013, 05:56 PM
  2. How to clear the screen in openGL
    By gl_siddarth in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 01-12-2012, 02:52 PM
  3. How to clear a region of a window in OpenGL-ES
    By mustaf in forum OpenGL ES
    Replies: 6
    Last Post: 01-14-2009, 09:18 PM
  4. Clear OpenGL command queue
    By TuLKaS in forum OpenGL: Advanced Coding
    Replies: 14
    Last Post: 02-07-2006, 03:10 PM
  5. What to clear when closing an OpenGL windows?
    By Anonymous Coward in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-25-2000, 05: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