it works i guess?
This commit is contained in:
@@ -5,8 +5,7 @@ if (MSVC)
|
|||||||
|
|
||||||
else()
|
else()
|
||||||
add_compile_options(-g -gcodeview)
|
add_compile_options(-g -gcodeview)
|
||||||
add_link_options(-g -Wl,--pdb=)
|
add_link_options(-fuse-ld=lld -g -Wl,--pdb=)
|
||||||
# add_link_options(-fuse-ld=lld -g -Wl,--pdb=)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set the output directory for built objects.
|
# set the output directory for built objects.
|
||||||
@@ -34,7 +33,6 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/SDL" EXCLUDE_FROM_ALL)
|
|||||||
# BGFX
|
# BGFX
|
||||||
SET(BGFX_BUILD_TOOLS ON)
|
SET(BGFX_BUILD_TOOLS ON)
|
||||||
SET(BGFX_BUILD_EXAMPLES OFF)
|
SET(BGFX_BUILD_EXAMPLES OFF)
|
||||||
#SET(BGFX_CONFIG_MULTITHREADED OFF)
|
|
||||||
add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/bgfx.cmake")
|
add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/bgfx.cmake")
|
||||||
|
|
||||||
target_link_libraries(PuzGame bx bimg bgfx SDL3::SDL3)
|
target_link_libraries(PuzGame bx bimg bgfx SDL3::SDL3)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <bx/string.h>
|
#include <bx/string.h>
|
||||||
|
|
||||||
#define VISUAL_STUDIO
|
//#define VISUAL_STUDIO
|
||||||
|
|
||||||
typedef void (*Startup)(void*);
|
typedef void (*Startup)(void*);
|
||||||
typedef void (*Update)();
|
typedef void (*Update)();
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ namespace Game
|
|||||||
bx::strCat(buffer, sizeof(buffer), FILENAME);
|
bx::strCat(buffer, sizeof(buffer), FILENAME);
|
||||||
bx::strCat(buffer, sizeof(buffer), ".bin");
|
bx::strCat(buffer, sizeof(buffer), ".bin");
|
||||||
|
|
||||||
|
Log("Loading shader at %s", buffer);
|
||||||
|
|
||||||
FILE* file = fopen(buffer, "rb");
|
FILE* file = fopen(buffer, "rb");
|
||||||
fseek(file, 0, SEEK_END);
|
fseek(file, 0, SEEK_END);
|
||||||
long fileSize = ftell(file);
|
long fileSize = ftell(file);
|
||||||
@@ -99,9 +101,10 @@ namespace Game
|
|||||||
|
|
||||||
void GameRendering::Setup(void* window)
|
void GameRendering::Setup(void* window)
|
||||||
{
|
{
|
||||||
|
Log("Game rendering setup...");
|
||||||
bgfx::renderFrame();
|
bgfx::renderFrame();
|
||||||
bgfx::Init init;
|
bgfx::Init init;
|
||||||
init.type = bgfx::RendererType::Direct3D11;
|
init.type = bgfx::RendererType::Direct3D12;
|
||||||
init.debug = true;
|
init.debug = true;
|
||||||
init.callback = &Callback;
|
init.callback = &Callback;
|
||||||
init.platformData.nwh = window;
|
init.platformData.nwh = window;
|
||||||
|
|||||||
Reference in New Issue
Block a user