Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 7ff4d7d

Browse files
committed
synchronize freeglut bin/include with 2.8.1 from transmissionzero
The freeglut files were in a bit of a weird state, with version info missing and the binaries having been overwritten at one point, without the includes having been updated, so this commit synchs that to a known and publicly accessible release. As for the glut_util change, i'm not entirely sure why i did that, but i found it in another commit i had made where i had experimentally updated freeglut. Let's hope it helps.
1 parent 5b166e9 commit 7ff4d7d

8 files changed

+1015
-705
lines changed

FreeGLUT/freeglut-Readme.txt

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
freeglut 2.8.1-1.mp for MSVC
2+
3+
This package contains freeglut import libraries, headers, and Windows DLLs.
4+
These allow 32 and 64 bit GLUT applications to be compiled on Windows using
5+
Microsoft Visual C++.
6+
7+
For more information on freeglut, visit http://freeglut.sourceforge.net/.
8+
9+
10+
Installation
11+
12+
Create a folder on your PC which is readable by all users, for example
13+
�C:\Program Files\Common Files\MSVC\freeglut\� on a typical Windows system. Copy
14+
the �lib\� and �include\� folders from this zip archive to that location.
15+
16+
The appropriate freeglut DLL can either be placed in the same folder as your
17+
application, or can be installed in a system-wide folder which appears in your
18+
%PATH% environment variable. Be careful not to mix the 32 bit DLL up with the 64
19+
bit DLL, as they are not interchangeable.
20+
21+
22+
Compiling 32 bit Applications
23+
24+
To create a 32 bit freeglut application, create a new Win32 C++ project in MSVC.
25+
From the �Win32 Application Wizard�, choose a �Windows application�, check the
26+
�Empty project� box, and submit.
27+
28+
You�ll now need to configure the compiler and linker settings. Open up the
29+
project properties, and select �All Configurations� (this is necessary to ensure
30+
our changes are applied for both debug and release builds). Open up the
31+
�general� section under �C/C++�, and configure the �include\� folder you created
32+
above as an �Additional Include Directory�. If you have more than one GLUT
33+
package which contains a �glut.h� file, it�s important to ensure that the
34+
freeglut include folder appears above all other GLUT include folders.
35+
36+
Now open up the �general� section under �Linker�, and configure the �lib\�
37+
folder you created above as an �Additional Library Directory�. A freeglut
38+
application depends on the import libraries �freeglut.lib� and �opengl32.lib�,
39+
which can be configured under the �Input� section. However, it shouldn�t be
40+
necessary to explicitly state these dependencies, since the freeglut headers
41+
handle this for you. Now open the �Advanced� section, and enter �mainCRTStartup�
42+
as the �Entry Point� for your application. This is necessary because GLUT
43+
applications use �main� as the application entry point, not �WinMain��without it
44+
you�ll get an undefined reference when you try to link your application.
45+
46+
That�s all of your project properties configured, so you can now add source
47+
files to your project and build the application. If you want your application to
48+
be compatible with GLUT, you should �#include <GL/glut.h>�. If you want to use
49+
freeglut specific extensions, you should �#include <GL/freeglut.h>� instead.
50+
51+
Don�t forget to either include the freeglut DLL when distributing applications,
52+
or provide your users with some method of obtaining it if they don�t already
53+
have it!
54+
55+
56+
Compiling 64 bit Applications
57+
58+
Building 64 bit applications is almost identical to building 32 bit applications.
59+
When you use the configuration manager to add the x64 platform, it�s easiest to
60+
copy the settings from the Win32 platform. If you do so, it�s then only necessary
61+
to change the �Additional Library Directories� configuration so that it
62+
references the directory containing the 64 bit import library rather
63+
than the 32 bit one.
64+
65+
66+
Problems?
67+
68+
If you have problems using this package (compiler / linker errors etc.), please
69+
check that you have followed all of the steps in this readme file correctly.
70+
Almost all of the problems which are reported with these packages are due to
71+
missing a step or not doing it correctly, for example trying to build a 32 bit
72+
app against the 64 bit import library. If you have followed all of the steps
73+
correctly but your application still fails to build, try building a very simple
74+
but functional program (the example at
75+
http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ works fine
76+
with MSVC). A lot of people try to build very complex applications after
77+
installing these packages, and often the error is with the application code or
78+
other library dependencies rather than freeglut.
79+
80+
If you still can�t get it working after trying to compile a simple application,
81+
then please get in touch via http://www.transmissionzero.co.uk/contact/,
82+
providing as much detail as you can. Please don�t complain to the freeglut guys
83+
unless you�re sure it�s a freeglut bug, and have reproduced the issue after
84+
compiling freeglut from the latest SVN version�if that�s still the case, I�m sure
85+
they would appreciate a bug report or a patch.
86+
87+
88+
Changelog
89+
90+
2013�05�11: Release 2.8.1-1.mp
91+
92+
� First 2.8.1 MSVC release. I�ve built the package using Visual Studio 2012,
93+
and the only change I�ve made is to the DLL version resource�I�ve changed
94+
the description so that my MinGW and MSVC builds are distinguishable from
95+
each other (and other builds) using Windows Explorer.
96+
97+
98+
Martin Payne
99+
2013�05�11
100+
101+
http://www.transmissionzero.co.uk/

FreeGLUT/freeglut.dll

-14.5 KB
Binary file not shown.

FreeGLUT/freeglut.lib

2.2 KB
Binary file not shown.

glut_util.h

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#elif defined(HAVE_FREEGLUT) && (defined(_WIN32) || defined(HAVE_W32API))
77

8+
#define GLUT_DISABLE_ATEXIT_HACK
9+
810
#include "./include/GL/freeglut.h"
911

1012
#elif defined(HAVE_FREEGLUT_H)

include/GL/freeglut.h

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
#ifndef __FREEGLUT_H__
2-
#define __FREEGLUT_H__
3-
4-
/*
5-
* freeglut.h
6-
*
7-
* The freeglut library include file
8-
*
9-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10-
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12-
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13-
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14-
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15-
*/
16-
17-
#include "freeglut_std.h"
18-
#include "freeglut_ext.h"
19-
20-
/*** END OF FILE ***/
21-
22-
#endif /* __FREEGLUT_H__ */
1+
#ifndef __FREEGLUT_H__
2+
#define __FREEGLUT_H__
3+
4+
/*
5+
* freeglut.h
6+
*
7+
* The freeglut library include file
8+
*
9+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
12+
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15+
*/
16+
17+
#include "freeglut_std.h"
18+
#include "freeglut_ext.h"
19+
20+
/*** END OF FILE ***/
21+
22+
#endif /* __FREEGLUT_H__ */

0 commit comments

Comments
 (0)