Skip to content

Commit

Permalink
Update CPM packages
Browse files Browse the repository at this point in the history
  • Loading branch information
edunad committed Mar 28, 2024
1 parent 5b5eaad commit df66b71
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if(NOT WIN32 AND RAWRBOX_USE_WAYLAND)
CPMAddPackage("gl:wayland/weston@12.0.3")
endif()

CPMAddPackage("gh:stephenberry/glaze@2.3.1")
CPMAddPackage("gh:stephenberry/glaze@2.4.0")

# ---
if(RAWRBOX_BUILD_RAWRBOX_NETWORK OR RAWRBOX_BUILD_RAWRBOX_ASSIMP)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@

| 001-stencil<br/><a href='/samples/001-stencil'><img src="https://i.rawr.dev/sample1-min-2.gif" width="240" /></a> | 002-generated-models<br/><a href='/samples/002-generated-models'><img src="https://i.rawr.dev/sample2-min-3.gif" width="240" /></a> | 003-light<br/><a href='/samples/003-light'><img src="https://i.rawr.dev/sample3-min-3.gif" width="240" /></a> |
| :-------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------: |
| 004-instancing<br/><a href='/samples/004-instancing'><img src="https://i.rawr.dev/sample4-min.gif" width="240" /></a> | 005-post-process<br/><a href='/samples/005-post-process'><img src="https://i.rawr.dev/sample5-min.gif" width="240" /></a> | 006-decals<br/><a href='/samples/006-decals'><img src="https://i.rawr.dev/sample6-min.gif" width="240" /></a> |
| 004-instancing<br/><a href='/samples/004-instancing'><img src="https://i.rawr.dev/sample4-min.gif" width="240" /></a> | 005-post-process<br/><a href='/samples/005-post-process'><img src="https://i.rawr.dev/sample5-min.gif" width="240" /></a> | 006-decals<br/><a href='/samples/006-decals'><img src="https://i.rawr.dev/sample6-min-2.gif" width="240" /></a> |
| ~~007-particle-system~~ (TODO) | 008-ui<br/><a href='/samples/008-ui'><img src="https://i.rawr.dev/sample8-min.gif" width="240" /></a> | 009-assimp<br/><a href='/samples/009-assimp'><img src="https://i.rawr.dev/sample9-min.gif" width="240" /></a> |
| 010-bass-audio<br/><a href='/samples/010-bass-audio'><img src="https://i.rawr.dev/bylavGsjpB.png" width="240" /></a> | 011-physics-3D<br/><a href='/samples/011-physics-3D'><img src="https://i.rawr.dev/sample11-min.gif" width="240" /></a> | 012-physics-2D<br/><a href='/samples/012-physics-2D'><img src="https://i.rawr.dev/sample12-min.gif" width="240" /></a> |
| 013-webm<br/><a href='/samples/013-webm'><img src="https://i.rawr.dev/sample13-min.gif" width="240" /></a> | 014-scripting<br/><a href='/samples/014-scripting'><img src="https://i.rawr.dev/sample14-min.gif" width="240" /></a> | 015-gpu-picking<br/><a href='/samples/015-gpu-picking'><img src="https://i.rawr.dev/sample15-min.gif" width="240" /></a> |
4 changes: 2 additions & 2 deletions package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CPMDeclarePackage(magic_enum
)
# glaze
CPMDeclarePackage(glaze
VERSION 2.3.1
VERSION 2.4.0
GITHUB_REPOSITORY stephenberry/glaze
SYSTEM YES
EXCLUDE_FROM_ALL YES
Expand Down Expand Up @@ -53,7 +53,7 @@ CPMDeclarePackage(qhull
)
# thread-pool
CPMDeclarePackage(thread-pool
VERSION 4.0.1
VERSION 4.1.0
GITHUB_REPOSITORY bshoshany/thread-pool
SYSTEM YES
EXCLUDE_FROM_ALL YES
Expand Down
2 changes: 1 addition & 1 deletion rawrbox.utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ else()
endif()
endif()

CPMAddPackage("gh:bshoshany/thread-pool@4.0.1")
CPMAddPackage("gh:bshoshany/thread-pool@4.1.0")
if(thread-pool_ADDED)
add_library(thread-pool INTERFACE IMPORTED)
target_include_directories(thread-pool INTERFACE ${thread-pool_SOURCE_DIR}/include)
Expand Down
3 changes: 2 additions & 1 deletion samples/006-decals/include/decal_test/game.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ namespace decal_test {
Game& operator=(Game&&) = delete;
~Game() override = default;

void drawWorld();
void drawWorld() const;
void drawOverlay() const;

void loadContent();
void contentLoaded();
Expand Down
17 changes: 14 additions & 3 deletions samples/006-decals/src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ namespace decal_test {
render->addPlugin<rawrbox::ClusteredPlugin>();
render->onIntroCompleted = [this]() { this->loadContent(); };
render->setDrawCall([this](const rawrbox::DrawPass& pass) {
if (pass != rawrbox::DrawPass::PASS_OPAQUE) return;
this->drawWorld();
if (pass == rawrbox::DrawPass::PASS_OPAQUE) {
this->drawWorld();
} else {
this->drawOverlay();
}
});
// ---------------

Expand Down Expand Up @@ -169,12 +172,20 @@ namespace decal_test {
}
}

void Game::drawWorld() {
void Game::drawWorld() const {
if (!this->_ready) return;

this->_model->draw();
this->_model2->draw();
}

void Game::drawOverlay() const {
if (!this->_ready) return;
auto* stencil = rawrbox::RENDERER->stencil();

stencil->drawText(fmt::format("[MOUSE_1] RANDOMIZE DECALS"), {15, 15});
}

void Game::draw() {
rawrbox::Window::render(); // Commit primitives
}
Expand Down

0 comments on commit df66b71

Please sign in to comment.