Skip to content

Commit

Permalink
Examples: Add heightmap example
Browse files Browse the repository at this point in the history
  • Loading branch information
brackeen committed Feb 19, 2024
1 parent 586e95d commit 6f1d538
Show file tree
Hide file tree
Showing 2 changed files with 530 additions and 8 deletions.
23 changes: 15 additions & 8 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,19 @@ set(GLFM_APP_TARGET_NAME glfm_touch)
set(GLFM_APP_SRC touch.c)
include(GLFMAppTarget)

# Test pattern example
set(GLFM_APP_ASSETS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/assets)
set(GLFM_APP_TARGET_NAME glfm_test_pattern)
set(GLFM_APP_SRC test_pattern.c test_pattern_renderer.h test_pattern_renderer_gles2.c)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(GLFM_APP_SRC ${GLFM_APP_SRC} test_pattern_renderer_metal.m test_pattern_renderer.metal)
set_source_files_properties(test_pattern_renderer.metal PROPERTIES LANGUAGE METAL)
endif()
# Heightmap example
set(GLFM_APP_TARGET_NAME glfm_heightmap)
set(GLFM_APP_SRC heightmap.c)
include(GLFMAppTarget)

# Compass example
set(GLFM_APP_TARGET_NAME glfm_compass)
set(GLFM_APP_SRC compass.c)
include(GLFMAppTarget)

# The following examples require the assets dir
set(GLFM_APP_ASSETS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/assets)

# Typing example (using iOS/Android virtual keyboard)
set(GLFM_APP_TARGET_NAME glfm_typing)
set(GLFM_APP_SRC typing.c)
Expand All @@ -42,3 +40,12 @@ include(GLFMAppTarget)
set(GLFM_APP_TARGET_NAME glfm_shader_toy)
set(GLFM_APP_SRC shader_toy.c)
include(GLFMAppTarget)

# Test pattern example
set(GLFM_APP_TARGET_NAME glfm_test_pattern)
set(GLFM_APP_SRC test_pattern.c test_pattern_renderer.h test_pattern_renderer_gles2.c)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(GLFM_APP_SRC ${GLFM_APP_SRC} test_pattern_renderer_metal.m test_pattern_renderer.metal)
set_source_files_properties(test_pattern_renderer.metal PROPERTIES LANGUAGE METAL)
endif()
include(GLFMAppTarget)

0 comments on commit 6f1d538

Please sign in to comment.