Further macosx fixes

This commit is contained in:
Dennis Felsing 2017-10-20 09:31:42 +02:00
parent db46d18e71
commit d7eabb0ea9
6 changed files with 9 additions and 12 deletions

View file

@ -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)

View file

@ -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())

View file

@ -89,4 +89,4 @@ CGLSL::CGLSL()
CGLSL::~CGLSL()
{
DeleteShader();
}
}

View file

@ -1,5 +1,7 @@
#pragma once
#include <base/detect.h>
#if defined(CONF_PLATFORM_MACOSX)
#include <OpenGL/gl3.h>
#else

View file

@ -130,4 +130,4 @@ CGLSLProgram::CGLSLProgram()
CGLSLProgram::~CGLSLProgram()
{
DeleteProgram();
}
}

View file

@ -1,5 +1,7 @@
#pragma once
#include <base/detect.h>
#if defined(CONF_PLATFORM_MACOSX)
#include <OpenGL/gl3.h>
#else