diff --git a/README.md b/README.md index 3e662f8..dd1f7b6 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,14 @@ workdir/ Download SDK for your OS and drag bella_engine_sdk into your workdir -[bella_engine_sdk MacOS](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.dmg) -[bella_engine_sdk Linux](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.tar.gz) -[bella_engine_sdk Win](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.zip) +- [bella_engine_sdk MacOS](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.dmg) +- [bella_engine_sdk Linux](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.tar.gz) +- [bella_engine_sdk Win](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.zip) -MacOS/Linux -extra linux +# MacOS/Linux + +extra linux dependencies ``` apt install libx11-dev apt install xorg-dev @@ -40,9 +41,17 @@ cd poomer-raylib-bella_onimage make ``` -Windows +# Windows ``` -[TODO] document how to build raylib +cd workdir +git clone https://github.com/raysan5/raylib.git +cd raylib +mkdir build +cd build +cmake .. +msbuild raylib.sln /p:Configuration=Release +cd ../.. +git clone https://github.com/raysan5/raygui.git git clone https://github.com/oomer/poomer-raylib-bella_onimage.git msbuild poomer-raylib-bella_onimage.vcxproj /p:Configuration=release /p:Platform=x64 /p:PlatformToolset=v143 ``` \ No newline at end of file diff --git a/poomer-raylib-bella_onimage.cpp b/poomer-raylib-bella_onimage.cpp index c8da8f1..4e66491 100644 --- a/poomer-raylib-bella_onimage.cpp +++ b/poomer-raylib-bella_onimage.cpp @@ -1,3 +1,14 @@ +// Add these definitions before any includes to prevent Windows API conflicts +#define NOMINMAX +#define WIN32_LEAN_AND_MEAN +#define NOGDI +#define NOUSER + +// Include Windows.h first to gain control over its namespace +#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) +#include +#endif + #include #include #include @@ -20,7 +31,7 @@ namespace rl { using Vector2 = ::Vector2; using Color = ::Color; - // Add function aliases + // Add function aliases - make sure to include ALL raylib functions you use using ::InitWindow; using ::CloseWindow; using ::IsWindowReady; @@ -43,6 +54,7 @@ namespace rl { using ::GetMouseWheelMove; using ::IsMouseButtonPressed; using ::IsMouseButtonReleased; + using ::ShowCursor; } // Define a callback type for receiving image data from the path tracer diff --git a/poomer-raylib-bella_onimage.vcxproj b/poomer-raylib-bella_onimage.vcxproj index d21e114..069af0b 100644 --- a/poomer-raylib-bella_onimage.vcxproj +++ b/poomer-raylib-bella_onimage.vcxproj @@ -44,16 +44,16 @@ MultiThreadedDLL false - PSEUDODEBUG;_CONSOLE;DL_USE_SHARED;%(PreprocessorDefinitions) + PSEUDODEBUG;_CONSOLE;DL_USE_SHARED;NOMINMAX;WIN32_LEAN_AND_MEAN;NOGDI;NOUSER;%(PreprocessorDefinitions) Disabled Disabled - ..\bella_engine_sdk\src;..\raylib\src;..\raygui\src + ..\bella_engine_sdk-24.6.0\src;..\raylib\src;..\raygui\src Console true - lib;..\raylib\src - bella_engine_sdk.lib;raylib.lib;Shlwapi.lib;vulkan-1.lib;%(AdditionalDependencies) + lib;..\raylib\build\raylib\Release + bella_engine_sdk.lib;raylib.lib;Shlwapi.lib;vulkan-1.lib;winmm.lib;%(AdditionalDependencies) vulkan-1.dll @@ -63,16 +63,16 @@ true true false - NDEBUG;_CONSOLE;DL_USE_SHARED;%(PreprocessorDefinitions) - ..\bella_engine_sdk\src;..\raylib\src;..\raygui\src + NDEBUG;_CONSOLE;DL_USE_SHARED;NOMINMAX;WIN32_LEAN_AND_MEAN;NOGDI;NOUSER;%(PreprocessorDefinitions) + ..\bella_engine_sdk-24.6.0\src;..\raylib\src;..\raygui\src Console true true true - lib;..\raylib\src;..\bella_engine_sdk\lib - bella_engine_sdk.lib;raylib.lib;Shlwapi.lib;vulkan-1.lib;%(AdditionalDependencies) + lib;..\raylib\build\raylib\Release;..\bella_engine_sdk-24.6.0\lib + bella_engine_sdk.lib;raylib.lib;Shlwapi.lib;vulkan-1.lib;winmm.lib;%(AdditionalDependencies) vulkan-1.dll @@ -90,53 +90,50 @@ echo Post-build event started & - copy "$(ProjectDir)..\bella_engine_sdk\lib\bella_engine_sdk.dll" "$(TargetDir)" & + copy "$(ProjectDir)..\bella_engine_sdk-24.6.0\lib\bella_engine_sdk.dll" "$(TargetDir)" & echo bella_engine_sdk.dll copied & - copy "$(ProjectDir)..\bella_engine_sdk\lib\dl_core.dll" "$(TargetDir)" & + copy "$(ProjectDir)..\bella_engine_sdk-24.6.0\lib\dl_core.dll" "$(TargetDir)" & echo dl_core.dll copied & - copy "$(ProjectDir)..\bella_engine_sdk\lib\dl_oidn_core.dll" "$(TargetDir)" & + copy "$(ProjectDir)..\bella_engine_sdk-24.6.0\lib\dl_oidn_core.dll" "$(TargetDir)" & echo dl_oidn_core.dll copied & - copy "$(ProjectDir)..\raylib\src\raylib.dll" "$(TargetDir)" & - echo raylib.dll copied & echo Post-build event finished - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -147,8 +144,8 @@ - - + + @@ -159,3 +156,4 @@ +