Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else()
endif()


if(NOT MSVC AND NOT EMSCRIPTEN)
if(UNIX AND NOT EMSCRIPTEN)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")

Expand Down Expand Up @@ -123,8 +123,19 @@ else()
endif()
endif()

# workaround for
# CMake Error at build/_deps/dawn-src/third_party/abseil-cpp/CMake/AbseilDll.cmake:730 (message):
# The compiler defaults to or is configured for C++ < 17. C++ >= 17 is
# required and Abseil and all libraries that use Abseil must use the same C++
# language standard
if(SUPPORT_WGPU_BACKEND)
set(ABSL_INTERNAL_AT_LEAST_CXX17 ON CACHE BOOL "Force C++17 check" FORCE)
set(ABSL_INTERNAL_AT_LEAST_CXX20 ON CACHE BOOL "Force C++20 check" FORCE)
endif()


if(WIN32)
add_compile_definitions(NOMINMAX _CRT_SECURE_NO_WARNINGS) # fix dawn error and silence warnings
endif()

if((SUPPORT_WGPU_BACKEND OR SUPPORT_WGSL_PARSER) AND NOT EMSCRIPTEN)
set(DAWN_IS_IN_USE True)
Expand Down Expand Up @@ -449,8 +460,8 @@ else()
if(SUPPORT_GLSL_PARSER)
list(APPEND raygpu_linked_deps glslang)
endif()
target_include_directories(${raygpu_core_library_name} PRIVATE "amalgamation/vulkan_headers/include") # need for some window backends (RGFW)
if(SUPPORT_VULKAN_BACKEND)
target_include_directories(${raygpu_core_library_name} PRIVATE "amalgamation/vulkan_headers/include")
list(APPEND raygpu_linked_deps wgvk)
else()
list(APPEND raygpu_linked_deps webgpu_dawn)
Expand Down
6 changes: 5 additions & 1 deletion examples/models_forwardkinematics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#include <vector> // For storing points dynamically (optional but clean)
#include <cmath> // For sinf

#ifndef M_PI_2
#define M_PI_2 1.57079632679489661923f
#endif

// --- FK Function adapted for MathUtils.h ---

// Helper to compute the transformation matrix for a single joint (MDH)
Expand Down Expand Up @@ -184,4 +188,4 @@ int main(void) {
//CloseWindow(); // Close window and OpenGL context

return 0;
}
}
4 changes: 3 additions & 1 deletion include/external/sinfl.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ extern int zsinflate(void *out, int cap, const void *in, int size);

#include <string.h> /* memcpy, memset */
#include <assert.h> /* assert */
#if defined(_WIN32) || defined(_WIN64)
#include <intrin.h> /* _BitScanReverse */
#endif

#if defined(__GNUC__) || defined(__clang__)
#define sinfl_likely(x) __builtin_expect((x),1)
Expand Down Expand Up @@ -626,4 +629,3 @@ zsinflate(void *out, int cap, const void *mem, int size) {
}
}
#endif

3 changes: 1 addition & 2 deletions src/platform/InitWindow_RGFW.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ const int keyMappingRGFW_(int RGFWKey){
#endif
#include <external/volk.h>
#define RGFW_VULKAN
#include <external/RGFW.h>
#ifdef _WIN32
#undef AdapterType
#undef ShowCursor
Expand All @@ -286,7 +285,7 @@ const int keyMappingRGFW_(int RGFWKey){
#define RGFW_WASM
#endif
#endif

#include <external/RGFW.h>

#include <internals.h>
#include <renderstate.h>
Expand Down