Changed Fixed some apple stuff glGenTextures is still generating a bus error because we don't have a gl context yet.
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
#include <GL/glu.h> // Header file for Glu32 library
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
#include <gl.h> // Header file for OpenGL32 library
|
||||
#include <glu.h> // Header file for Glu32 library
|
||||
#include <GL/gl.h> // Header file for OpenGL32 library
|
||||
#include <GL/glu.h> // Header file for Glu32 library
|
||||
#endif
|
||||
#include <math.h>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "window.h"
|
||||
#include "vector.h"
|
||||
#pragma warning(disable: 4786)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Variables
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
#include <gl.h>
|
||||
#include <glu.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
//#include <gl/glaux.h> //Hopefully nothing needs this remove if it works in windows
|
||||
#include <string>
|
||||
@@ -34,7 +34,7 @@ extern OpenArena::Window g_Screen;
|
||||
//int InitGL(GLvoid);
|
||||
namespace OpenArena
|
||||
{
|
||||
bool LoadGLTexture(string , GLuint&, GLuint = GL_LINEAR, GLuint = GL_LINEAR);
|
||||
void FreeGLTexture(GLuint&);
|
||||
bool LoadGLTexture(string , GLuint, GLuint = GL_LINEAR, GLuint = GL_LINEAR);
|
||||
void FreeGLTexture(GLuint);
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
#include <gl.h>
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
@@ -10,8 +10,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <gl.h>
|
||||
#include <glu.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glx.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/xf86vmode.h>
|
||||
@@ -55,7 +56,21 @@ namespace OpenArena
|
||||
Vec2i GetMousePosition();
|
||||
void SetMousePosition(Vec2i pos);
|
||||
|
||||
// #ifdef __linux
|
||||
#ifdef __linux
|
||||
Display* GetDisplay();
|
||||
|
||||
private:
|
||||
Cursor CreateWindowedCursor();
|
||||
Cursor CreateFullscreenCursor();
|
||||
int screen;
|
||||
::Window window;
|
||||
GLXContext hRC;
|
||||
XSetWindowAttributes attributes;
|
||||
bool doubleBuffered;
|
||||
XF86VidModeModeInfo vidMode;
|
||||
int x, y;
|
||||
Display* display;
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
Display* GetDisplay();
|
||||
|
||||
@@ -90,5 +105,9 @@ LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
|
||||
static int attrListSgl[] = {GLX_RGBA, GLX_RED_SIZE, 4, GLX_GREEN_SIZE, 4, GLX_BLUE_SIZE, 4, GLX_DEPTH_SIZE, 16, None};
|
||||
static int attrListDbl[] = {GLX_RGBA, GLX_DOUBLEBUFFER, GLX_RED_SIZE, 4, GLX_GREEN_SIZE, 4, GLX_BLUE_SIZE, 4, GLX_DEPTH_SIZE, 16, None};
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
static int attrListSgl[] = {GLX_RGBA, GLX_RED_SIZE, 4, GLX_GREEN_SIZE, 4, GLX_BLUE_SIZE, 4, GLX_DEPTH_SIZE, 16, None};
|
||||
static int attrListDbl[] = {GLX_RGBA, GLX_DOUBLEBUFFER, GLX_RED_SIZE, 4, GLX_GREEN_SIZE, 4, GLX_BLUE_SIZE, 4, GLX_DEPTH_SIZE, 16, None};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user