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
- OpenGL, SDL, graphics, games
- Beginning Game Programming
- Computer Graphics (A course of Computer Graphics from MIT OpenCourseWare)
- OpenGL with Java and here is Tutorials
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.
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.
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.
Some good links:
http://www.glprogramming.com/red/
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index
http://mesa3d.org/
http://www.lighthouse3d.com/opengl/glut/
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.
Beginning OpenGL game programming
Download: http://www.4shared.com/get/7630449/650f4d18/Beginning_Opengl_Game_Programming.html
Advanced Graphics Programming Using OpenGL (http://rapidshare.com/files/103852891/1558606599_Morgan.Kaufmann_-_Advanced.Graphics.Programming.Using.OpenGL.Feb.2005.rar
http://www.swiftless.com/
Games Programming Sites
http://www.codeproject.com/KB/openGL/GLShadingSubdivideSphere.aspx
http://www.c-sharpcorner.com/UploadFile/jeradus/OpenGLBasics11172005014307AM/OpenGLBasics.aspx
http://ozark.hendrix.edu/~burch/cs/490/sched/feb8/
OpenGL Sphere
http://www.sulaco.co.za/tut.htm – OpenGL Tutorials 1
http://www.java-tips.org/other-api-tips/jogl/ – Java OpenGL
Basic OpenGL Lighting – http://www.sjbaker.org/steve/omniv/opengl_lighting.html
OpenGL Tutorials – Nehe, http://nehe.gamedev.net/default.asp
http://steinsoft.net/index.php?site=Programming/Code%20Snippets/OpenGL/
http://basic4gl.wikispaces.com/