Cleanup.
This commit is contained in:
parent
f13e5adf4b
commit
bbd41124b7
@ -163,11 +163,21 @@ function bgfxProjectBase(_kind, _defines)
|
|||||||
path.join(BGFX_DIR, "src/renderer_nvn.h"),
|
path.join(BGFX_DIR, "src/renderer_nvn.h"),
|
||||||
})
|
})
|
||||||
|
|
||||||
if _OPTIONS["webgpu"] then
|
if _OPTIONS["with-webgpu"] then
|
||||||
defines {
|
defines {
|
||||||
"BGFX_CONFIG_RENDERER_WEBGPU=1",
|
"BGFX_CONFIG_RENDERER_WEBGPU=1",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local generator = "out/VS2019"
|
||||||
|
|
||||||
|
includedirs {
|
||||||
|
path.join(DAWN_DIR, "src"),
|
||||||
|
path.join(DAWN_DIR, "src/include"),
|
||||||
|
path.join(DAWN_DIR, "third_party/vulkan-headers/include"),
|
||||||
|
path.join(DAWN_DIR, generator, "gen/src"),
|
||||||
|
path.join(DAWN_DIR, generator, "gen/src/include"),
|
||||||
|
}
|
||||||
|
|
||||||
configuration { "asmjs" }
|
configuration { "asmjs" }
|
||||||
defines {
|
defines {
|
||||||
"BGFX_CONFIG_RENDERER_OPENGL=0",
|
"BGFX_CONFIG_RENDERER_OPENGL=0",
|
||||||
@ -176,15 +186,6 @@ function bgfxProjectBase(_kind, _defines)
|
|||||||
|
|
||||||
configuration { "not asmjs" }
|
configuration { "not asmjs" }
|
||||||
--local generator = "out/Default"
|
--local generator = "out/Default"
|
||||||
local generator = "out/VS2019"
|
|
||||||
|
|
||||||
includedirs {
|
|
||||||
path.join(DAWN_DIR, "src"),
|
|
||||||
path.join(DAWN_DIR, "src/include"),
|
|
||||||
path.join(DAWN_DIR, "third_party/vulkan-headers/include"),
|
|
||||||
path.join(DAWN_DIR, generator, "gen/src"),
|
|
||||||
path.join(DAWN_DIR, generator, "gen/src/include"),
|
|
||||||
}
|
|
||||||
|
|
||||||
configuration { "vs*" }
|
configuration { "vs*" }
|
||||||
defines {
|
defines {
|
||||||
@ -272,7 +273,7 @@ function bgfxProject(_name, _kind, _defines)
|
|||||||
copyLib()
|
copyLib()
|
||||||
end
|
end
|
||||||
|
|
||||||
if _OPTIONS["webgpu"] then
|
if _OPTIONS["with-webgpu"] then
|
||||||
function usesWebGPU()
|
function usesWebGPU()
|
||||||
configuration { "asmjs" }
|
configuration { "asmjs" }
|
||||||
linkoptions {
|
linkoptions {
|
||||||
|
@ -3,11 +3,6 @@
|
|||||||
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||||
--
|
--
|
||||||
|
|
||||||
newoption {
|
|
||||||
trigger = "webgpu",
|
|
||||||
description = "Enable webgpu experimental renderer.",
|
|
||||||
}
|
|
||||||
|
|
||||||
newoption {
|
newoption {
|
||||||
trigger = "with-amalgamated",
|
trigger = "with-amalgamated",
|
||||||
description = "Enable amalgamated build.",
|
description = "Enable amalgamated build.",
|
||||||
@ -53,6 +48,11 @@ newoption {
|
|||||||
description = "Enable building examples.",
|
description = "Enable building examples.",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption {
|
||||||
|
trigger = "with-webgpu",
|
||||||
|
description = "Enable webgpu experimental renderer.",
|
||||||
|
}
|
||||||
|
|
||||||
newaction {
|
newaction {
|
||||||
trigger = "idl",
|
trigger = "idl",
|
||||||
description = "Generate bgfx interface source code",
|
description = "Generate bgfx interface source code",
|
||||||
@ -156,20 +156,31 @@ end
|
|||||||
if not os.isdir(BX_DIR) or not os.isdir(BIMG_DIR) then
|
if not os.isdir(BX_DIR) or not os.isdir(BIMG_DIR) then
|
||||||
|
|
||||||
if not os.isdir(BX_DIR) then
|
if not os.isdir(BX_DIR) then
|
||||||
print("bx not found at " .. BX_DIR)
|
print("bx not found at \"" .. BX_DIR .. "\". git clone https://github.com/bkaradzic/bx?")
|
||||||
end
|
end
|
||||||
|
|
||||||
if not os.isdir(BIMG_DIR) then
|
if not os.isdir(BIMG_DIR) then
|
||||||
print("bimg not found at " .. BIMG_DIR)
|
print("bimg not found at \"" .. BIMG_DIR .. "\". git clone https://github.com/bkaradzic/bimg?")
|
||||||
end
|
end
|
||||||
|
|
||||||
print("For more info see: https://bkaradzic.github.io/bgfx/build.html")
|
print("For more info see: https://bkaradzic.github.io/bgfx/build.html")
|
||||||
os.exit()
|
os.exit()
|
||||||
end
|
end
|
||||||
|
|
||||||
if _OPTIONS["webgpu"] then
|
if _OPTIONS["with-webgpu"] then
|
||||||
DAWN_DIR = os.getenv("DAWN_DIR")
|
DAWN_DIR = os.getenv("DAWN_DIR")
|
||||||
|
|
||||||
|
if not DAWN_DIR then
|
||||||
|
DAWN_DIR = path.getabsolute(path.join(BGFX_DIR, "../dawn"))
|
||||||
|
end
|
||||||
|
|
||||||
|
if not os.isdir(DAWN_DIR) then
|
||||||
|
print("Dawn not found at \"" .. DAWN_DIR .. "\". git clone https://dawn.googlesource.com/dawn?")
|
||||||
|
|
||||||
|
print("For more info see: https://bkaradzic.github.io/bgfx/build.html")
|
||||||
|
os.exit()
|
||||||
|
end
|
||||||
|
|
||||||
_OPTIONS["with-windows"] = "10.0"
|
_OPTIONS["with-windows"] = "10.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -225,7 +236,7 @@ function exampleProjectDefaults()
|
|||||||
"bx",
|
"bx",
|
||||||
}
|
}
|
||||||
|
|
||||||
if _OPTIONS["webgpu"] then
|
if _OPTIONS["with-webgpu"] then
|
||||||
usesWebGPU()
|
usesWebGPU()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user