Update impeller-cmake to head
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dc28c27..48a5865 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -58,4 +58,6 @@
run: cmake --preset ninja-debug-clang
- name: Build
- run: cmake --build ${{github.workspace}}/out/build/ninja-debug
+ run: |
+ cmake --build ${{github.workspace}}/out/build/ninja-debug \
+ --target example
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b09f82e..a1d134e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,13 @@
set(ASSETS_OUT_DIR ${PROJECT_DIR}/assets)
set(FLATBUFFERS_INCLUDE_DIR ${THIRD_PARTY_DIR}/impeller-cmake/third_party/flatbuffers/include)
+if(CMAKE_BUILD_TYPE MATCHES Debug)
+ # It's very important that IMPELLER_DEBUG is enabled whenever Impeller's
+ # libraries are built with it, as some data structures in headers change
+ # with the presence of this flag.
+ add_compile_definitions(IMPELLER_DEBUG=1)
+endif()
+
if(WIN32)
add_compile_definitions(
WIN32_LEAN_AND_MEAN
@@ -54,7 +61,7 @@
add_subdirectory(third_party/glfw)
# Dependency: STB
-add_library(stb STATIC "third_party/stb.cc")
+add_library(stb STATIC "third_party/stb_image_impl.cc")
# Dependency: Dear ImGui
include("imgui.cmake")
diff --git a/src/examples/mesh/mesh_example.cc b/src/examples/mesh/mesh_example.cc
index 4b2c290..90e3228 100644
--- a/src/examples/mesh/mesh_example.cc
+++ b/src/examples/mesh/mesh_example.cc
@@ -137,7 +137,7 @@
impeller::BufferView{
.buffer = device_buffer,
.range = impeller::Range{vertices_size, indices_size}},
- .index_count = mesh.indices.size(),
+ .vertex_count = mesh.indices.size(),
.index_type = impeller::IndexType::k16bit,
};
@@ -151,12 +151,11 @@
pipeline_desc->SetWindingOrder(impeller::WindingOrder::kClockwise);
pipeline_desc->SetCullMode(impeller::CullMode::kBackFace);
pipeline_desc->SetDepthStencilAttachmentDescriptor(
- std::make_optional<impeller::DepthAttachmentDescriptor>({
- .depth_compare = impeller::CompareFunction::kLess,
- .depth_write_enabled = true,
- }));
- pipeline_ =
- context.GetPipelineLibrary()->GetPipeline(pipeline_desc).Get();
+ std::make_optional<impeller::DepthAttachmentDescriptor>({
+ .depth_compare = impeller::CompareFunction::kLess,
+ .depth_write_enabled = true,
+ }));
+ pipeline_ = context.GetPipelineLibrary()->GetPipeline(pipeline_desc).Get();
if (!pipeline_ || !pipeline_->IsValid()) {
std::cerr << "Failed to initialize pipeline for mesh example.";
return false;
@@ -179,7 +178,7 @@
}
impeller::Command cmd;
- cmd.label = "Mesh Example";
+ DEBUG_COMMAND_INFO(cmd, "Mesh Example");
cmd.pipeline = pipeline_;
cmd.BindVertices(vertex_buffer_);
@@ -188,8 +187,8 @@
VS::VertInfo vs_uniform;
vs_uniform.mvp =
- impeller::Matrix::MakePerspective(impeller::Degrees{60},
- pass->GetRenderTargetSize(), 0.1, 1000) *
+ impeller::Matrix::MakePerspective(
+ impeller::Degrees{60}, pass->GetRenderTargetSize(), 0.1, 1000) *
impeller::Matrix::MakeLookAt({0, 0, -50}, {0, 0, 0}, {0, 1, 0}) *
impeller::Matrix::MakeScale({0.3, 0.3, 0.3}) *
impeller::Matrix::MakeRotationY(impeller::Radians{-0.4f * time}) *
diff --git a/src/examples/the_impeller/the_impeller_example.cc b/src/examples/the_impeller/the_impeller_example.cc
index bc65996..b56cb2f 100644
--- a/src/examples/the_impeller/the_impeller_example.cc
+++ b/src/examples/the_impeller/the_impeller_example.cc
@@ -83,7 +83,7 @@
}
impeller::Command cmd;
- cmd.label = "Impeller SDF showcase";
+ DEBUG_COMMAND_INFO(cmd, "Impeller SDF showcase");
cmd.pipeline = pipeline_;
auto size = render_target.GetRenderTargetSize();
diff --git a/third_party/assimp b/third_party/assimp
index 5a4f7c0..f623870 160000
--- a/third_party/assimp
+++ b/third_party/assimp
@@ -1 +1 @@
-Subproject commit 5a4f7c0a375fd2acc3bda9414d21efe711346ede
+Subproject commit f623870dd12b540dba3b2b8616eba49c7b3c290b
diff --git a/third_party/impeller-cmake b/third_party/impeller-cmake
index 42fa252..49402c7 160000
--- a/third_party/impeller-cmake
+++ b/third_party/impeller-cmake
@@ -1 +1 @@
-Subproject commit 42fa25249bb23e87ec0f1b472d2318b92ca91cef
+Subproject commit 49402c7caa5b244c2ddbe4098c67060dfa656e4b
diff --git a/third_party/stb.cc b/third_party/stb_image_impl.cc
similarity index 100%
rename from third_party/stb.cc
rename to third_party/stb_image_impl.cc