mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Further macosx fixes
This commit is contained in:
parent
db46d18e71
commit
d7eabb0ea9
|
@ -3,7 +3,6 @@ Glew = {
|
|||
local check = function(option, settings)
|
||||
option.value = false
|
||||
option.use_winlib = 0
|
||||
option.use_macosxframwork = 0
|
||||
|
||||
if platform == "win32" then
|
||||
option.value = true
|
||||
|
@ -11,12 +10,6 @@ Glew = {
|
|||
elseif platform == "win64" then
|
||||
option.value = true
|
||||
option.use_winlib = 64
|
||||
elseif platform == "macosx" and string.find(settings.config_name, "32") then
|
||||
option.value = true
|
||||
option.use_macosxframwork = 32
|
||||
elseif platform == "macosx" and string.find(settings.config_name, "64") then
|
||||
option.value = true
|
||||
option.use_macosxframwork = 64
|
||||
elseif platform == "linux" and arch == "ia32" then
|
||||
option.value = true
|
||||
elseif platform == "linux" and arch == "amd64" then
|
||||
|
@ -35,7 +28,7 @@ Glew = {
|
|||
end
|
||||
|
||||
settings.link.libs:Add("glew32")
|
||||
elseif option.use_macosxframwork > 0 then
|
||||
elseif platform == "macosx" then
|
||||
-- no glew
|
||||
else
|
||||
settings.link.libs:Add("GLEW")
|
||||
|
@ -45,7 +38,6 @@ Glew = {
|
|||
local save = function(option, output)
|
||||
output:option(option, "value")
|
||||
output:option(option, "use_winlib")
|
||||
output:option(option, "use_macosxframwork")
|
||||
end
|
||||
|
||||
local display = function(option)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#include <OpenGL/gl3ext.h>
|
||||
#else
|
||||
#include "GL/glew.h"
|
||||
#endif
|
||||
|
@ -1681,7 +1682,7 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#if !defined(CONF_PLATFORM_MACOSX)
|
||||
//support graphic cards that are pretty old(and linux)
|
||||
glewExperimental = GL_TRUE;
|
||||
if (GLEW_OK != glewInit())
|
||||
|
|
|
@ -89,4 +89,4 @@ CGLSL::CGLSL()
|
|||
CGLSL::~CGLSL()
|
||||
{
|
||||
DeleteShader();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <base/detect.h>
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
|
|
|
@ -130,4 +130,4 @@ CGLSLProgram::CGLSLProgram()
|
|||
CGLSLProgram::~CGLSLProgram()
|
||||
{
|
||||
DeleteProgram();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <base/detect.h>
|
||||
|
||||
#if defined(CONF_PLATFORM_MACOSX)
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue