1 Star 0 Fork 0

xiaochongzi/ioq3-renderer-bgfx

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
renderer_bgfx.lua 5.77 KB
一键复制 编辑 原始数据 按行查看 历史
Jonathan Young 提交于 2018-02-05 20:33 . Update bgfx.
function rendererProject(engine, lightBakerEnabled, rendererPath)
project "renderer_bgfx"
kind "SharedLib"
language "C++"
rtti "Off"
targetprefix ""
defines
{
"__STDC_CONSTANT_MACROS",
"__STDC_FORMAT_MACROS",
"__STDC_LIMIT_MACROS",
"BGFX_CONFIG_RENDERER_OPENGL=32",
"BGFX_CONFIG_RENDERDOC_LOG_FILEPATH=\"ioq3-renderer-bgfx\"",
"USE_RENDERER_DLOPEN"
}
if lightBakerEnabled then
defines { "USE_LIGHT_BAKER" }
end
local bxPath = path.join(rendererPath, "code/bx")
local bimgPath = path.join(rendererPath, "code/bimg")
local bgfxPath = path.join(rendererPath, "code/bgfx")
files
{
path.join(bxPath, "include/bx/*.h"),
path.join(bxPath, "include/bx/inline/*.inl"),
path.join(bxPath, "src/allocator.cpp"),
path.join(bxPath, "src/bx.cpp"),
path.join(bxPath, "src/commandline.cpp"),
path.join(bxPath, "src/crtnone.cpp"),
path.join(bxPath, "src/debug.cpp"),
path.join(bxPath, "src/dtoa.cpp"),
path.join(bxPath, "src/file.cpp"),
path.join(bxPath, "src/filepath.cpp"),
path.join(bxPath, "src/hash.cpp"),
path.join(bxPath, "src/math.cpp"),
path.join(bxPath, "src/mutex.cpp"),
path.join(bxPath, "src/os.cpp"),
path.join(bxPath, "src/process.cpp"),
path.join(bxPath, "src/semaphore.cpp"),
path.join(bxPath, "src/sort.cpp"),
path.join(bxPath, "src/string.cpp"),
path.join(bxPath, "src/thread.cpp"),
path.join(bxPath, "src/timer.cpp"),
path.join(bimgPath, "include/bimg/*.h"),
path.join(bimgPath, "src/image.cpp"),
path.join(bimgPath, "src/image_gnf.cpp"),
path.join(bimgPath, "src/*.h"),
path.join(bgfxPath, "include/bgfx/*.h"),
path.join(bgfxPath, "src/bgfx.cpp"),
--path.join(bgfxPath, "src/glcontext_egl.cpp"),
path.join(bgfxPath, "src/glcontext_glx.cpp"),
path.join(bgfxPath, "src/glcontext_wgl.cpp"),
path.join(bgfxPath, "src/hmd.cpp"),
--path.join(bgfxPath, "src/hmd_ovr.cpp"),
--path.join(bgfxPath, "src/hmd_openvr.cpp"),
path.join(bgfxPath, "src/debug_renderdoc.cpp"),
path.join(bgfxPath, "src/nvapi.cpp"),
path.join(bgfxPath, "src/renderer_d3d9.cpp"),
path.join(bgfxPath, "src/renderer_d3d11.cpp"),
path.join(bgfxPath, "src/renderer_d3d12.cpp"),
path.join(bgfxPath, "src/renderer_noop.cpp"),
path.join(bgfxPath, "src/renderer_gl.cpp"),
path.join(bgfxPath, "src/renderer_vk.cpp"),
path.join(bgfxPath, "src/renderer_gnm.cpp"),
path.join(bgfxPath, "src/shader_dxbc.cpp"),
path.join(bgfxPath, "src/shader_dx9bc.cpp"),
path.join(bgfxPath, "src/shader_spirv.cpp"),
path.join(bgfxPath, "src/topology.cpp"),
path.join(bgfxPath, "src/vertexdecl.cpp"),
path.join(bgfxPath, "src/*.h"),
path.join(rendererPath, "code/math/*.cpp"),
path.join(rendererPath, "code/math/*.h"),
path.join(rendererPath, "code/renderer_bgfx/*.cpp"),
path.join(rendererPath, "code/renderer_bgfx/*.h"),
path.join(rendererPath, "shaders/*.hlsl"),
path.join(rendererPath, "shaders/*.sc"),
path.join(rendererPath, "shaders/*.sh"),
}
if not lightBakerEnabled then
excludes { path.join(rendererPath, "code/renderer_bgfx/LightBaker*") }
end
includedirs
{
path.join(bxPath, "include"),
path.join(bimgPath, "include"),
path.join(bimgPath, "3rdparty"),
path.join(bimgPath, "3rdparty/nvtt"),
path.join(bimgPath, "3rdparty/iqa/include"),
path.join(bgfxPath, "include"),
path.join(bgfxPath, "3rdparty"),
path.join(bgfxPath, "3rdparty/dxsdk/include"),
path.join(bgfxPath, "3rdparty/khronos"),
path.join(rendererPath, "code/stb")
}
vpaths
{
["shaders"] = path.join(rendererPath, "shaders/*.*"),
["*"] = path.join(rendererPath, "code")
}
-- Workaround os.outputof always being evaluated, even if in a configuration block that doesn't apply to the current environment.
local linuxSdlCflags = nil
local linuxArchDefine = nil
if os.ishost("linux") then
linuxSdlCflags = os.outputof("pkg-config --silence-errors --cflags sdl2")
linuxArchDefine = "ARCH_STRING=" .. os.outputof("uname -m")
end
if engine == "ioq3" then
defines "ENGINE_IOQ3"
configuration "x86"
targetname "renderer_bgfx_x86"
configuration "x86_64"
targetname "renderer_bgfx_x86_64"
elseif engine == "iortcw" then
defines "ENGINE_IORTCW"
configuration "x86"
targetname "renderer_sp_bgfx_x86"
configuration "x86_64"
targetname "renderer_sp_bgfx_x86_64"
end
configuration "Debug"
defines "BGFX_CONFIG_DEBUG=1"
configuration "gmake"
buildoptions "-std=c++11"
configuration "linux"
buildoptions
{
linuxSdlCflags,
"-std=c++11"
}
defines(linuxArchDefine)
links
{
"dl",
"GL",
"pthread",
"rt",
"SDL2",
"X11"
}
linkoptions "-Wl,--no-undefined"
configuration "vs*"
buildoptions { "/wd\"4316\"", "/wd\"4351\"" } -- Silence some warnings
includedirs(path.join(bxPath, "include/compat/msvc"))
pchheader "Precompiled.h"
pchsource(path.join(rendererPath, "code/renderer_bgfx/Precompiled.cpp"))
configuration "windows"
defines { "BGFX_CONFIG_RENDERER_DIRECT3D11=1", "BGFX_CONFIG_RENDERER_DIRECT3D12=1" }
links { "d3dcompiler", "gdi32", "OpenGL32", "psapi" }
configuration { "windows", "gmake" }
includedirs(path.join(bxPath, "include/compat/mingw"))
linkoptions { "-static-libgcc", "-static-libstdc++", "-Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic" }
configuration { "windows", "gmake", "mingw=mingw" }
gccprefix "mingw32-"
configuration { "windows", "gmake", "mingw=mingw-pc", "x86" }
gccprefix "i686-pc-mingw32-"
configuration { "windows", "gmake", "mingw=mingw-w64", "x86" }
gccprefix "i686-w64-mingw32-"
configuration { "windows", "gmake", "mingw=mingw-pc", "x86_64" }
gccprefix "x86_64-pc-mingw32-"
configuration { "windows", "gmake", "mingw=mingw-w64", "x86_64" }
gccprefix "x86_64-w64-mingw32-"
configuration {}
filter("files:not " .. path.getrelative(path.getabsolute("."), path.join(rendererPath, "code/renderer_bgfx/*.cpp")))
flags "NoPCH"
filter {}
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xsrc/ioq3-renderer-bgfx.git
git@gitee.com:xsrc/ioq3-renderer-bgfx.git
xsrc
ioq3-renderer-bgfx
ioq3-renderer-bgfx
master

搜索帮助