Fixed assert macros, and improved error handling.

This commit is contained in:
Бранимир Караџић
2021-10-25 18:59:32 -07:00
parent 6573fc44a8
commit 8392a44b3a
35 changed files with 705 additions and 617 deletions

View File

@@ -46,7 +46,6 @@ function bgfxProjectBase(_kind, _defines)
links {
"bimg",
"bx",
}
configuration { "vs20* or mingw*" }
@@ -95,15 +94,12 @@ function bgfxProjectBase(_kind, _defines)
includedirs {
path.join(BGFX_DIR, "3rdparty"),
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
}
defines (_defines)
links {
"bx",
}
using_bx()
if _OPTIONS["with-glfw"] then
defines {
@@ -111,11 +107,6 @@ function bgfxProjectBase(_kind, _defines)
}
end
configuration { "Debug" }
defines {
"BGFX_CONFIG_DEBUG=1",
}
configuration { "vs* or mingw*", "not durango" }
includedirs {
path.join(BGFX_DIR, "3rdparty/dxsdk/include"),

View File

@@ -7,7 +7,6 @@ project ("example-glue")
kind "StaticLib"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
@@ -17,11 +16,14 @@ project ("example-glue")
path.join(BGFX_DIR, "examples/common/example-glue.cpp"),
}
using_bx()
configuration {}
project ("example-common")
kind "StaticLib"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
@@ -36,6 +38,8 @@ project ("example-common")
path.join(BGFX_DIR, "examples/common/**.h"),
}
using_bx()
if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-gnm"),
{ path.join(BGFX_DIR, "../bgfx-gnm/examples/common/entry/entry_orbis.cpp") }) then
@@ -90,3 +94,5 @@ project ("example-common")
"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
}
premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png"
configuration {}

View File

@@ -220,7 +220,6 @@ function exampleProjectDefaults()
debugdir (path.join(BGFX_DIR, "examples/runtime"))
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
@@ -237,9 +236,10 @@ function exampleProjectDefaults()
"bgfx",
"bimg_decode",
"bimg",
"bx",
}
using_bx()
if _OPTIONS["with-webgpu"] then
usesWebGPU()
end
@@ -500,6 +500,10 @@ function exampleProject(_combined, ...)
end
dofile(path.join(BX_DIR, "scripts/bx.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg_decode.lua"))
dofile "bgfx.lua"
group "libs"
@@ -520,10 +524,6 @@ BGFX_CONFIG = userdefines()
bgfxProject("", "StaticLib", BGFX_CONFIG)
dofile(path.join(BX_DIR, "scripts/bx.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg.lua"))
dofile(path.join(BIMG_DIR, "scripts/bimg_decode.lua"))
if _OPTIONS["with-tools"] then
dofile(path.join(BIMG_DIR, "scripts/bimg_encode.lua"))
end

View File

@@ -23,9 +23,7 @@ project "geometryc"
path.join(BGFX_DIR, "examples/common/bounds.**"),
}
links {
"bx",
}
using_bx();
configuration { "mingw-*" }
targetextension ".exe"

View File

@@ -5,7 +5,6 @@ project ("geometryv")
configuration {}
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
@@ -23,9 +22,10 @@ project ("geometryv")
"bimg_decode",
"bimg",
"bgfx",
"bx",
}
using_bx()
if _OPTIONS["with-sdl"] then
defines { "ENTRY_CONFIG_USE_SDL=1" }
links { "SDL2" }

View File

@@ -601,7 +601,6 @@ project "shaderc"
kind "ConsoleApp"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
@@ -623,7 +622,6 @@ project "shaderc"
}
links {
"bx",
"fcpp",
"glslang",
"glsl-optimizer",
@@ -631,6 +629,8 @@ project "shaderc"
"spirv-cross",
}
using_bx()
files {
path.join(BGFX_DIR, "tools/shaderc/**.cpp"),
path.join(BGFX_DIR, "tools/shaderc/**.h"),

View File

@@ -8,7 +8,6 @@ project "texturec"
kind "ConsoleApp"
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BIMG_DIR, "3rdparty/iqa/include"),
@@ -22,9 +21,10 @@ project "texturec"
"bimg_decode",
"bimg_encode",
"bimg",
"bx",
}
using_bx()
configuration { "mingw-*" }
targetextension ".exe"
links {

View File

@@ -5,7 +5,6 @@ project ("texturev")
configuration {}
includedirs {
path.join(BX_DIR, "include"),
path.join(BIMG_DIR, "include"),
path.join(BGFX_DIR, "include"),
path.join(BGFX_DIR, "3rdparty"),
@@ -23,9 +22,10 @@ project ("texturev")
"bimg_decode",
"bimg",
"bgfx",
"bx",
}
using_bx()
if _OPTIONS["with-sdl"] then
defines { "ENTRY_CONFIG_USE_SDL=1" }
links { "SDL2" }