Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengtuggy committed Apr 27, 2024
1 parent 9f7a430 commit 55d740d
Show file tree
Hide file tree
Showing 11 changed files with 1,007 additions and 44 deletions.
2 changes: 1 addition & 1 deletion engine/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
"VERBOSE": "ON"
},
"cacheVariables": {
"CMAKE_FIND_FRAMEWORK": "FIRST"
"CMAKE_FIND_FRAMEWORK": "LAST"
}
},
{
Expand Down
10 changes: 6 additions & 4 deletions engine/objconv/basemaker/base_maker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,18 @@
#include <direct.h>
#else
#include <unistd.h>
# define GL_GLEXT_PROTOTYPES 1
#endif
#include <sys/stat.h> //for mkdir
#include <sys/types.h>

#if defined(__APPLE__) && defined(__MACH__)
#include <GLUT/glut.h>
#include <OpenGL/glext.h>
# include <OpenGL/gl.h>
# include <GL/glext.h>
# include <GLUT/glut.h>
#else
#include <GL/glut.h>
#include <GL/glext.h>
# include <GL/glut.h>
# include <GL/glext.h>
#endif

/*
Expand Down
13 changes: 9 additions & 4 deletions engine/objconv/basemaker/sprite.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@
#include "gfx/hud.h"
#include "vs_globals.h"

#if !defined(_WIN32)
# define GL_GLEXT_PROTOTYPES 1
#endif

#if defined(__APPLE__) && defined(__MACH__)
#include <GLUT/glut.h>
#include <OpenGL/glext.h>
# include <OpenGL/gl.h>
# include <GL/glext.h>
# include <GLUT/glut.h>
#else
#include <GL/glut.h>
#include <GL/glext.h>
# include <GL/glut.h>
# include <GL/glext.h>
#endif

#include <iostream>
Expand Down
936 changes: 936 additions & 0 deletions engine/src/OpenGL_downloaded/GL/wgl.h

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions engine/src/gldrv/gl_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ struct GFXStats
#define GL_EXT_color_subtable 1
#endif

#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1

#if !defined (_WIN32)
# define GL_GLEXT_PROTOTYPES 1
#endif

#if defined (_WIN32) || defined (__CYGWIN__)
#ifndef NOMINMAX
#define NOMINMAX
Expand All @@ -105,6 +105,8 @@ struct GFXStats
#if defined(__APPLE__) && defined(__MACH__)
// Try hard-coding this now -- stephengtuggy 2024-04-26
#define OSX_AT_LEAST_10_4
#define GL_GLEXT_FUNCTION_POINTERS 1
#include <OpenGL/gl.h>
#include <GL/glext.h>
#include <GLUT/glut.h>

Expand Down
13 changes: 7 additions & 6 deletions engine/src/gldrv/gl_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#if !defined (_WIN32) && !defined (__CYGWIN__)

#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES 1

#else
#ifndef NOMINMAX
Expand All @@ -53,14 +54,14 @@
// #endif
#include <windows.h>
#endif
#define GL_GLEXT_PROTOTYPES 1
#if defined(__APPLE__) && defined(__MACH__)
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#include <dlfcn.h>
# define GL_GLEXT_FUNCTION_POINTERS 1
# include <OpenGL/gl.h>
# include <GL/glext.h>
# include <dlfcn.h>
#else
#include <GL/gl.h>
#include <GL/glext.h>
# include <GL/gl.h>
# include <GL/glext.h>
#endif
#ifdef GL_EXT_compiled_vertex_array
# ifndef PFNGLLOCKARRAYSEXTPROC
Expand Down
15 changes: 10 additions & 5 deletions engine/src/gldrv/gl_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ extern "C"
/* Shouldn't need to include glext.h if gl.h is recent, but alas we can't
* count on that... */

#if !defined(_WIN32)
#define GL_GLEXT_PROTOTYPES 1
#endif

#if defined (IRIX)
#include <GL/gl.h>
#include <GL/glut.h>
Expand All @@ -62,12 +66,13 @@ typedef void (*PFNGLUNLOCKARRAYSEXTPROC)( void );

#elif !defined (_WIN32)
#if defined(__APPLE__) && defined(__MACH__)
#include <GLUT/glut.h>
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
# define GL_GLEXT_FUNCTION_POINTERS 1
# include <OpenGL/gl.h>
# include <GL/glext.h>
# include <GLUT/glut.h>
#else
#include <GL/glut.h>
#include <GL/glext.h>
# include <GL/glut.h>
# include <GL/glext.h>
#endif

//#if !defined (GL_GLEXT_VERSION) || GL_GLEXT_VERSION < 6
Expand Down
5 changes: 5 additions & 0 deletions engine/src/gui/button.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@
* The only external functions it requires that aren't provided by system libs are in glut_support.h
*/

#if !defined(_WIN32)
#define GL_GLEXT_PROTOTYPES 1
#endif

#if defined(__APPLE__) && defined(__MACH__)
#include <OpenGL/gl.h>
#include <GL/glext.h>
#include <GLUT/glut.h>
#else
#ifdef _WIN32
Expand Down
5 changes: 5 additions & 0 deletions engine/src/gui/text_area.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@
//There are places where a float is converted to an int. This define takes extra steps to convert without a warning (float -> char -> int)
#define NO_WARNINGS

#if !defined(_WIN32)
# define GL_GLEXT_PROTOTYPES 1
#endif

#if defined(__APPLE__) && defined(__MACH__)
#include <OpenGL/gl.h>
#include <GL/glext.h>
#include <GLUT/glut.h>
#else
#ifdef _WIN32
Expand Down
15 changes: 6 additions & 9 deletions engine/src/precompiled.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#if !defined (_WIN32) && !defined (__CYGWIN__)
#include <stdlib.h>
#define GL_GLEXT_PROTOTYPES 1
#else //!defined (_WIN32) && !defined (__CYGWIN__)
#ifndef NOMINMAX
//tells VCC not to generate min/max macros
Expand All @@ -51,13 +52,9 @@
#include <windows.h>
#endif //!defined (_WIN32) && !defined (__CYGWIN__)

#define GL_GLEXT_PROTOTYPES 1

#if defined(__APPLE__) && defined(__MACH__)
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#else //defined (__APPLE__) || defined (MACOSX)
#include <GL/gl.h>
#include <GL/glext.h>
#endif //defined (__APPLE__) || defined (MACOSX)

# include <OpenGL/gl.h>
#else
# include <GL/gl.h>
#endif
#include <GL/glext.h>
29 changes: 17 additions & 12 deletions engine/src/vegastrike.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ extern float AUDIO_ATOM;
#include <stdarg.h>
#include "debug_vs.h"

#if !defined(_WIN32)
# define GL_GLEXT_PROTOTYPES 1
#endif

#if defined (WIN32) || defined (__CYGWIN__)
/* Note that this will define WIN32 for us, if it isn't defined already
*/
Expand All @@ -68,18 +72,19 @@ extern float AUDIO_ATOM;
//#include "command.h"
#endif //defined (WIN32) || defined (__CYGWIN__)

#ifndef NO_GFX
#if defined(__APPLE__) && defined(__MACH__)
#include <OpenGL/gl.h>
// #include <epoxy/glx.h>
#include <GLUT/glut.h>
#else //defined (__APPLE__) || defined (MACOSX)
#define __glext_h_
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#undef __glext_h_
#endif //defined (__APPLE__) || defined (MACOSX)
#if !defined (NO_GFX)
# if defined(__APPLE__) && defined(__MACH__)
# define GL_GLEXT_FUNCTION_POINTERS 1
# include <OpenGL/gl.h>
# include <GL/glext.h>
# include <GLUT/glut.h>
# else //defined(__APPLE__) && defined(__MACH__)
# define __glext_h_
# include <GL/gl.h>
# include <GL/glu.h>
# include <GL/glut.h>
# undef __glext_h_
# endif //defined(__APPLE__) && defined(__MACH__)
#endif //NO_GFX

#define PROG_NAME "vegastrike"
Expand Down

0 comments on commit 55d740d

Please sign in to comment.