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>
|
||||
|
@ -1676,10 +1681,12 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
|
|||
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:
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include "GL/glew.h"
|
||||
#endif
|
||||
|
||||
class CGLSL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue