Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: OpenGL tutorials for linux!

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2006
    Location
    Boston, MA
    Posts
    5

    OpenGL tutorials for linux!

    Hey everyone!!! I am a research intern and I'm in the process of learning OpenGL. I have found alot of very useful tutorials, but almost all that I found are for use with Visual C++. This has been distressing since I tried to convert it to be used on Linux without much success I would greatly appreciate it if someone could inform me of a website or a book I can use to rectify this problem or a better way to convert the code to be compatible with Linux! Thanks alot and enjoy your day!!

    PS I downloaded the code from NeHe's tutorial that was adapted for Linux but they added libraries that are not on my computer and that I haven been unable to find on the net. libraries such as:
    #include <X11/extensions/xf86vmode.h>
    #include <X11/keysym.h>

    so although the code is compiling I am unable to close the window and it freezes the computer

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: OpenGL tutorials for linux!

    For starting OpenGL I would recommend using glut instead of writing the windowing routines yourself. You can always change that later, but for starting it's good enough.

    Use the NeHe tutorial for Mac, it should work on Linux without modification. It may be that you need to install glut (or freeglut) on your box, but most distributions have it preinstalled.

  3. #3
    Intern Newbie
    Join Date
    Jan 2005
    Posts
    37

    Re: OpenGL tutorials for linux!

    I agree that using glut to get started is much easier than writing code for the operating system. It will also make the applications that much easier to move around later.

    If you take the Mac versions of nehe's tutorials the only changes you should have to make are when including the header files:
    change <OpenGL/gl.h> to <GL/gl.h>
    <OpenGL/glu.h> -> <GL/glu.h>
    <GLUT/glut.h> -> <GL/glut.h>

    also, obviously you won't be able to use the xcode project so just remember to link all the libraries when you compile.

    check this out if you want to, it is a small demo application
    that I've had around that runs on linux. It depends on the GLEW library so you'd have to downlaod that if you wanted to try it.
    However, it would show you an OpenGL application on linux.

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: OpenGL tutorials for linux!

    The Mac OS X Using GLUT lesson is a bit skinny, use either the gameglut port or theLinux/SDL one

    As for lesson01, i am happy to report that both versions of the new lesson01 will be system independent(glut and SDL), we allready have (semi)working versions of both, we just need to add some l33tness to it.
    But as for when it's released, that's anyones guess, it could be next week or next month, who knows.

  5. #5
    Intern Newbie
    Join Date
    Jan 2002
    Location
    Steamboat Springs, CO, USA
    Posts
    43

    Re: OpenGL tutorials for linux!

    The Mesa distribution includes quite a few example programs, both GLUT and GLX-based.

  6. #6
    Guest

    Re: OpenGL tutorials for linux!

    http://www.codesampler.com/linuxsrc.htm

    these are simple single file sources and seem to be a good start.

    Don't need any libraries apart from some which are part of X and OGL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •