Skip to content

Commit

Permalink
Add texture mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
casensiom committed Nov 5, 2023
1 parent efb3b7d commit b10c69e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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)
Binary file added assets/texel_checker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion metaball.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Binary file modified thumbnail.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b10c69e

Please sign in to comment.