Results 1 to 8 of 8

Thread: Installation, IDEs and a very newbie student

  1. #1
    Newbie Newbie
    Join Date
    Sep 2016
    Posts
    2

    Installation, IDEs and a very newbie student

    Hi, i'm new in this, and i dont know how start in OpenGL programming, i've downloaded freeglut, but, i don't know if i've correctly installed, because, the IDE (codeblocks) send me a message :
    "undefined reference to gluLookAt "

    How can i fix it, and at least, how can i install the necessary for start correctly in this world.

    Thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2016
    Posts
    477
    you essentially need 2 different libraries:
    -- 1 to be able to create a window (which has nothing todo with opengl, example: GLFW)
    -- and 1 to make opengl functionality available in your application (example: GLEW)

    there are many youtube videos that shows step-bystp what to do ..
    https://www.youtube.com/watch?v=CBNoa3ZxUq4
    https://www.youtube.com/watch?v=DxNl...io-ywh&index=2

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    3,100
    Quote Originally Posted by JdeAses View Post
    the IDE (codeblocks) send me a message :
    "undefined reference to gluLookAt "
    That function is provided by the GLU library, which is commonly used by a lot of legacy OpenGL code. It's less used with modern OpenGL code as many of the functions (including that one) only work with a compatibility profile context or an older version of OpenGL.

    Quote Originally Posted by john_connor View Post
    you essentially need 2 different libraries:
    -- 1 to be able to create a window (which has nothing todo with opengl, example: GLFW)
    It's not really accurate to say that it's "nothing to do with OpenGL". Apart from a window, you also need an OpenGL context.

    You don't actually need a library to do that for you, but doing it yourself is a fair amount of work, requires some fairly specific knowledge, and the code involved is highly platform-specific (so it's even more work if you want to support multiple platforms). So you're better off using GLUT, GLFW or SDL if you want a window (possibly a full-screen window) for OpenGL rendering, or a GUI toolkit such as GTK, Qt, or wxWidgets if you want GUI features.

    Quote Originally Posted by john_connor View Post
    you essentially need 2 different libraries:
    -- and 1 to make opengl functionality available in your application (example: GLEW)
    GLEW (or GL3W) is very useful if you want to use modern OpenGL on Windows. It isn't needed if you only need OpenGL 1.1 or are using other platforms. It isn't strictly necessary on any platform, but if you're using modern OpenGL on Windows, you'll need to query a lot of function pointers with wglGetProcAddress() if you aren't having a library such as GLEW handle it for you.

    Also, GLEW can be a bit tricky to use; follow the instructions closely.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    459
    You first need to check if glu.lib (or glu32.lib) is available in the library path of your IDE. If so, just add glu or glu32 to your linker, ie:

    Code :
    -lglu32

    If you don't have it, then you'll probably have to compile it. Mesa provides an implementation of glu.

    This tutorial seems to explain in detail how to use glut under your IDE.

  5. #5
    Newbie Newbie
    Join Date
    Sep 2016
    Posts
    2
    Thank you guys, I typed on Codeblocks -lglu32 and the code works

    Now, another advice about beggining in OpenGL?

  6. #6
    Senior Member Regular Contributor
    Join Date
    Apr 2012
    Location
    Los Angeles
    Posts
    394
    Codeblocks provides a sample opengl project. That's how I got started. It was very easy.

  7. #7
    Senior Member Regular Contributor
    Join Date
    Jul 2012
    Posts
    459
    I suggest this tutorial in order to begin with modern OpenGL. It might not be the best, but it covers the main functionalities.

  8. #8

    Modern OpenGL Tutorial Series

    We have created a Modern OpenGL tutorial series https://www.youtube.com/playlist?lis...ZYV-6g6n62vet8

Similar Threads

  1. IDEs for OpenCL development ?
    By stenlee in forum OpenCL
    Replies: 2
    Last Post: 07-20-2012, 09:14 AM
  2. open gl help student
    By Donny T in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 03-16-2010, 12:38 AM
  3. Replies: 6
    Last Post: 05-07-2009, 03:30 PM
  4. 3rd Year CS Student Project Problem
    By LondonStudent in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 11-03-2006, 12:22 PM
  5. Ides for senior project?
    By detzel in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 12-13-2002, 04:46 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