it works i guess?

This commit is contained in:
Asuro
2025-02-08 23:04:17 +01:00
parent 7e405aee75
commit fbed568fae
3 changed files with 6 additions and 5 deletions

View File

@@ -5,8 +5,7 @@ if (MSVC)
else()
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()
# set the output directory for built objects.
@@ -34,7 +33,6 @@ add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/SDL" EXCLUDE_FROM_ALL)
# BGFX
SET(BGFX_BUILD_TOOLS ON)
SET(BGFX_BUILD_EXAMPLES OFF)
#SET(BGFX_CONFIG_MULTITHREADED OFF)
add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/bgfx.cmake")
target_link_libraries(PuzGame bx bimg bgfx SDL3::SDL3)

View File

@@ -6,7 +6,7 @@
#include <cstdio>
#include <bx/string.h>
#define VISUAL_STUDIO
//#define VISUAL_STUDIO
typedef void (*Startup)(void*);
typedef void (*Update)();

View File

@@ -83,6 +83,8 @@ namespace Game
bx::strCat(buffer, sizeof(buffer), FILENAME);
bx::strCat(buffer, sizeof(buffer), ".bin");
Log("Loading shader at %s", buffer);
FILE* file = fopen(buffer, "rb");
fseek(file, 0, SEEK_END);
long fileSize = ftell(file);
@@ -99,9 +101,10 @@ namespace Game
void GameRendering::Setup(void* window)
{
Log("Game rendering setup...");
bgfx::renderFrame();
bgfx::Init init;
init.type = bgfx::RendererType::Direct3D11;
init.type = bgfx::RendererType::Direct3D12;
init.debug = true;
init.callback = &Callback;
init.platformData.nwh = window;