diff options
author | Timofey <t.danshin@corp.mail.ru> | 2016-11-10 18:54:05 +0300 |
---|---|---|
committer | Timofey <t.danshin@corp.mail.ru> | 2016-11-14 17:06:23 +0300 |
commit | e054c0170fc80465a2cebc41117745c8685801a9 (patch) | |
tree | 803ac6bf09555855370b37e31a07a196031ea9ca /drape | |
parent | 61d10c1df1c1b2538da226312f8bb964efe73203 (diff) |
Added drape and drape_tests
Diffstat (limited to 'drape')
-rw-r--r-- | drape/CMakeLists.txt | 194 | ||||
-rw-r--r-- | drape/drape_tests/CMakeLists.txt | 77 |
2 files changed, 271 insertions, 0 deletions
diff --git a/drape/CMakeLists.txt b/drape/CMakeLists.txt new file mode 100644 index 0000000000..cb9138cf9a --- /dev/null +++ b/drape/CMakeLists.txt @@ -0,0 +1,194 @@ +project(drape) + +get_filename_component(DRAPE_ROOT ${PROJECT_SOURCE_DIR} ABSOLUTE) + +execute_process( + COMMAND python ${OMIM_ROOT}/tools/autobuild/shader_preprocessor.py + ${DRAPE_ROOT}/shaders + shader_index.txt + shader_def +) + +include_directories( + ${OMIM_ROOT}/3party/freetype/include + ${OMIM_ROOT}/3party/glm +) + +append(CMAKE_CXX_FLAGS "-std=c++11 ") + +set( + DRAPE_COMMON_SRC + ${DRAPE_ROOT}/attribute_buffer_mutator.cpp + ${DRAPE_ROOT}/attribute_buffer_mutator.hpp + ${DRAPE_ROOT}/attribute_provider.cpp + ${DRAPE_ROOT}/attribute_provider.hpp + ${DRAPE_ROOT}/batcher.cpp + ${DRAPE_ROOT}/batcher.hpp + ${DRAPE_ROOT}/batcher_helpers.cpp + ${DRAPE_ROOT}/batcher_helpers.hpp + ${DRAPE_ROOT}/binding_info.cpp + ${DRAPE_ROOT}/binding_info.hpp + ${DRAPE_ROOT}/buffer_base.cpp + ${DRAPE_ROOT}/buffer_base.hpp + ${DRAPE_ROOT}/color.cpp + ${DRAPE_ROOT}/color.hpp + ${DRAPE_ROOT}/constants.hpp + ${DRAPE_ROOT}/cpu_buffer.cpp + ${DRAPE_ROOT}/cpu_buffer.hpp + ${DRAPE_ROOT}/data_buffer.cpp + ${DRAPE_ROOT}/data_buffer.hpp + ${DRAPE_ROOT}/data_buffer_impl.hpp + ${DRAPE_ROOT}/debug_rect_renderer.cpp + ${DRAPE_ROOT}/debug_rect_renderer.hpp + ${DRAPE_ROOT}/drape_global.hpp + ${DRAPE_ROOT}/dynamic_texture.hpp + ${DRAPE_ROOT}/font_texture.cpp + ${DRAPE_ROOT}/font_texture.hpp + ${DRAPE_ROOT}/fribidi.cpp + ${DRAPE_ROOT}/fribidi.hpp + ${DRAPE_ROOT}/glconstants.cpp + ${DRAPE_ROOT}/glconstants.hpp + ${DRAPE_ROOT}/glextensions_list.cpp + ${DRAPE_ROOT}/glextensions_list.hpp + ${DRAPE_ROOT}/glfunctions.hpp + ${DRAPE_ROOT}/glIncludes.hpp + ${DRAPE_ROOT}/glsl_func.hpp + ${DRAPE_ROOT}/glsl_types.hpp + ${DRAPE_ROOT}/glstate.cpp + ${DRAPE_ROOT}/glstate.hpp + ${DRAPE_ROOT}/glyph_manager.cpp + ${DRAPE_ROOT}/glyph_manager.hpp + ${DRAPE_ROOT}/gpu_buffer.cpp + ${DRAPE_ROOT}/gpu_buffer.hpp + ${DRAPE_ROOT}/gpu_program.cpp + ${DRAPE_ROOT}/gpu_program.hpp + ${DRAPE_ROOT}/gpu_program_manager.cpp + ${DRAPE_ROOT}/gpu_program_manager.hpp + ${DRAPE_ROOT}/hw_texture.cpp + ${DRAPE_ROOT}/hw_texture.hpp + ${DRAPE_ROOT}/index_buffer.cpp + ${DRAPE_ROOT}/index_buffer.hpp + ${DRAPE_ROOT}/index_buffer_mutator.cpp + ${DRAPE_ROOT}/index_buffer_mutator.hpp + ${DRAPE_ROOT}/index_storage.cpp + ${DRAPE_ROOT}/index_storage.hpp + ${DRAPE_ROOT}/object_pool.hpp + ${DRAPE_ROOT}/oglcontext.hpp + ${DRAPE_ROOT}/oglcontextfactory.cpp + ${DRAPE_ROOT}/oglcontextfactory.hpp + ${DRAPE_ROOT}/overlay_handle.cpp + ${DRAPE_ROOT}/overlay_handle.hpp + ${DRAPE_ROOT}/overlay_tree.cpp + ${DRAPE_ROOT}/overlay_tree.hpp + ${DRAPE_ROOT}/pointers.cpp + ${DRAPE_ROOT}/pointers.hpp + ${DRAPE_ROOT}/render_bucket.cpp + ${DRAPE_ROOT}/render_bucket.hpp + ${DRAPE_ROOT}/shader.cpp + ${DRAPE_ROOT}/shader.hpp + ${DRAPE_ROOT}/shader_def.cpp + ${DRAPE_ROOT}/shader_def.hpp + ${DRAPE_ROOT}/static_texture.cpp + ${DRAPE_ROOT}/static_texture.hpp + ${DRAPE_ROOT}/stipple_pen_resource.cpp + ${DRAPE_ROOT}/stipple_pen_resource.hpp + ${DRAPE_ROOT}/support_manager.cpp + ${DRAPE_ROOT}/support_manager.hpp + ${DRAPE_ROOT}/symbols_texture.cpp + ${DRAPE_ROOT}/symbols_texture.hpp + ${DRAPE_ROOT}/texture.cpp + ${DRAPE_ROOT}/texture.hpp + ${DRAPE_ROOT}/texture_manager.cpp + ${DRAPE_ROOT}/texture_manager.hpp + ${DRAPE_ROOT}/texture_of_colors.cpp + ${DRAPE_ROOT}/texture_of_colors.hpp + ${DRAPE_ROOT}/uniform_value.cpp + ${DRAPE_ROOT}/uniform_value.hpp + ${DRAPE_ROOT}/uniform_values_storage.cpp + ${DRAPE_ROOT}/uniform_values_storage.hpp + ${DRAPE_ROOT}/utils/glyph_usage_tracker.cpp + ${DRAPE_ROOT}/utils/glyph_usage_tracker.hpp + ${DRAPE_ROOT}/utils/gpu_mem_tracker.cpp + ${DRAPE_ROOT}/utils/gpu_mem_tracker.hpp + ${DRAPE_ROOT}/utils/projection.cpp + ${DRAPE_ROOT}/utils/projection.hpp + ${DRAPE_ROOT}/utils/vertex_decl.cpp + ${DRAPE_ROOT}/utils/vertex_decl.hpp + ${DRAPE_ROOT}/vertex_array_buffer.cpp + ${DRAPE_ROOT}/vertex_array_buffer.hpp + ${DRAPE_ROOT}/visual_scale.hpp + + ${OMIM_ROOT}/3party/sdf_image/sdf_image.cpp + ${OMIM_ROOT}/3party/sdf_image/sdf_image.h + ${OMIM_ROOT}/3party/stb_image/stb_image.c + ${OMIM_ROOT}/3party/stb_image/stb_image.h +) + +set( + SRC + glfunctions.cpp +) + +if (PLATFORM_IOS) + append( + SRC + hw_texture_ios.hpp + hw_texture_ios.mm + ) +endif() + +set( #might not need this declaration + OTHER_FILES + shaders/area3d_outline_vertex_shader.vsh + shaders/area3d_vertex_shader.vsh + shaders/area_vertex_shader.vsh + shaders/arrow3d_fragment_shader.fsh + shaders/arrow3d_shadow_fragment_shader.fsh + shaders/arrow3d_shadow_vertex_shader.vsh + shaders/arrow3d_vertex_shader.vsh + shaders/circle_shader.fsh + shaders/circle_shader.vsh + shaders/compass_vertex_shader.vsh + shaders/dashed_fragment_shader.fsh + shaders/dashed_vertex_shader.vsh + shaders/debug_rect_fragment_shader.fsh + shaders/debug_rect_vertex_shader.vsh + shaders/line_fragment_shader.fsh + shaders/line_vertex_shader.vsh + shaders/masked_texturing_billboard_vertex_shader.vsh + shaders/masked_texturing_fragment_shader.fsh + shaders/masked_texturing_vertex_shader.vsh + shaders/my_position_shader.vsh + shaders/path_symbol_vertex_shader.vsh + shaders/position_accuracy3d_shader.vsh + shaders/route_arrow_vertex_shader.vsh + shaders/route_dash_fragment_shader.fsh + shaders/route_fragment_shader.fsh + shaders/route_vertex_shader.vsh + shaders/ruler_vertex_shader.vsh + shaders/shader_index.txt + shaders/solid_color_fragment_shader.fsh + shaders/text_billboard_vertex_shader.vsh + shaders/text_fragment_shader.fsh + shaders/text_outlined_billboard_vertex_shader.vsh + shaders/text_outlined_gui_vertex_shader.vsh + shaders/text_outlined_vertex_shader.vsh + shaders/text_vertex_shader.vsh + shaders/texturing3d_fragment_shader.fsh + shaders/texturing3d_vertex_shader.vsh + shaders/texturing_billboard_vertex_shader.vsh + shaders/texturing_fragment_shader.fsh + shaders/texturing_vertex_shader.vsh + shaders/trackpoint_fragment_shader.fsh + shaders/trackpoint_vertex_shader.vsh + shaders/traffic_fragment_shader.fsh + shaders/traffic_vertex_shader.vsh + shaders/transparent_layer_fragment_shader.fsh + shaders/transparent_layer_vertex_shader.vsh + shaders/user_mark.vsh + shaders/user_mark_billboard.vsh +) + +add_library(${PROJECT_NAME} ${DRAPE_COMMON_SRC} ${SRC}) + +omim_add_test_subdirectory(drape_tests) diff --git a/drape/drape_tests/CMakeLists.txt b/drape/drape_tests/CMakeLists.txt new file mode 100644 index 0000000000..d4cdf981da --- /dev/null +++ b/drape/drape_tests/CMakeLists.txt @@ -0,0 +1,77 @@ +project(drape_tests) + +execute_process( + COMMAND python ${OMIM_ROOT}/tools/autobuild/shader_preprocessor.py + ${DRAPE_ROOT}/shaders + shader_index.txt + shader_def +) + +add_definitions( + -DOGL_TEST_ENABLED + -DGTEST_DONT_DEFINE_TEST + -DCOMPILER_TESTS +) + +include_directories( + ${OMIM_ROOT}/3party/gmock/include + ${OMIM_ROOT}/3party/gmock/gtest/include + ${OMIM_ROOT}/3party/freetype/include +) + +set( + SRC + attribute_provides_tests.cpp + batcher_tests.cpp + bingind_info_tests.cpp + buffer_tests.cpp + compile_shaders_test.cpp + dummy_texture.hpp + failure_reporter.cpp + font_texture_tests.cpp + fribidi_tests.cpp + glfunctions.cpp + glmock_functions.cpp + glmock_functions.hpp + glyph_mng_tests.cpp + glyph_packer_test.cpp + img.cpp + img.hpp + memory_comparer.hpp + pointers_tests.cpp + stipple_pen_tests.cpp + texture_of_colors_tests.cpp + uniform_value_tests.cpp +) + +omim_add_test(${PROJECT_NAME} ${DRAPE_COMMON_SRC} ${SRC}) + +omim_link_libraries( + ${PROJECT_NAME} + qt_tstfrm + indexer + platform + coding + geometry + base + fribidi + expat + tomcrypt + stats_client + freetype + gmock + ${Qt5Core_LIBRARIES} + ${Qt5Gui_LIBRARIES} + ${Qt5Widgets_LIBRARIES} + ${LIBZ} +) + +if (PLATFORM_MAC) + omim_link_libraries( + ${PROJECT_NAME} + "-framework IOKit" + "-framework Cocoa" + "-framework CoreLocation" + "-framework SystemConfiguration" + ) +endif() |