diff --git a/CMakeLists.txt b/CMakeLists.txt index e977ee8..65581ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,4 +18,9 @@ endif() message(STATUS "PROJECT_NAME: ${PROJECT_NAME}") add_executable(${PROJECT_NAME} metaball.c marching_cube.h) -target_link_libraries(${PROJECT_NAME} PUBLIC raylib) \ No newline at end of file +target_link_libraries(${PROJECT_NAME} PUBLIC raylib) + +add_custom_target(copy_assets + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/assets ${CMAKE_CURRENT_BINARY_DIR}/assets +) +add_dependencies(${PROJECT_NAME} copy_assets) \ No newline at end of file diff --git a/assets/texel_checker.png b/assets/texel_checker.png new file mode 100644 index 0000000..79d3832 Binary files /dev/null and b/assets/texel_checker.png differ diff --git a/metaball.c b/metaball.c index 5d96ee2..278b59e 100644 --- a/metaball.c +++ b/metaball.c @@ -748,7 +748,7 @@ int main(int argc, char *argv[]) Material material = LoadMaterialDefault(); material.maps[MATERIAL_MAP_DIFFUSE].color = WHITE; - // material.maps[MATERIAL_MAP_DIFFUSE].texture = LoadTexture("../texel_checker.png"); + material.maps[MATERIAL_MAP_DIFFUSE].texture = LoadTexture("assets/texel_checker.png"); Matrix transform = (Matrix){1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, diff --git a/thumbnail.gif b/thumbnail.gif index 25075a9..6dd3d86 100644 Binary files a/thumbnail.gif and b/thumbnail.gif differ