OpenGL Programming

Print Friendly, PDF & Email

Introduction

freeglut vs OpenGlut
freeglut and OpenGlut are open sources to the OpenGL Utility Toolkit (GLUT) library. OpenGL is a sibling of freeglut which belongs to some members of freeglut team.

freeglut vs GLUT
GLUT (pronounced like the glut in gluttony) is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL programming. GLUT provides a portable API so you can write a single OpenGL program that works across all PC and workstation OS platforms.

freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library. GLUT was originally written by Mark Kilgard to support the sample programs in the second edition OpenGL ‘RedBook’. Since then, GLUT has been used in a wide variety of practical applications because it is simple, widely available and highly portable.

GLUT was originally to get a window open as fast as possible with least amount of code possible (for quick OpenGL programs) and for simple keyboard interface.

GLUT (and hence freeglut) allows the user to create and manage windows containing OpenGL contexts on a wide range of platforms and also read the mouse, keyboard and joystick functions.

freeglut is released under the X-Consortium license.

SDL
SDL is also super-portable and very commonly used. SDL has a working fullscreen mode. SDL on the other hand is designed to be used more extensively

(More detailed: http://archives.seul.org/linuxgames/Jun-2002/msg00019.html)
These are useful links

  1. OpenGL, SDL, graphics, games
  2. Beginning Game Programming
  3. Computer Graphics (A course of Computer Graphics from MIT OpenCourseWare)

 

 

 

11 thoughts on “OpenGL Programming

  1. What is OpenGL?

    It is simply a specification that describes a set of functions and the precise behaviours that they must perform (Wikipedia). From this specification, hardware vendors must create implementations – libraries of functions created to match the functions stated in the OpenGL specification, making use of hardware acceleration where possible.

  2. What is Mesa3D?

    Mesa3D is an open source 3D computer graphics library that provides a generic OpenGL implementation for rending three-dimensional graphics on multiple platforms. It was initially developed by Brian Paul in August 1993.

  3. On Linux, we use mesa’s libraries to develop OpenGL applications. We can use the commands:
    sudo apt-get install libgl1-mesa-dev
    to install the header files of OpenGL libraries. Nevertheless:
    Headers compatible with OpenGL are available from the Mesa3D project. In the unlikely event that your distribution does not contain development files for the Mesa3D project, Mesa3D comes equipped with the usual

    ./configure
    make
    make install

    installation procedure; however, BE CAREFUL OF CONFLICTING OPENGL LIBRARIES.

    Mesa’s software implementation may override your distribution’s libraries or libraries manually installed, such as the nVidia or fglrx OpenGL binaries. When this happens, search (slocate or find) all directories listed in /etc/ld.so.conf for libGL.so. Multiple copies of libGL.so under the LD_LIBRARY_PATH, if not referring to the same file, usually indicates a conflict. Remove all but the copy you want executed.

    The headers will be installed to [install_root]/include/GL – on Debian systems, this is /usr/local/include/GL when compiled from source or /usr/include/GL when installed from a pre-built package.

    “Official” OpenGL headers are available from SGI, however, they are hopelessly out of date.

  4. http://www.codeguru.com/forum/showthread.php?t=171444
    Does anyone know where I can find information on how to use the mouse as an input device in openGL? I am wanting to create a menu that pops up when a mouse button is pushed from which I can select changes to make to variables in the code.

    Answer:
    Mouse and menu functions are not actually part of OpenGL, as OpenGL is “device-independent”. Therefore functions like these, as well as simply creating a window, are left to utility libraries, such as AUX or glut.
    Using glut to catch menu, mouse, and keyboard functions.
    Basically, for different functions you specify a
    callback function that is called when a specific type of action occurs. Similar to what you do with glutReshapeFunc(). Let me know if anything is not clear. I did not put this into a code, so there might be typos, but hopefully not.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code

This site uses Akismet to reduce spam. Learn how your comment data is processed.