preparation to replace glew by glad

This commit is contained in:
Erwin Coumans
2018-02-20 19:44:02 -08:00
parent 8bb40b632b
commit b0984de046
21 changed files with 151 additions and 41375 deletions

View File

@@ -35,7 +35,7 @@
if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h")) then
links {"GL"}
else
print("No GL/gl.h found, using dynamic loading of GL using glew")
print("No GL/gl.h found, using dynamic loading of GL using glad")
defines {"GLEW_INIT_OPENGL11_FUNCTIONS=1"}
links {"dl"}
end
@@ -50,24 +50,20 @@
configuration {"Windows"}
defines { "GLEW_STATIC"}
includedirs {
projectRootDir .. "examples/ThirdPartyLibs/Glew"
projectRootDir .. "examples/ThirdPartyLibs/glad"
}
files { projectRootDir .. "examples/ThirdPartyLibs/Glew/glew.c"}
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c"}
end
if os.is("Linux") then
configuration{"Linux"}
if _OPTIONS["enable_system_opengl"] and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/gl.h") and os.isfile("/usr/include/GL/glew.h")) then
links {"GLEW"}
print ("linking against system GLEW")
else
print("Using static glew and dynamic loading of glx functions")
print("Using glad and dynamic loading of glx functions")
defines { "GLEW_STATIC","GLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1"}
includedirs {
projectRootDir .. "examples/ThirdPartyLibs/Glew"
projectRootDir .. "examples/ThirdPartyLibs/glad"
}
files { projectRootDir .. "examples/ThirdPartyLibs/Glew/glew.c"}
files { projectRootDir .. "examples/ThirdPartyLibs/glad/glad.c",
projectRootDir .. "examples/ThirdPartyLibs/glad/glad_glx.c"}
links {"dl"}
end
end
configuration{}