Skip to content

Commit

Permalink
Initial commit of freeglut MinGW.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPayne committed Aug 29, 2016
0 parents commit 55626b9
Show file tree
Hide file tree
Showing 55 changed files with 25,809 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore compiled binaries
/bin/
/lib/
/obj/
45 changes: 45 additions & 0 deletions Authors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Pawel W. Olszta <[email protected]>
the person to be blamed for freeglut

Andreas Umbach <[email protected]>
the first person to contribute to the freeglut project,
contributed the cube and sphere geometry code

Steve Baker <[email protected]>
joystick code (from his great PLIB), numerous hints
tips on the freeglut usability
and for taking the project over when Pawel bowed out

Christopher John Purnell
Don Heyse
Dave McClurg
John F. Fay
Norman Vine
Daniel Wagner
Sven Panne <[email protected]>
contributing to the project, using the product, and generally keeping it going

Brian Paul
Eric Sandall
giving us the oomph! to make an official release

James 'J.C.' Jones
designing the new website

John Tsiombikas <[email protected]>
Linux spaceball support, XR&R gamemode, misc linux fixes and breakages

Sylvain Beucler
support for Android, X11/EGL, OpenGL(ES) 2.x, misc fixes

Diederick C. Niehorster
Chris Marshall
Clive McCarthy
Eero Pajarre
Florian Echtler
Matti Lehtonen

Vincent Simonetti
support for BlackBerry

...and all the opengl-gamedev-l people that made Pawel start this project :)
27 changes: 27 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

Freeglut Copyright
------------------

Freeglut code without an explicit copyright is covered by the following
copyright:

Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies or substantial portions of the Software.

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of Pawel W. Olszta shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Pawel W. Olszta.
399 changes: 399 additions & 0 deletions Makefile

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# freeglut MinGW

## Table of Contents

- [Introduction](#introduction)
- [freeglut MinGW Build](#freeglut-mingw-build)
- [Building the Library](#building-the-library)
- [Testing the Library](#testing-the-library)
- [Terms of Use](#terms-of-use)
- [Problems?](#problems)
- [Changelog](#changelog)

## Introduction

(taken from the [freeglut web site](http://freeglut.sourceforge.net/))

FreeGLUT is a free-software/open-source 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 (and hence FreeGLUT) takes care of all the system-specific chores required
for creating windows, initializing OpenGL contexts, and handling input events,
to allow for trully portable OpenGL programs.

## freeglut MinGW Build

freeglut MinGW is a repackaging of the freeglut source code. It removes the
non-Windows source code and adds a Makefile which can be used to build freeglut
with MinGW. The reason for this is because Transmission Zero produces
[freeglut Windows Development Libraries](http://www.transmissionzero.co.uk/software/freeglut-devel/)
for MinGW and MSVC. It was considered important for those two packages to be
binary compatible with each other, and also with the original GLUT for Win32.
The Makefile pulls off a few tricks to make this happen (see
[Advanced MinGW DLL Topics](http://www.transmissionzero.co.uk/computing/advanced-mingw-dll-topics/)
).

There are no functional changes from the official freeglut release, but the
resource script has been modified to identify the DLL as the Transmission Zero
MinGW build. Therefore you can assume that (e.g.) freeglut MinGW v3.0.0-1.tz
functions exactly the same as freeglut v3.0.0.

Note that this source release is not an official release, and is not endorsed by
the freeglut project. For official source releases, please visit the downloads
section of the [freeglut web site](http://freeglut.sourceforge.net/).

## Building the Library

To build the application from the command line with the MinGW C compiler, open a
command prompt, change to the directory containing the Makefile, and run
"mingw32-make". This will produce the freeglut DLL in the "bin" directory, and
the import and static libraries in the "lib" directory. Additionally, you will
need the contents of the "include" directory (include the "GL" directory as-is,
don't try to flatten it).

You can build both x86 and x64 versions of freeglut from the Makefile. The
undecorated stdcall workaround is actually an unnecessary step in a 64 bit
build, as x64 functions are neither decorated nor stdcall. You could modify the
Makefile to produce the x64 DLL and import library in a single step and remove
the stdcall workaround. However, apart from wasting a few CPU cycles, the
workaround is harmless to the 64 bit build, and leaving it there ensures both 32
bit and 64 bit builds are correct.

You can also cross-compile freeglut, e.g. by using MinGW on the Fedora Linux
distribution. Some small tweaks will likely be needed in the Makefile to do
this.

## Testing the Library

To test the library, you can build the
[Hello GLUT](https://github.com/TransmissionZero/Hello-GLUT) application.

## Terms of Use

FreeGLUT is released under the X-Consortium license. Refer to "License.txt" for
terms of use.

## Problems?

If you have any problems or questions, please ensure you have read this readme
file and the
[Using freeglut or GLUT with MinGW](http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/)
article. If you are still having trouble, you can
[get in contact](http://www.transmissionzero.co.uk/contact/).

## Changelog

1. 2016-08-29: Version 3.0.0-1.tz
- Initial public source release.

Transmission Zero
2016-08-29
22 changes: 22 additions & 0 deletions include/GL/freeglut.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef __FREEGLUT_H__
#define __FREEGLUT_H__

/*
* freeglut.h
*
* The freeglut library include file
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include "freeglut_std.h"
#include "freeglut_ext.h"

/*** END OF FILE ***/

#endif /* __FREEGLUT_H__ */
Loading

0 comments on commit 55626b9

Please sign in to comment.