mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
No GLEW on OSX necessary (untested)
This commit is contained in:
parent
96bad9f3f2
commit
db46d18e71
|
@ -36,7 +36,7 @@ Glew = {
|
|||
|
||||
settings.link.libs:Add("glew32")
|
||||
elseif option.use_macosxframwork > 0 then
|
||||
--todo
|
||||
-- no glew
|
||||
else
|
||||
settings.link.libs:Add("GLEW")
|
||||
end
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
#define WINVER 0x0501
|
||||
#endif
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include "GL/glew.h"
|
||||
#endif
|
||||
|
||||
#include <base/detect.h>
|
||||
#include <base/math.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1675,11 +1680,13 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
|
|||
dbg_msg("gfx", "unable to create OpenGL context: %s", SDL_GetError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
//support graphic cards that are pretty old(and linux)
|
||||
glewExperimental = GL_TRUE;
|
||||
if (GLEW_OK != glewInit())
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
SDL_GL_GetDrawableSize(m_pWindow, pWidth, pHeight);
|
||||
SDL_GL_SetSwapInterval(Flags&IGraphicsBackend::INITFLAG_VSYNC ? 1 : 0);
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include "GL/glew.h"
|
||||
#endif
|
||||
|
||||
class CGLSL {
|
||||
public:
|
||||
|
@ -16,4 +20,4 @@ private:
|
|||
GLuint m_ShaderID;
|
||||
int m_Type;
|
||||
bool m_IsLoaded;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include "GL/glew.h"
|
||||
#endif
|
||||
|
||||
class CGLSL;
|
||||
|
||||
|
@ -73,4 +77,4 @@ class CGLSLBorderTileLineProgram : public CGLSLTileProgram {
|
|||
public:
|
||||
int m_LocDir;
|
||||
int m_LocNum;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue