add gpu_initialize demo (to display OpenCL devices using Gwen/OpenGL 3.x instead of Glut
This commit is contained in:
84
demo/gpu_initialize/premake4.lua
Normal file
84
demo/gpu_initialize/premake4.lua
Normal file
@@ -0,0 +1,84 @@
|
||||
function createProject(vendor)
|
||||
|
||||
hasCL = findOpenCL(vendor)
|
||||
|
||||
if (hasCL) then
|
||||
|
||||
project ("OpenCL_GUI_Intialize_" .. vendor)
|
||||
|
||||
initOpenCL(vendor)
|
||||
|
||||
language "C++"
|
||||
|
||||
kind "ConsoleApp"
|
||||
targetdir "../../bin"
|
||||
|
||||
includedirs {
|
||||
"..",
|
||||
"../../opencl",
|
||||
"../../btgui",
|
||||
"../../src",
|
||||
}
|
||||
|
||||
links {
|
||||
"gwen"
|
||||
}
|
||||
|
||||
|
||||
initOpenGL()
|
||||
initGlew()
|
||||
|
||||
files {
|
||||
"main.cpp",
|
||||
"../../opencl/basic_initialize/b3OpenCLUtils.cpp",
|
||||
"../../opencl/basic_initialize/b3OpenCLUtils.h",
|
||||
"../../btgui/OpenGLWindow/GLInstancingRenderer.cpp",
|
||||
"../../btgui/OpenGLWindow/GLInstancingRenderer.h",
|
||||
"../../btgui/OpenGLWindow/GLPrimitiveRenderer.h",
|
||||
"../../btgui/OpenGLWindow/GLPrimitiveRenderer.cpp",
|
||||
"../../btgui/OpenGLWindow/LoadShader.cpp",
|
||||
"../../btgui/OpenGLWindow/LoadShader.h",
|
||||
"../../btgui/OpenGLWindow/TwFonts.cpp",
|
||||
"../../btgui/OpenGLWindow/TwFonts.h",
|
||||
"../../btgui/OpenGLWindow/GwenOpenGL3CoreRenderer.h",
|
||||
"../../btgui/FontFiles/OpenSans.cpp",
|
||||
"../../btgui/OpenGLTrueTypeFont/fontstash.cpp",
|
||||
"../../btgui/OpenGLTrueTypeFont/fontstash.h",
|
||||
"../../btgui/OpenGLTrueTypeFont/opengl_fontstashcallbacks.cpp",
|
||||
"../../btgui/OpenGLTrueTypeFont/opengl_fontstashcallbacks.h",
|
||||
"../../src/Bullet3Geometry/b3ConvexHullComputer.cpp",
|
||||
"../../src/Bullet3Geometry/b3ConvexHullComputer.h",
|
||||
"../../src/Bullet3Common/b3AlignedAllocator.cpp",
|
||||
"../../src/Bullet3Common/b3Quickprof.cpp",
|
||||
"../../src/Bullet3Common/b3Quickprof.h"
|
||||
}
|
||||
|
||||
if os.is("Windows") then
|
||||
files{
|
||||
"../../btgui/OpenGLWindow/Win32OpenGLWindow.cpp",
|
||||
"../../btgui/OpenGLWindow/Win32OpenGLWindow.h",
|
||||
"../../btgui/OpenGLWindow/Win32Window.cpp",
|
||||
"../../btgui/OpenGLWindow/Win32Window.h",
|
||||
}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
files {
|
||||
"../../btgui/OpenGLWindow/X11OpenGLWindow.cpp",
|
||||
"../../btgui/OpenGLWindow/X11OpenGLWindows.h"
|
||||
}
|
||||
end
|
||||
if os.is("MacOSX") then
|
||||
links {"Cocoa.framework"}
|
||||
files {
|
||||
"../../btgui/OpenGLWindow/MacOpenGLWindow.h",
|
||||
"../../btgui/OpenGLWindow/MacOpenGLWindow.mm",
|
||||
}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
createProject("Apple")
|
||||
createProject("AMD")
|
||||
createProject("Intel")
|
||||
createProject("NVIDIA")
|
||||
Reference in New Issue
Block a user