This commit is contained in:
Asuro
2025-02-08 13:52:10 +01:00
parent c868a3c43e
commit 149de529e6
6 changed files with 9 additions and 9 deletions

View File

@@ -23,10 +23,10 @@ add_library(PuzGame SHARED ${sources_game})
set_property(TARGET PuzGame PROPERTY CXX_STANDARD 17) set_property(TARGET PuzGame PROPERTY CXX_STANDARD 17)
SET(BGFX_BUILD_TOOLS ON) SET(BGFX_BUILD_TOOLS ON)
SET(BGFX_BUILD_EXAMPLES OFF) SET(BGFX_BUILD_EXAMPLES ON)
SET(BGFX_CONFIG_MULTITHREADED 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) target_link_libraries(PuzGame bx bimg bgfx)
target_link_libraries(PuzGameEngine bx bimg bgfx) target_link_libraries(PuzGameEngine bx)
set_target_properties(PuzGame PROPERTIES OUTPUT_NAME "PuzGame2") set_target_properties(PuzGame PROPERTIES OUTPUT_NAME "PuzGame2")

View File

@@ -5,7 +5,6 @@
#include <cstdio> #include <cstdio>
#include <bx/string.h> #include <bx/string.h>
#include <bgfx/bgfx.h>
#define VISUAL_STUDIO #define VISUAL_STUDIO

View File

@@ -94,8 +94,8 @@ namespace Game
{ {
bgfx::Init init; bgfx::Init init;
init.type = bgfx::RendererType::OpenGL; init.type = bgfx::RendererType::OpenGL;
init.debug = true; //init.debug = true;
init.callback = &Callback; //init.callback = &Callback;
init.platformData.nwh = (void*)window; init.platformData.nwh = (void*)window;
init.platformData.ndt = nullptr; init.platformData.ndt = nullptr;
init.platformData.type = bgfx::NativeWindowHandleType::Default; init.platformData.type = bgfx::NativeWindowHandleType::Default;
@@ -152,7 +152,7 @@ namespace Game
| BGFX_STATE_WRITE_A | BGFX_STATE_WRITE_A
| BGFX_STATE_WRITE_Z | BGFX_STATE_WRITE_Z
| BGFX_STATE_DEPTH_TEST_LESS | BGFX_STATE_DEPTH_TEST_LESS
| BGFX_STATE_CULL_CW | BGFX_STATE_CULL_CW
| BGFX_STATE_MSAA | BGFX_STATE_MSAA
; ;

View File

@@ -1,4 +1,5 @@
$input v_color0 $input v_color0
#include "common.sh" #include "common.sh"
void main() void main()

View File

@@ -5,6 +5,6 @@ $output v_color0
void main() void main()
{ {
gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0));
v_color0 = a_color0; v_color0 = a_color0;
} }