Skip to content

Commit

Permalink
Fix glew cross compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Safety0ff authored and perim committed Apr 20, 2011
1 parent 1f8736e commit 2cb9d1e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
7 changes: 7 additions & 0 deletions lib/framework/opengl.h
Expand Up @@ -24,6 +24,13 @@
#ifndef __INCLUDED_LIB_FRAMEWORK_OPENGL_H__
#define __INCLUDED_LIB_FRAMEWORK_OPENGL_H__

/*
* glew.h includes inttypes.h under mingw and cygwin
* inttypes.h includes stdint.h
* We need to include wzglobal.h because we must
* define __STDC_LIMIT_MACROS before including stdint.h
*/
#include "lib/framework/wzglobal.h"
#include <GL/glew.h>

#endif
2 changes: 1 addition & 1 deletion lib/ivis_opengl/piedraw.cpp
Expand Up @@ -21,10 +21,10 @@
* Render routines for 3D coloured and shaded transparency rendering.
*/

#include <GL/glew.h>
#include <string.h>

#include "lib/framework/frame.h"
#include "lib/framework/opengl.h"
#include "lib/ivis_opengl/ivisdef.h"
#include "lib/ivis_opengl/imd.h"
#include "lib/ivis_opengl/piefunc.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/piemode.cpp
Expand Up @@ -26,8 +26,8 @@
*/
/***************************************************************************/

#include <GL/glew.h>
#include "lib/framework/frame.h"
#include "lib/framework/opengl.h" // for glew macros

#include <SDL.h>

Expand Down
1 change: 0 additions & 1 deletion lib/ivis_opengl/piestate.cpp
Expand Up @@ -21,7 +21,6 @@
* Renderer setup and state control routines for 3D rendering.
*/

#include <GL/glew.h>
#include "lib/framework/frame.h"

#include <SDL.h>
Expand Down
2 changes: 1 addition & 1 deletion lib/ivis_opengl/tex.cpp
Expand Up @@ -18,8 +18,8 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include <GL/glew.h>
#include "lib/framework/frame.h"
#include "lib/framework/opengl.h"

#if defined(WZ_OS_MAC)
# include <OpenGL/glu.h>
Expand Down
4 changes: 2 additions & 2 deletions src/terrain.cpp
Expand Up @@ -26,13 +26,13 @@
* The technique used it called "texture splatting".
* Every layer only draws the spots where that terrain is, and additive blending is used to make transitions smooth.
* Decals are a kind of hack now, as for some tiles (where decal == true) the old tile is just drawn.
* The water is drawn using the hardcoded page-80 and page-81 textures.
* The water is drawn using the hardcoded page-80 and page-81 textures.
*/

#include <GL/glew.h>
#include <string.h>

#include "lib/framework/frame.h"
#include "lib/framework/opengl.h"
#include "lib/ivis_opengl/ivisdef.h"
#include "lib/ivis_opengl/imd.h"
#include "lib/ivis_opengl/piefunc.h"
Expand Down
7 changes: 3 additions & 4 deletions src/texture.cpp
Expand Up @@ -23,17 +23,16 @@
* This is where we do texture atlas generation.
*/

#include <GL/glew.h>
#include "lib/framework/frame.h"


#include <string.h>

#include "lib/framework/frame.h"

#include <physfs.h>

#include "lib/framework/file.h"
#include "lib/framework/string_ext.h"

#include "lib/framework/opengl.h"
#include "lib/ivis_opengl/pietypes.h"
#include "lib/ivis_opengl/piestate.h"
#include "lib/ivis_opengl/tex.h"
Expand Down

0 comments on commit 2cb9d1e

Please sign in to comment.