├── .clang-format ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .google └── packaging.yaml ├── API-Samples ├── 01-init_instance │ └── 01-init_instance.cpp ├── 02-enumerate_devices │ └── 02-enumerate_devices.cpp ├── 03-init_device │ └── 03-init_device.cpp ├── 04-init_command_buffer │ └── 04-init_command_buffer.cpp ├── 05-init_swapchain │ └── 05-init_swapchain.cpp ├── 06-init_depth_buffer │ └── 06-init_depth_buffer.cpp ├── 07-init_uniform_buffer │ └── 07-init_uniform_buffer.cpp ├── 08-init_pipeline_layout │ └── 08-init_pipeline_layout.cpp ├── 09-init_descriptor_set │ └── 09-init_descriptor_set.cpp ├── 10-init_render_pass │ └── 10-init_render_pass.cpp ├── 11-init_shaders │ ├── 11-init_shaders.cpp │ ├── 11-init_shaders.frag │ └── 11-init_shaders.vert ├── 12-init_frame_buffers │ └── 12-init_frame_buffers.cpp ├── 13-init_vertex_buffer │ └── 13-init_vertex_buffer.cpp ├── 14-init_pipeline │ ├── 14-init_pipeline.cpp │ ├── 14-init_pipeline.frag │ └── 14-init_pipeline.vert ├── 15-draw_cube │ ├── 15-draw_cube.cpp │ ├── 15-draw_cube.frag │ └── 15-draw_cube.vert ├── 16-vulkan_1_1 │ └── 16-vulkan_1_1.cpp ├── CMakeLists.txt ├── README-cmake.md ├── README-codegen.md ├── README.md ├── Tutorial │ ├── .gitignore │ ├── .markdownlint.json │ ├── .vscode │ │ ├── settings.json │ │ └── spell.json │ ├── README.md │ ├── build.bat │ ├── build.sh │ ├── css │ │ └── lg_stylesheet.css │ ├── images │ │ ├── BasicAppLoader.png │ │ ├── BasicAppLoader.xml │ │ ├── CommandBufferInsert.png │ │ ├── CommandBufferInsert.xml │ │ ├── DepthBufferBindView.png │ │ ├── DepthBufferBindView.xml │ │ ├── Device1QueueFamilies.png │ │ ├── Device1QueueFamilies.xml │ │ ├── Device2QueueFamilies.png │ │ ├── Device2QueueFamilies.xml │ │ ├── FrameBuffers.png │ │ ├── FrameBuffers.xml │ │ ├── GraphicsPipeline.png │ │ ├── GraphicsPipeline.xml │ │ ├── ImageMemoryLayout.png │ │ ├── ImageMemoryLayout.xml │ │ ├── PhysicalDeviceQueueFamilyProperties.png │ │ ├── PhysicalDeviceQueueFamilyProperties.xml │ │ ├── PhysicalDevices.png │ │ ├── PhysicalDevices.xml │ │ ├── RenderPassLayouts.png │ │ ├── RenderPassLayouts.xml │ │ ├── Swapchain.png │ │ ├── Swapchain.xml │ │ ├── bg-starfield.jpg │ │ ├── drawcube.png │ │ └── vulkanlogo.png │ ├── markdown │ │ ├── 00-intro.md │ │ ├── 01-init_instance.md │ │ ├── 02-enumerate_devices.md │ │ ├── 03-init_device.md │ │ ├── 04-init_command_buffer.md │ │ ├── 05-init_swapchain.md │ │ ├── 06-init_depth_buffer.md │ │ ├── 07-init_uniform_buffer.md │ │ ├── 08-init_pipeline_layout.md │ │ ├── 09-init_descriptor_set.md │ │ ├── 10-init_render_pass.md │ │ ├── 11-init_shaders.md │ │ ├── 12-init_frame_buffers.md │ │ ├── 13-init_vertex_buffer.md │ │ ├── 14-init_pipeline.md │ │ ├── 15-draw_cube.md │ │ ├── 16-vulkan_1_1_changes.md │ │ └── index.md │ └── tools │ │ └── Markdown.pl ├── android │ ├── 01-init_instance │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 02-enumerate_devices │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 03-init_device │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 04-init_command_buffer │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 05-init_swapchain │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 06-init_depth_buffer │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 07-init_uniform_buffer │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 08-init_pipeline_layout │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 09-init_descriptor_set │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 10-init_render_pass │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 11-init_shaders │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 12-init_frame_buffers │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 13-init_vertex_buffer │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 14-init_pipeline │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 15-draw_cube │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── 16-vulkan_1_1 │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── CMakeLists.txt │ ├── ShaderHeaders │ │ ├── 11-init_shaders.frag.h │ │ ├── 11-init_shaders.vert.h │ │ ├── 14-init_pipeline.frag.h │ │ ├── 14-init_pipeline.vert.h │ │ ├── 15-draw_cube.frag.h │ │ ├── 15-draw_cube.vert.h │ │ ├── draw_subpasses.frag.h │ │ ├── draw_subpasses.full.vert.h │ │ ├── draw_subpasses.vert.h │ │ ├── draw_textured_cube.frag.h │ │ ├── draw_textured_cube.vert.h │ │ ├── dynamic_uniform.frag.h │ │ ├── dynamic_uniform.vert.h │ │ ├── immutable_sampler.frag.h │ │ ├── immutable_sampler.vert.h │ │ ├── input_attachment.frag.h │ │ ├── input_attachment.vert.h │ │ ├── memory_barriers.frag.h │ │ ├── memory_barriers.vert.h │ │ ├── multiple_sets.frag.h │ │ ├── multiple_sets.vert.h │ │ ├── multithreaded_command_buffers.frag.h │ │ ├── multithreaded_command_buffers.vert.h │ │ ├── occlusion_query.frag.h │ │ ├── occlusion_query.vert.h │ │ ├── pipeline_cache.frag.h │ │ ├── pipeline_cache.vert.h │ │ ├── pipeline_derivative.frag.h │ │ ├── pipeline_derivative.vert.h │ │ ├── pipeline_derivative2.frag.h │ │ ├── push_constants.frag.h │ │ ├── push_constants.vert.h │ │ ├── push_descriptors.frag.h │ │ ├── push_descriptors.vert.h │ │ ├── secondary_command_buffer.frag.h │ │ ├── secondary_command_buffer.vert.h │ │ ├── separate_image_sampler.frag.h │ │ ├── separate_image_sampler.vert.h │ │ ├── specialized.frag.h │ │ ├── spirv_assembly.frag.h │ │ ├── spirv_assembly.vert.h │ │ ├── spirv_specialization.frag.h │ │ ├── spirv_specialization.vert.h │ │ ├── template.frag.h │ │ ├── template.vert.h │ │ ├── texel_buffer.frag.h │ │ ├── texel_buffer.vert.h │ │ ├── validation_cache.frag.h │ │ └── validation_cache.vert.h │ ├── compile_shaders.py │ ├── copy_blit_image │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── create_debug_report_callback │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── draw_subpasses │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── draw_textured_cube │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── dynamic_uniform │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── enable_validation_with_callback │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── enumerate_devices_adv │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── events │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── immutable_sampler │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── init_texture │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── input_attachment │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── instance_extension_properties │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── instance_layer_extension_properties │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── instance_layer_properties │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── memory_barriers │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── multiple_sets │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── multithreaded_command_buffers │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── occlusion_query │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── pipeline_cache │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── pipeline_derivative │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── project_template │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── push_constants │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── push_descriptors │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── secondary_command_buffer │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── separate_image_sampler │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── settings.gradle.in │ ├── spirv_assembly │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── spirv_specialization │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── template │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── texel_buffer │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── validation_cache │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── vulkan_1_1_flexible │ │ ├── README.md │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ └── vulkan_wrapper │ │ ├── vulkan_wrapper.cpp │ │ └── vulkan_wrapper.h ├── copy_blit_image │ └── copy_blit_image.cpp ├── create_debug_report_callback │ └── create_debug_report_callback.cpp ├── data │ ├── blue.ppm │ ├── cube_data.h │ ├── green.ppm │ ├── logo-256x256-solid.png │ ├── logo-256x256.png │ ├── lunarg.ppm │ ├── red.ppm │ ├── spotlight.ppm │ └── yellow.ppm ├── draw_subpasses │ ├── draw_subpasses.cpp │ ├── draw_subpasses.frag │ ├── draw_subpasses.full.vert │ └── draw_subpasses.vert ├── draw_textured_cube │ ├── draw_textured_cube.cpp │ ├── draw_textured_cube.frag │ └── draw_textured_cube.vert ├── dynamic_uniform │ ├── dynamic_uniform.cpp │ ├── dynamic_uniform.frag │ └── dynamic_uniform.vert ├── enable_validation_with_callback │ └── enable_validation_with_callback.cpp ├── enumerate_devices_adv │ └── enumerate_devices_adv.cpp ├── events │ └── events.cpp ├── get-descripts.sh ├── get-short-descripts.sh ├── immutable_sampler │ ├── immutable_sampler.cpp │ ├── immutable_sampler.frag │ └── immutable_sampler.vert ├── init_texture │ └── init_texture.cpp ├── input_attachment │ ├── input_attachment.cpp │ ├── input_attachment.frag │ └── input_attachment.vert ├── instance_extension_properties │ └── instance_extension_properties.cpp ├── instance_layer_extension_properties │ └── instance_layer_extension_properties.cpp ├── instance_layer_properties │ └── instance_layer_properties.cpp ├── memory_barriers │ ├── memory_barriers.cpp │ ├── memory_barriers.frag │ └── memory_barriers.vert ├── multiple_sets │ ├── multiple_sets.cpp │ ├── multiple_sets.frag │ └── multiple_sets.vert ├── multithreaded_command_buffers │ ├── multithreaded_command_buffers.cpp │ ├── multithreaded_command_buffers.frag │ └── multithreaded_command_buffers.vert ├── occlusion_query │ ├── occlusion_query.cpp │ ├── occlusion_query.frag │ └── occlusion_query.vert ├── pipeline_cache │ ├── pipeline_cache.cpp │ ├── pipeline_cache.frag │ └── pipeline_cache.vert ├── pipeline_derivative │ ├── pipeline_derivative.cpp │ ├── pipeline_derivative.frag │ ├── pipeline_derivative.vert │ └── pipeline_derivative2.frag ├── push_constants │ ├── push_constants.cpp │ ├── push_constants.frag │ └── push_constants.vert ├── push_descriptors │ ├── push_descriptors.cpp │ ├── push_descriptors.frag │ └── push_descriptors.vert ├── run_all_samples.py ├── run_all_samples.sh ├── secondary_command_buffer │ ├── secondary_command_buffer.cpp │ ├── secondary_command_buffer.frag │ └── secondary_command_buffer.vert ├── separate_image_sampler │ ├── separate_image_sampler.cpp │ ├── separate_image_sampler.frag │ └── separate_image_sampler.vert ├── spirv_assembly │ ├── spirv_assembly.cpp │ ├── spirv_assembly.frag │ └── spirv_assembly.vert ├── spirv_specialization │ ├── specialized.frag │ ├── spirv_specialization.cpp │ ├── spirv_specialization.frag │ └── spirv_specialization.vert ├── template │ ├── template.cpp │ ├── template.frag │ └── template.vert ├── texel_buffer │ ├── texel_buffer.cpp │ ├── texel_buffer.frag │ └── texel_buffer.vert ├── utils │ ├── CMakeLists.txt │ ├── README.md │ ├── glm │ │ ├── common.hpp │ │ ├── detail │ │ │ ├── _features.hpp │ │ │ ├── _fixes.hpp │ │ │ ├── _literals.hpp │ │ │ ├── _noise.hpp │ │ │ ├── _swizzle.hpp │ │ │ ├── _swizzle_func.hpp │ │ │ ├── _vectorize.hpp │ │ │ ├── dummy.cpp │ │ │ ├── func_common.hpp │ │ │ ├── func_common.inl │ │ │ ├── func_exponential.hpp │ │ │ ├── func_exponential.inl │ │ │ ├── func_geometric.hpp │ │ │ ├── func_geometric.inl │ │ │ ├── func_integer.hpp │ │ │ ├── func_integer.inl │ │ │ ├── func_matrix.hpp │ │ │ ├── func_matrix.inl │ │ │ ├── func_noise.hpp │ │ │ ├── func_noise.inl │ │ │ ├── func_packing.hpp │ │ │ ├── func_packing.inl │ │ │ ├── func_trigonometric.hpp │ │ │ ├── func_trigonometric.inl │ │ │ ├── func_vector_relational.hpp │ │ │ ├── func_vector_relational.inl │ │ │ ├── glm.cpp │ │ │ ├── hint.hpp │ │ │ ├── intrinsic_common.hpp │ │ │ ├── intrinsic_common.inl │ │ │ ├── intrinsic_exponential.hpp │ │ │ ├── intrinsic_exponential.inl │ │ │ ├── intrinsic_geometric.hpp │ │ │ ├── intrinsic_geometric.inl │ │ │ ├── intrinsic_integer.hpp │ │ │ ├── intrinsic_integer.inl │ │ │ ├── intrinsic_matrix.hpp │ │ │ ├── intrinsic_matrix.inl │ │ │ ├── intrinsic_trigonometric.hpp │ │ │ ├── intrinsic_trigonometric.inl │ │ │ ├── intrinsic_vector_relational.hpp │ │ │ ├── intrinsic_vector_relational.inl │ │ │ ├── precision.hpp │ │ │ ├── precision.inl │ │ │ ├── setup.hpp │ │ │ ├── type_float.hpp │ │ │ ├── type_gentype.hpp │ │ │ ├── type_gentype.inl │ │ │ ├── type_half.hpp │ │ │ ├── type_half.inl │ │ │ ├── type_int.hpp │ │ │ ├── type_mat.hpp │ │ │ ├── type_mat.inl │ │ │ ├── type_mat2x2.hpp │ │ │ ├── type_mat2x2.inl │ │ │ ├── type_mat2x3.hpp │ │ │ ├── type_mat2x3.inl │ │ │ ├── type_mat2x4.hpp │ │ │ ├── type_mat2x4.inl │ │ │ ├── type_mat3x2.hpp │ │ │ ├── type_mat3x2.inl │ │ │ ├── type_mat3x3.hpp │ │ │ ├── type_mat3x3.inl │ │ │ ├── type_mat3x4.hpp │ │ │ ├── type_mat3x4.inl │ │ │ ├── type_mat4x2.hpp │ │ │ ├── type_mat4x2.inl │ │ │ ├── type_mat4x3.hpp │ │ │ ├── type_mat4x3.inl │ │ │ ├── type_mat4x4.hpp │ │ │ ├── type_mat4x4.inl │ │ │ ├── type_vec.hpp │ │ │ ├── type_vec.inl │ │ │ ├── type_vec1.hpp │ │ │ ├── type_vec1.inl │ │ │ ├── type_vec2.hpp │ │ │ ├── type_vec2.inl │ │ │ ├── type_vec3.hpp │ │ │ ├── type_vec3.inl │ │ │ ├── type_vec4.hpp │ │ │ └── type_vec4.inl │ │ ├── exponential.hpp │ │ ├── ext.hpp │ │ ├── fwd.hpp │ │ ├── geometric.hpp │ │ ├── glm.hpp │ │ ├── gtc │ │ │ ├── constants.hpp │ │ │ ├── constants.inl │ │ │ ├── epsilon.hpp │ │ │ ├── epsilon.inl │ │ │ ├── matrix_access.hpp │ │ │ ├── matrix_access.inl │ │ │ ├── matrix_integer.hpp │ │ │ ├── matrix_inverse.hpp │ │ │ ├── matrix_inverse.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── noise.hpp │ │ │ ├── noise.inl │ │ │ ├── packing.hpp │ │ │ ├── packing.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── random.hpp │ │ │ ├── random.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── reciprocal.inl │ │ │ ├── type_precision.hpp │ │ │ ├── type_precision.inl │ │ │ ├── type_ptr.hpp │ │ │ ├── type_ptr.inl │ │ │ ├── ulp.hpp │ │ │ └── ulp.inl │ │ ├── gtx │ │ │ ├── associated_min_max.hpp │ │ │ ├── associated_min_max.inl │ │ │ ├── bit.hpp │ │ │ ├── bit.inl │ │ │ ├── closest_point.hpp │ │ │ ├── closest_point.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── color_space_YCoCg.hpp │ │ │ ├── color_space_YCoCg.inl │ │ │ ├── compatibility.hpp │ │ │ ├── compatibility.inl │ │ │ ├── component_wise.hpp │ │ │ ├── component_wise.inl │ │ │ ├── constants.hpp │ │ │ ├── dual_quaternion.hpp │ │ │ ├── dual_quaternion.inl │ │ │ ├── epsilon.hpp │ │ │ ├── euler_angles.hpp │ │ │ ├── euler_angles.inl │ │ │ ├── extend.hpp │ │ │ ├── extend.inl │ │ │ ├── extented_min_max.hpp │ │ │ ├── extented_min_max.inl │ │ │ ├── fast_exponential.hpp │ │ │ ├── fast_exponential.inl │ │ │ ├── fast_square_root.hpp │ │ │ ├── fast_square_root.inl │ │ │ ├── fast_trigonometry.hpp │ │ │ ├── fast_trigonometry.inl │ │ │ ├── gradient_paint.hpp │ │ │ ├── gradient_paint.inl │ │ │ ├── handed_coordinate_space.hpp │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── inertia.hpp │ │ │ ├── inertia.inl │ │ │ ├── int_10_10_10_2.hpp │ │ │ ├── int_10_10_10_2.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── intersect.hpp │ │ │ ├── intersect.inl │ │ │ ├── io.hpp │ │ │ ├── io.inl │ │ │ ├── log_base.hpp │ │ │ ├── log_base.inl │ │ │ ├── matrix_cross_product.hpp │ │ │ ├── matrix_cross_product.inl │ │ │ ├── matrix_interpolation.hpp │ │ │ ├── matrix_interpolation.inl │ │ │ ├── matrix_major_storage.hpp │ │ │ ├── matrix_major_storage.inl │ │ │ ├── matrix_operation.hpp │ │ │ ├── matrix_operation.inl │ │ │ ├── matrix_query.hpp │ │ │ ├── matrix_query.inl │ │ │ ├── matrix_transform_2d.hpp │ │ │ ├── matrix_transform_2d.inl │ │ │ ├── mixed_product.hpp │ │ │ ├── mixed_product.inl │ │ │ ├── multiple.hpp │ │ │ ├── multiple.inl │ │ │ ├── noise.hpp │ │ │ ├── norm.hpp │ │ │ ├── norm.inl │ │ │ ├── normal.hpp │ │ │ ├── normal.inl │ │ │ ├── normalize_dot.hpp │ │ │ ├── normalize_dot.inl │ │ │ ├── number_precision.hpp │ │ │ ├── number_precision.inl │ │ │ ├── optimum_pow.hpp │ │ │ ├── optimum_pow.inl │ │ │ ├── orthonormalize.hpp │ │ │ ├── orthonormalize.inl │ │ │ ├── perpendicular.hpp │ │ │ ├── perpendicular.inl │ │ │ ├── polar_coordinates.hpp │ │ │ ├── polar_coordinates.inl │ │ │ ├── projection.hpp │ │ │ ├── projection.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── random.hpp │ │ │ ├── raw_data.hpp │ │ │ ├── raw_data.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── rotate_normalized_axis.hpp │ │ │ ├── rotate_normalized_axis.inl │ │ │ ├── rotate_vector.hpp │ │ │ ├── rotate_vector.inl │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── simd_mat4.hpp │ │ │ ├── simd_mat4.inl │ │ │ ├── simd_quat.hpp │ │ │ ├── simd_quat.inl │ │ │ ├── simd_vec4.hpp │ │ │ ├── simd_vec4.inl │ │ │ ├── spline.hpp │ │ │ ├── spline.inl │ │ │ ├── std_based_type.hpp │ │ │ ├── std_based_type.inl │ │ │ ├── string_cast.hpp │ │ │ ├── string_cast.inl │ │ │ ├── transform.hpp │ │ │ ├── transform.inl │ │ │ ├── transform2.hpp │ │ │ ├── transform2.inl │ │ │ ├── ulp.hpp │ │ │ ├── unsigned_int.hpp │ │ │ ├── unsigned_int.inl │ │ │ ├── vec1.hpp │ │ │ ├── vec1.inl │ │ │ ├── vector_angle.hpp │ │ │ ├── vector_angle.inl │ │ │ ├── vector_query.hpp │ │ │ ├── vector_query.inl │ │ │ ├── wrap.hpp │ │ │ └── wrap.inl │ │ ├── integer.hpp │ │ ├── mat2x2.hpp │ │ ├── mat2x3.hpp │ │ ├── mat2x4.hpp │ │ ├── mat3x2.hpp │ │ ├── mat3x3.hpp │ │ ├── mat3x4.hpp │ │ ├── mat4x2.hpp │ │ ├── mat4x3.hpp │ │ ├── mat4x4.hpp │ │ ├── matrix.hpp │ │ ├── packing.hpp │ │ ├── trigonometric.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ ├── vector_relational.hpp │ │ └── virtrev │ │ │ └── xstream.hpp │ ├── samples_platform.h │ ├── util.cpp │ ├── util.hpp │ ├── util_init.cpp │ └── util_init.hpp ├── validation_cache │ ├── validation_cache.cpp │ ├── validation_cache.frag │ └── validation_cache.vert └── vulkan_1_1_flexible │ └── vulkan_1_1_flexible.cpp ├── BUILD.md ├── CMakeLists-SDK.txt ├── CMakeLists.txt ├── LICENSE.txt ├── README-contrib.md ├── README.md ├── Sample-Programs └── Hologram │ ├── CMakeLists.txt │ ├── Game.h │ ├── Helpers.h │ ├── Hologram.cpp │ ├── Hologram.frag │ ├── Hologram.h │ ├── Hologram.push_constant.vert │ ├── Hologram.vert │ ├── Main.cpp │ ├── Meshes.cpp │ ├── Meshes.h │ ├── Meshes.teapot.h │ ├── README.md │ ├── Shell.cpp │ ├── Shell.h │ ├── ShellAndroid.cpp │ ├── ShellAndroid.h │ ├── ShellWayland.cpp │ ├── ShellWayland.h │ ├── ShellWin32.cpp │ ├── ShellWin32.h │ ├── ShellXcb.cpp │ ├── ShellXcb.h │ ├── Simulation.cpp │ ├── Simulation.h │ ├── android │ ├── CMakeLists.txt │ ├── build-and-install │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── jni │ │ ├── HelpersDispatchTable.cpp │ │ ├── HelpersDispatchTable.h │ │ ├── Hologram.frag.h │ │ ├── Hologram.push_constant.vert.h │ │ └── Hologram.vert.h │ │ └── res │ │ └── values │ │ └── strings.xml │ └── generate-dispatch-table ├── Vulkan_LogoBug_48px_Nov17.png ├── build.gradle ├── build_windows_samples_sdk.bat ├── cmake ├── Copyright_cmake.txt ├── FindImageMagick.cmake ├── FindPCIAccess.cmake ├── FindPthreadStubs.cmake ├── FindUDev.cmake ├── FindValgrind.cmake ├── FindVulkan.cmake ├── FindWayland.cmake ├── FindX11_XCB.cmake ├── FindXCB.cmake ├── README.txt └── cmake_uninstall.cmake.in ├── external_revisions ├── glslang_giturl └── glslang_revision ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── samples_images ├── CopyBlitImage.png ├── Hologram.png ├── Overlay.png ├── cube.png ├── drawcube.png ├── drawsubpasses.png ├── drawtexturedcube.png ├── dynamicuniform.png ├── immutable_sampler.png ├── inputattachment.png ├── memory_barriers.png ├── multiplesets.png ├── multithreadedcmdbuf.png ├── occlusionquery.png ├── pipeline_cache.png ├── push_constants.png ├── secondarycmd.png ├── separate_image_sampler.png ├── sorttable.js ├── spirv_assembly.png ├── spirv_specialization.png ├── template.png └── texelbuffer.png ├── samples_index.html ├── scripts ├── check_code_format.sh ├── determine_vs_version.py ├── fetch_glslangvalidator.py ├── fetch_spirv_tools.py ├── generate_spirv.py ├── known_good.json └── update_deps.py ├── settings.gradle ├── update_external_sources.bat └── update_external_sources.sh /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # Use defaults from the Google style with the following exceptions: 3 | BasedOnStyle: Google 4 | IndentWidth: 4 5 | ColumnLimit: 132 6 | SortIncludes: false 7 | ... 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # See https://git-scm.com/docs/gitattributes 2 | # See https://help.github.com/articles/dealing-with-line-endings/ 3 | 4 | # default behavior, if core.autocrlf is unset. 5 | * text=auto 6 | 7 | # files to be converted to native line endings on checkout. 8 | *.cpp text 9 | *.h text 10 | 11 | # files to always have CRLF line endings on checkout. 12 | *.bat text eol=crlf 13 | 14 | # files to always have CR line endings on checkout. 15 | *.sh text eol=cr 16 | 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Android build related files 2 | .gradle 3 | .idea 4 | build 5 | .DS_Store 6 | *.iml 7 | local.properties 8 | .externalNativeBuild 9 | .cxx 10 | 11 | # facilitating the upstream sync for gradle files 12 | API-Samples/android/build.gradle 13 | API-Samples/android/gradle.properties 14 | API-Samples/android/gradle 15 | API-Samples/android/gradlew 16 | API-Samples/android/gradlew.bat 17 | 18 | Utilities/WSIWindow_Sample1/android/app/.gitignore 19 | 20 | # Upstream CI infrastructure is not neccessary; could be turned on once verified on this repo 21 | /.appveyor.yml 22 | /.travis.yml 23 | 24 | CMakeCache.txt 25 | CMakeLists.txt.user 26 | CMakeFiles/ 27 | cmake_install.cmake 28 | Makefile 29 | scripts/__pycache__ 30 | VKConfig.h 31 | *.so 32 | *.so.* 33 | _out64 34 | out32/* 35 | out64/* 36 | demos/Debug/* 37 | demos/Win32/Debug/* 38 | demos/xcb_nvidia.dir/* 39 | demos/smoke/HelpersDispatchTable.cpp 40 | demos/smoke/HelpersDispatchTable.h 41 | Layer-Samples/data/overlay-frag.spv 42 | Layer-Samples/data/overlay-vert.spv 43 | libs/Win32/Debug/* 44 | *.pyc 45 | *.vcproj 46 | *.sln 47 | *.suo 48 | *.vcxproj 49 | *.sdf 50 | *.filters 51 | build 52 | build32 53 | dbuild 54 | external 55 | build-android/external 56 | *.config 57 | *.creator 58 | *.creator.user 59 | *.files 60 | *.includes 61 | *.autosave 62 | .DS_Store 63 | .idea 64 | .gradle 65 | .externalNativeBuild 66 | *.iml 67 | .vscode/ 68 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/.gitmodules -------------------------------------------------------------------------------- /.google/packaging.yaml: -------------------------------------------------------------------------------- 1 | status: PUBLISHED 2 | technologies: [Android, NDK, Vulkan] 3 | categories: [NDK] 4 | languages: [C++] 5 | solutions: [Mobile] 6 | github: googlesamples/vulkan-basic-samples 7 | license: apache2 8 | -------------------------------------------------------------------------------- /API-Samples/02-enumerate_devices/02-enumerate_devices.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Vulkan Samples 3 | * 4 | * Copyright (C) 2015-2016 Valve Corporation 5 | * Copyright (C) 2015-2016 LunarG, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | /* 21 | VULKAN_SAMPLE_SHORT_DESCRIPTION 22 | enumerate physical devices 23 | */ 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | int sample_main(int argc, char *argv[]) { 30 | struct sample_info info = {}; 31 | init_global_layer_properties(info); 32 | init_instance(info, "vulkansamples_enumerate"); 33 | 34 | /* VULKAN_KEY_START */ 35 | 36 | uint32_t gpu_count = 1; 37 | VkResult U_ASSERT_ONLY res = vkEnumeratePhysicalDevices(info.inst, &gpu_count, NULL); 38 | assert(gpu_count); 39 | info.gpus.resize(gpu_count); 40 | res = vkEnumeratePhysicalDevices(info.inst, &gpu_count, info.gpus.data()); 41 | assert(!res && gpu_count >= 1); 42 | 43 | /* VULKAN_KEY_END */ 44 | 45 | vkDestroyInstance(info.inst, NULL); 46 | 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /API-Samples/11-init_shaders/11-init_shaders.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/11-init_shaders/11-init_shaders.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } -------------------------------------------------------------------------------- /API-Samples/14-init_pipeline/14-init_pipeline.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } 9 | -------------------------------------------------------------------------------- /API-Samples/14-init_pipeline/14-init_pipeline.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform bufferVals { 5 | mat4 mvp; 6 | } myBufferVals; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec4 inColor; 9 | layout (location = 0) out vec4 outColor; 10 | void main() { 11 | outColor = inColor; 12 | gl_Position = myBufferVals.mvp * pos; 13 | } -------------------------------------------------------------------------------- /API-Samples/15-draw_cube/15-draw_cube.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } 9 | -------------------------------------------------------------------------------- /API-Samples/15-draw_cube/15-draw_cube.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform bufferVals { 5 | mat4 mvp; 6 | } myBufferVals; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec4 inColor; 9 | layout (location = 0) out vec4 outColor; 10 | void main() { 11 | outColor = inColor; 12 | gl_Position = myBufferVals.mvp * pos; 13 | } -------------------------------------------------------------------------------- /API-Samples/README-codegen.md: -------------------------------------------------------------------------------- 1 | # Codegen 2 | Certain utility and set up code will be reused in multiple samples. Rather 3 | than duplicate this code in each sample, *future* plans include developing 4 | a codegen capability that will substitute this utility code into sample(s) 5 | at build time. More details will be provided as this develops. 6 | 7 | -------------------------------------------------------------------------------- /API-Samples/README.md: -------------------------------------------------------------------------------- 1 | # Code and Other Conventions for Vulkan Samples 2 | 3 | - The Vulkan version to which the sample is being written must be the prefix 4 | in the sample code file name. For example, vk0.10-SAMPLE.cpp. 5 | 6 | - A sample should highlight a specific Vulkan entry point or capability 7 | which must be identified in the name of the sample source file. For 8 | example, vk0.10-device-info.cpp. 9 | 10 | - Use the data/ (Vulkan-release-independent) and data/VERSION/ 11 | (Vulkan-release-dependent) directories for uniquely-named data, shaders, 12 | images, etc. used by your sample. VERSION must match the version prefix 13 | used in the sample file name. For example, a shader file for 14 | $VULKAN_SAMPLES/src/vk0.10-imageformat.cpp could be 15 | $VULKAN_SAMPLES/data/vk0.10/imgf-texture-2d.spv. 16 | 17 | - Each sample should include a comment of the following form used for auto- 18 | extraction of a short one-line description of the sample: 19 | 20 | ``` 21 | /* 22 | VULKAN_SAMPLE_SHORT_DESCRIPTION 23 | short description of sample 24 | */ 25 | ``` 26 | - Each sample may include a comment of the following form used for auto- 27 | extraction of a more detailed, multi-line description of the sample: 28 | 29 | ``` 30 | /* 31 | VULKAN_SAMPLE_DESCRIPTION_START 32 | short description of sample 33 | continued here 34 | and here 35 | VULKAN_SAMPLE_DESCRIPTION_END 36 | */ 37 | ``` 38 | 39 | - For easier navigation to the relevant section(s) of code in the source 40 | file, where applicable, the sections should be identified by the following 41 | comment header/footer: 42 | 43 | ``` 44 | /* VULKAN_KEY_START */ 45 | /* VULKAN_KEY_END */ 46 | ``` 47 | 48 | -------------------------------------------------------------------------------- /API-Samples/Tutorial/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | -------------------------------------------------------------------------------- /API-Samples/Tutorial/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment13": "Line length", 3 | "MD013": false, 4 | "_comment32": "Lists should be surrounded by blank lines", 5 | "MD032": false, 6 | "_comment33": "Inline HTML", 7 | "MD033": false 8 | } -------------------------------------------------------------------------------- /API-Samples/Tutorial/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "markdown.styles": [ 4 | "css/lg_stylesheet.css" 5 | ] 6 | } -------------------------------------------------------------------------------- /API-Samples/Tutorial/build.bat: -------------------------------------------------------------------------------- 1 | rmdir /Q /S out 2 | mkdir out 3 | mkdir out\html 4 | mkdir out\css 5 | mkdir out\images 6 | 7 | pushd markdown 8 | for /R "." %%f in (*.md) do ( 9 | perl ..\tools\Markdown.pl --html4tags %%~nf.md > ..\out\html\%%~nf.html 10 | ) 11 | popd 12 | copy /y css\lg_stylesheet.css out\css\lg_stylesheet.css 13 | copy /y images\*.png out\images 14 | copy /y images\bg-starfield.jpg out\images\bg-starfield.jpg 15 | -------------------------------------------------------------------------------- /API-Samples/Tutorial/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OUTDIR="${OUTDIR:-out}" 3 | mkdir -p "${OUTDIR}/html" 4 | mkdir -p "${OUTDIR}/css" 5 | mkdir -p "${OUTDIR}/images" 6 | 7 | for i in markdown/*.md; do 8 | file=${i##*/} 9 | base=${file%.*} 10 | perl tools/Markdown.pl --html4tags $i > "${OUTDIR}/html/${base}.html" 11 | done 12 | cp css/lg_stylesheet.css "${OUTDIR}/css" 13 | cp images/*.png "${OUTDIR}/images" 14 | cp images/bg-starfield.jpg "${OUTDIR}/images" 15 | -------------------------------------------------------------------------------- /API-Samples/Tutorial/css/lg_stylesheet.css: -------------------------------------------------------------------------------- 1 | html { 2 | background: url('../images/bg-starfield.jpg'); 3 | background-attachment: fixed; 4 | background-size: cover; 5 | } 6 | 7 | body { 8 | font-family: Helvetica, Arial, sans-serif; 9 | font-size: 14px; 10 | line-height: 1.42857143; 11 | color: #e8e8e8; 12 | width: 700px; 13 | margin: auto; 14 | background-color: 3F3F3F; 15 | position: relative; 16 | padding: 0 30px; 17 | } 18 | 19 | pre { 20 | background-color: rgba(0,0,0,.5); 21 | font-size: 1em; 22 | display: block; 23 | padding: 9.5px; 24 | margin: 0 0 10px; 25 | font-size: 13px; 26 | line-height: 1.42857143; 27 | word-break: break-all; 28 | word-wrap: break-word; 29 | color: #2F2F2F; 30 | border: 1px solid #ccc; 31 | border-radius: 3px; 32 | font-family: Menlo,Monaco,Consolas,"Courier New",monospace; 33 | overflow: auto; 34 | } 35 | 36 | code { 37 | color: #D1D1D1; 38 | } 39 | 40 | a { 41 | color: #3bdae6; 42 | background-color:transparent; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | 47 | .nav-bar { 48 | margin: none; 49 | padding: none; 50 | position: static; 51 | } 52 | -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/BasicAppLoader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/BasicAppLoader.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/CommandBufferInsert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/CommandBufferInsert.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/DepthBufferBindView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/DepthBufferBindView.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/Device1QueueFamilies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/Device1QueueFamilies.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/Device2QueueFamilies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/Device2QueueFamilies.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/FrameBuffers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/FrameBuffers.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/GraphicsPipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/GraphicsPipeline.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/ImageMemoryLayout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/ImageMemoryLayout.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/PhysicalDeviceQueueFamilyProperties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/PhysicalDeviceQueueFamilyProperties.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/PhysicalDeviceQueueFamilyProperties.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/PhysicalDevices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/PhysicalDevices.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/RenderPassLayouts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/RenderPassLayouts.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/Swapchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/Swapchain.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/bg-starfield.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/bg-starfield.jpg -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/drawcube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/drawcube.png -------------------------------------------------------------------------------- /API-Samples/Tutorial/images/vulkanlogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/Tutorial/images/vulkanlogo.png -------------------------------------------------------------------------------- /API-Samples/android/01-init_instance/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 01-init_instance 16 | -------------------------------------------------------------------------------- /API-Samples/android/01-init_instance/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 01-init_instance 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/02-enumerate_devices/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 02-enumerate_devices 16 | -------------------------------------------------------------------------------- /API-Samples/android/02-enumerate_devices/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 02-enumerate_devices 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/03-init_device/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 03-init_device 16 | -------------------------------------------------------------------------------- /API-Samples/android/03-init_device/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 03-init_device 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/04-init_command_buffer/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 04-init_command_buffer 16 | -------------------------------------------------------------------------------- /API-Samples/android/04-init_command_buffer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 04-init_command_buffer 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/05-init_swapchain/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 05-init_swapchain 16 | -------------------------------------------------------------------------------- /API-Samples/android/05-init_swapchain/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 05-init_swapchain 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/06-init_depth_buffer/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 06-init_depth_buffer 16 | -------------------------------------------------------------------------------- /API-Samples/android/06-init_depth_buffer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 06-init_depth_buffer 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/07-init_uniform_buffer/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 07-init_uniform_buffer 16 | -------------------------------------------------------------------------------- /API-Samples/android/07-init_uniform_buffer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 07-init_uniform_buffer 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/08-init_pipeline_layout/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 08-init_pipeline_layout 16 | -------------------------------------------------------------------------------- /API-Samples/android/08-init_pipeline_layout/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 08-init_pipeline_layout 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/09-init_descriptor_set/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 09-init_descriptor_set 16 | -------------------------------------------------------------------------------- /API-Samples/android/09-init_descriptor_set/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 09-init_descriptor_set 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/10-init_render_pass/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 10-init_render_pass 16 | -------------------------------------------------------------------------------- /API-Samples/android/10-init_render_pass/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 10-init_render_pass 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/11-init_shaders/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 11-init_shaders 16 | -------------------------------------------------------------------------------- /API-Samples/android/11-init_shaders/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 11-init_shaders 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/12-init_frame_buffers/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 12-init_frame_buffers 16 | -------------------------------------------------------------------------------- /API-Samples/android/12-init_frame_buffers/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 12-init_frame_buffers 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/13-init_vertex_buffer/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 13-init_vertex_buffer 16 | -------------------------------------------------------------------------------- /API-Samples/android/13-init_vertex_buffer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 13-init_vertex_buffer 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/14-init_pipeline/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 14-init_pipeline 16 | -------------------------------------------------------------------------------- /API-Samples/android/14-init_pipeline/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 14-init_pipeline 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/15-draw_cube/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 15-draw_cube 16 | -------------------------------------------------------------------------------- /API-Samples/android/15-draw_cube/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 15-draw_cube 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/16-vulkan_1_1/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: 16-vulkan_1_1 16 | -------------------------------------------------------------------------------- /API-Samples/android/16-vulkan_1_1/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 16-vulkan_1_1 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/copy_blit_image/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: copy_blit_image 16 | -------------------------------------------------------------------------------- /API-Samples/android/copy_blit_image/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | copy_blit_image 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/create_debug_report_callback/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: create_debug_report_callback 16 | -------------------------------------------------------------------------------- /API-Samples/android/create_debug_report_callback/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | create_debug_report_callback 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/draw_subpasses/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: draw_subpasses 16 | -------------------------------------------------------------------------------- /API-Samples/android/draw_subpasses/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | draw_subpasses 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/draw_textured_cube/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: draw_textured_cube 16 | -------------------------------------------------------------------------------- /API-Samples/android/draw_textured_cube/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | draw_textured_cube 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/dynamic_uniform/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: dynamic_uniform 16 | -------------------------------------------------------------------------------- /API-Samples/android/dynamic_uniform/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | dynamic_uniform 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/enable_validation_with_callback/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: enable_validation_with_callback 16 | -------------------------------------------------------------------------------- /API-Samples/android/enable_validation_with_callback/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | enable_validation_with_callback 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/enumerate_devices_adv/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: enumerate_devices_adv 16 | -------------------------------------------------------------------------------- /API-Samples/android/enumerate_devices_adv/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | enumerate_devices_adv 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/events/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: events 16 | -------------------------------------------------------------------------------- /API-Samples/android/events/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | events 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/immutable_sampler/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: immutable_sampler 16 | -------------------------------------------------------------------------------- /API-Samples/android/immutable_sampler/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | immutable_sampler 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/init_texture/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: init_texture 16 | -------------------------------------------------------------------------------- /API-Samples/android/init_texture/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | init_texture 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/input_attachment/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: input_attachment 16 | -------------------------------------------------------------------------------- /API-Samples/android/input_attachment/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | input_attachment 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/instance_extension_properties/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: instance_extension_properties 16 | -------------------------------------------------------------------------------- /API-Samples/android/instance_extension_properties/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | instance_extension_properties 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/instance_layer_extension_properties/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: instance_layer_extension_properties 16 | -------------------------------------------------------------------------------- /API-Samples/android/instance_layer_extension_properties/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | instance_layer_extension_properties 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/instance_layer_properties/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: instance_layer_properties 16 | -------------------------------------------------------------------------------- /API-Samples/android/instance_layer_properties/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | instance_layer_properties 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/memory_barriers/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: memory_barriers 16 | -------------------------------------------------------------------------------- /API-Samples/android/memory_barriers/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | memory_barriers 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/multiple_sets/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: multiple_sets 16 | -------------------------------------------------------------------------------- /API-Samples/android/multiple_sets/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | multiple_sets 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/multithreaded_command_buffers/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: multithreaded_command_buffers 16 | -------------------------------------------------------------------------------- /API-Samples/android/multithreaded_command_buffers/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | multithreaded_command_buffers 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/occlusion_query/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: occlusion_query 16 | -------------------------------------------------------------------------------- /API-Samples/android/occlusion_query/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | occlusion_query 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/pipeline_cache/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: pipeline_cache 16 | -------------------------------------------------------------------------------- /API-Samples/android/pipeline_cache/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | pipeline_cache 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/pipeline_derivative/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: pipeline_derivative 16 | -------------------------------------------------------------------------------- /API-Samples/android/pipeline_derivative/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | pipeline_derivative 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/project_template/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | @SAMPLE_DESCRIPTION@ -------------------------------------------------------------------------------- /API-Samples/android/project_template/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | @SAMPLE_NAME@ 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/push_constants/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: push_constants 16 | -------------------------------------------------------------------------------- /API-Samples/android/push_constants/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | push_constants 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/push_descriptors/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: push_descriptors 16 | -------------------------------------------------------------------------------- /API-Samples/android/push_descriptors/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | push_descriptors 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/secondary_command_buffer/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: secondary_command_buffer 16 | -------------------------------------------------------------------------------- /API-Samples/android/secondary_command_buffer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | secondary_command_buffer 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/separate_image_sampler/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: separate_image_sampler 16 | -------------------------------------------------------------------------------- /API-Samples/android/separate_image_sampler/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | separate_image_sampler 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/settings.gradle.in: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // configure path to the source code generated on your machine 16 | @SETTINGS_GRADLE@ 17 | -------------------------------------------------------------------------------- /API-Samples/android/spirv_assembly/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: spirv_assembly 16 | -------------------------------------------------------------------------------- /API-Samples/android/spirv_assembly/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | spirv_assembly 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/spirv_specialization/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: spirv_specialization 16 | -------------------------------------------------------------------------------- /API-Samples/android/spirv_specialization/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | spirv_specialization 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/template/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: template 16 | -------------------------------------------------------------------------------- /API-Samples/android/template/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | template 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/texel_buffer/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: texel_buffer 16 | -------------------------------------------------------------------------------- /API-Samples/android/texel_buffer/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | texel_buffer 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/validation_cache/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: validation_cache 16 | -------------------------------------------------------------------------------- /API-Samples/android/validation_cache/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | validation_cache 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/android/vulkan_1_1_flexible/README.md: -------------------------------------------------------------------------------- 1 | Copyright 2016 Google Inc. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | 15 | Vulkan sample: vulkan_1_1_flexible 16 | -------------------------------------------------------------------------------- /API-Samples/android/vulkan_1_1_flexible/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | vulkan_1_1_flexible 20 | 21 | -------------------------------------------------------------------------------- /API-Samples/data/blue.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/blue.ppm -------------------------------------------------------------------------------- /API-Samples/data/green.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/green.ppm -------------------------------------------------------------------------------- /API-Samples/data/logo-256x256-solid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/logo-256x256-solid.png -------------------------------------------------------------------------------- /API-Samples/data/logo-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/logo-256x256.png -------------------------------------------------------------------------------- /API-Samples/data/lunarg.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/lunarg.ppm -------------------------------------------------------------------------------- /API-Samples/data/red.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/red.ppm -------------------------------------------------------------------------------- /API-Samples/data/spotlight.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/spotlight.ppm -------------------------------------------------------------------------------- /API-Samples/data/yellow.ppm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/data/yellow.ppm -------------------------------------------------------------------------------- /API-Samples/draw_subpasses/draw_subpasses.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } 9 | -------------------------------------------------------------------------------- /API-Samples/draw_subpasses/draw_subpasses.full.vert: -------------------------------------------------------------------------------- 1 | // This shader renders a simple fullscreen quad using the VS alone 2 | #version 400 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = vec4(1.0f, 0.1f, 0.1f, 0.5f); 8 | const vec4 verts[4] = vec4[4](vec4(-1.0, -1.0, 0.5, 1.0), 9 | vec4( 1.0, -1.0, 0.5, 1.0), 10 | vec4(-1.0, 1.0, 0.5, 1.0), 11 | vec4( 1.0, 1.0, 0.5, 1.0)); 12 | 13 | gl_Position = verts[gl_VertexIndex]; 14 | } -------------------------------------------------------------------------------- /API-Samples/draw_subpasses/draw_subpasses.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform bufferVals { 5 | mat4 mvp; 6 | } myBufferVals; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec4 inColor; 9 | layout (location = 0) out vec4 outColor; 10 | void main() { 11 | outColor = inColor; 12 | gl_Position = myBufferVals.mvp * pos; 13 | } -------------------------------------------------------------------------------- /API-Samples/draw_textured_cube/draw_textured_cube.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/draw_textured_cube/draw_textured_cube.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/dynamic_uniform/dynamic_uniform.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } 9 | -------------------------------------------------------------------------------- /API-Samples/dynamic_uniform/dynamic_uniform.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform bufferVals { 5 | mat4 mvp; 6 | } myBufferVals; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec4 inColor; 9 | layout (location = 0) out vec4 outColor; 10 | void main() { 11 | outColor = inColor; 12 | gl_Position = myBufferVals.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/get-descripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # get long description of vulkan sample applications 4 | # - currently displays descriptions for all samples that have set 5 | # a long description via the VULKAN_SAMPLE_DESCRIPTION_START and 6 | # VULKAN_SAMPLE_DESCRIPTION_END keywords 7 | # 8 | # usage: get-descripts.sh 9 | # 10 | # TODO - support filename(s) options - display descripts for only those samples 11 | 12 | # save command directory 13 | CMDDIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" 14 | 15 | SAMPS=`find "$CMDDIR" -name *.cpp -not -path "*util*"` 16 | 17 | # read all source .cpp files and display the long description 18 | IFS=$(echo -en "\n\b") 19 | for f in $SAMPS 20 | do 21 | DESCRIPT=`sed -n '/^VULKAN_SAMPLE_DESCRIPTION_START$/,/^VULKAN_SAMPLE_DESCRIPTION_END$/{ /^VULKAN_SAMPLE_DESCRIPTION_START/d; /^VULKAN_SAMPLE_DESCRIPTION_END/d; p; }' "$f"` 22 | BNAME=`basename $f` 23 | if [ ! -z "$DESCRIPT" ]; then 24 | echo "$BNAME:" 25 | echo "$DESCRIPT" 26 | echo "" 27 | else 28 | echo "$BNAME:" 29 | echo No Description 30 | echo "" 31 | fi 32 | done 33 | 34 | -------------------------------------------------------------------------------- /API-Samples/get-short-descripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # return short description of identified or all samples 4 | # get-short-descript.sh [--nofname] [--sampfname sample_source_file_name] 5 | # 6 | # - uses VULKAN_SAMPLE_SHORT_DESCRIPTION keyword from source file 7 | # - default (no options) will display short descriptions for all samples 8 | # - default display format: displays sample file names and short descriptions 9 | # filename.cpp: short descript 10 | # - specify --nofname to suppress display of the filename 11 | 12 | NOFNAME="" 13 | 14 | # save command directory 15 | CMDDIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" 16 | 17 | # default to displaying short descriptions of all samples 18 | SAMP2DISP=`find "$CMDDIR" -name *.cpp -not -path "*util*"` 19 | 20 | 21 | # parse the arguments 22 | while test $# -gt 0; do 23 | case "$1" in 24 | --nofname) 25 | NOFNAME=true 26 | ;; 27 | --sampfname) 28 | shift 29 | SAMP2DISP=$1 30 | ;; 31 | esac 32 | 33 | shift 34 | done 35 | 36 | # read all identified .cpp file(s) and display the short description 37 | IFS=$(echo -en "\n\b") 38 | for f in $SAMP2DISP 39 | do 40 | SHORT_DESCRIPT=`sed -n '/VULKAN_SAMPLE_SHORT_DESCRIPTION/{n;p}' $f` 41 | BNAME=`basename $f` 42 | if test -z $NOFNAME; then 43 | echo "$BNAME: $SHORT_DESCRIPT" 44 | else 45 | echo "$SHORT_DESCRIPT" 46 | fi 47 | done 48 | 49 | -------------------------------------------------------------------------------- /API-Samples/immutable_sampler/immutable_sampler.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (set = 0, binding = 1) uniform sampler2D surface; 5 | layout (location = 0) in vec2 inTexCoords; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | 9 | // Sample from the texture, using an immutable sampler 10 | outColor = texture(surface, inTexCoords); 11 | 12 | } -------------------------------------------------------------------------------- /API-Samples/immutable_sampler/immutable_sampler.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 outTexCoords; 10 | void main() { 11 | outTexCoords = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/input_attachment/input_attachment.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | layout (input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput 3 | myInputAttachment; 4 | layout (location = 0) out vec4 outColor; 5 | void main() { 6 | outColor = subpassLoad(myInputAttachment); 7 | } -------------------------------------------------------------------------------- /API-Samples/input_attachment/input_attachment.vert: -------------------------------------------------------------------------------- 1 | #version 450 2 | vec2 vertices[3]; 3 | void main() { 4 | vertices[0] = vec2(-1.0, -1.0); 5 | vertices[1] = vec2( 1.0, -1.0); 6 | vertices[2] = vec2( 0.0, 1.0); 7 | gl_Position = vec4(vertices[gl_VertexIndex % 3], 0.0, 1.0); 8 | } -------------------------------------------------------------------------------- /API-Samples/memory_barriers/memory_barriers.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/memory_barriers/memory_barriers.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/multiple_sets/multiple_sets.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 inColor; 5 | layout (location = 1) in vec2 inTexCoords; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | vec4 resColor = inColor; 9 | // Create a border to see the cube more easily 10 | if (inTexCoords.x < 0.01 || inTexCoords.x > 0.99) 11 | resColor *= vec4(0.1, 0.1, 0.1, 1.0); 12 | if (inTexCoords.y < 0.01 || inTexCoords.y > 0.99) 13 | resColor *= vec4(0.1, 0.1, 0.1, 1.0); 14 | outColor = resColor; 15 | } -------------------------------------------------------------------------------- /API-Samples/multiple_sets/multiple_sets.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | // Note, set = 0 here 5 | layout (std140, set = 0, binding = 0) uniform bufferVals { 6 | mat4 mvp; 7 | } myBufferVals; 8 | // And set = 1 here 9 | layout (set = 1, binding = 0) uniform sampler2D surface; 10 | layout (location = 0) in vec4 pos; 11 | layout (location = 1) in vec2 inTexCoords; 12 | layout (location = 0) out vec4 outColor; 13 | layout (location = 1) out vec2 outTexCoords; 14 | void main() { 15 | outColor = texture(surface, vec2(0.0)); 16 | outTexCoords = inTexCoords; 17 | gl_Position = myBufferVals.mvp * pos; 18 | } -------------------------------------------------------------------------------- /API-Samples/multithreaded_command_buffers/multithreaded_command_buffers.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } -------------------------------------------------------------------------------- /API-Samples/multithreaded_command_buffers/multithreaded_command_buffers.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 pos; 5 | layout (location = 1) in vec4 inColor; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = inColor; 9 | gl_Position = pos; 10 | } -------------------------------------------------------------------------------- /API-Samples/occlusion_query/occlusion_query.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } 9 | -------------------------------------------------------------------------------- /API-Samples/occlusion_query/occlusion_query.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform bufferVals { 5 | mat4 mvp; 6 | } myBufferVals; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec4 inColor; 9 | layout (location = 0) out vec4 outColor; 10 | void main() { 11 | outColor = inColor; 12 | gl_Position = myBufferVals.mvp * pos; 13 | } -------------------------------------------------------------------------------- /API-Samples/pipeline_cache/pipeline_cache.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/pipeline_cache/pipeline_cache.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/pipeline_derivative/pipeline_derivative.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/pipeline_derivative/pipeline_derivative.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/pipeline_derivative/pipeline_derivative2.frag: -------------------------------------------------------------------------------- 1 | #version 450 2 | layout (location = 0) in vec2 texcoord; 3 | layout (location = 0) out vec4 outColor; 4 | void main() { 5 | outColor = vec4(texcoord.x, texcoord.y, 6 | 1.0 - texcoord.x - texcoord.y, 1.0f); 7 | } -------------------------------------------------------------------------------- /API-Samples/push_constants/push_constants.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout(push_constant) uniform pushBlock { 5 | int iFoo; 6 | float fBar; 7 | } pushConstantsBlock; 8 | layout (location = 0) in vec2 inTexCoords; 9 | layout (location = 0) out vec4 outColor; 10 | void main() { 11 | 12 | vec4 green = vec4(0.0, 1.0, 0.0, 1.0); 13 | vec4 red = vec4(1.0, 0.0, 0.0, 1.0); 14 | 15 | // Start with passing color 16 | vec4 resColor = green; 17 | 18 | // See if we've read in the correct push constants 19 | if (pushConstantsBlock.iFoo != 2) 20 | resColor = red; 21 | if (pushConstantsBlock.fBar != 1.0f) 22 | resColor = red; 23 | 24 | // Create a border to see the cube more easily 25 | if (inTexCoords.x < 0.01 || inTexCoords.x > 0.99) 26 | resColor *= vec4(0.1, 0.1, 0.1, 1.0); 27 | if (inTexCoords.y < 0.01 || inTexCoords.y > 0.99) 28 | resColor *= vec4(0.1, 0.1, 0.1, 1.0); 29 | outColor = resColor; 30 | } -------------------------------------------------------------------------------- /API-Samples/push_constants/push_constants.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 outTexCoords; 10 | void main() { 11 | outTexCoords = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/push_descriptors/push_descriptors.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/push_descriptors/push_descriptors.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/run_all_samples.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2020 LunarG, Inc. 2 | # To be run from build/API-Samples 3 | 4 | import os, subprocess, platform 5 | 6 | if platform.system() == 'Windows': 7 | for subdir in ["Debug", "Release"]: 8 | if os.path.isdir(subdir): 9 | directory = os.path.realpath(subdir) 10 | break 11 | else: 12 | sys.exit("Cannot find samples in Debug or Release, have they been built?") 13 | suffix = ".exe" 14 | else: 15 | directory = os.getcwd() 16 | suffix = "" 17 | 18 | samples = [] 19 | samplesdir = os.path.join("..", "..", "API-Samples") 20 | for root, dir, files in os.walk(samplesdir): 21 | for file in files: 22 | if file.endswith(".cpp") and "utils" not in root and "android" not in root: 23 | samples.append(os.path.splitext(file)[0]) 24 | 25 | samples.sort() 26 | samples_requiring_validation_layer = ["enable_validation_with_callback", "validation_cache"] 27 | for sample in samples: 28 | executable = os.path.join(directory, sample) 29 | print('exe = ' + executable) 30 | if "VK_LAYER_PATH" not in os.environ and sample in samples_requiring_validation_layer: 31 | print('Skipping {} because it requires validation layers'.format(sample)) 32 | continue 33 | if os.path.isfile(executable + suffix): 34 | print('Running: ' + sample) 35 | subprocess.check_call(executable) 36 | else: 37 | print("Skipping {} because the sample doesn't seem to be built".format(sample)) 38 | -------------------------------------------------------------------------------- /API-Samples/secondary_command_buffer/secondary_command_buffer.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/secondary_command_buffer/secondary_command_buffer.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/separate_image_sampler/separate_image_sampler.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (set = 0, binding = 1) uniform texture2D tex; 5 | layout (set = 0, binding = 2) uniform sampler samp; 6 | layout (location = 0) in vec2 inTexCoords; 7 | layout (location = 0) out vec4 outColor; 8 | void main() { 9 | 10 | // Combine the selected texture with sampler as a parameter 11 | vec4 resColor = texture(sampler2D(tex, samp), inTexCoords); 12 | 13 | // Create a border to see the cube more easily 14 | if (inTexCoords.x < 0.01 || inTexCoords.x > 0.99) 15 | resColor *= vec4(0.1, 0.1, 0.1, 1.0); 16 | if (inTexCoords.y < 0.01 || inTexCoords.y > 0.99) 17 | resColor *= vec4(0.1, 0.1, 0.1, 1.0); 18 | outColor = resColor; 19 | } -------------------------------------------------------------------------------- /API-Samples/separate_image_sampler/separate_image_sampler.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/spirv_specialization/spirv_specialization.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | layout (constant_id = 5) const bool drawUserColor = false; 8 | layout (constant_id = 7) const float r = 0.0f; 9 | layout (constant_id = 8) const float g = 0.0f; 10 | layout (constant_id = 9) const float b = 0.0f; 11 | void main() { 12 | if (drawUserColor) 13 | outColor = vec4(r, g, b, 1.0); 14 | else 15 | outColor = textureLod(tex, texcoord, 0.0); 16 | } -------------------------------------------------------------------------------- /API-Samples/spirv_specialization/spirv_specialization.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/template/template.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 1) uniform sampler2D tex; 5 | layout (location = 0) in vec2 texcoord; 6 | layout (location = 0) out vec4 outColor; 7 | void main() { 8 | outColor = textureLod(tex, texcoord, 0.0); 9 | } -------------------------------------------------------------------------------- /API-Samples/template/template.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/texel_buffer/texel_buffer.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (location = 0) in vec4 color; 5 | layout (location = 0) out vec4 outColor; 6 | void main() { 7 | outColor = color; 8 | } 9 | -------------------------------------------------------------------------------- /API-Samples/texel_buffer/texel_buffer.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (binding = 0) uniform samplerBuffer texels; 5 | layout (location = 0) out vec4 outColor; 6 | vec2 vertices[3]; 7 | float r; 8 | float g; 9 | float b; 10 | void main() { 11 | r = texelFetch(texels, 0).r; 12 | g = texelFetch(texels, 1).r; 13 | b = texelFetch(texels, 2).r; 14 | outColor = vec4(r, g, b, 1.0); 15 | vertices[0] = vec2(-1.0, -1.0); 16 | vertices[1] = vec2( 1.0, -1.0); 17 | vertices[2] = vec2( 0.0, 1.0); 18 | gl_Position = vec4(vertices[gl_VertexIndex % 3], 0.0, 1.0); 19 | } -------------------------------------------------------------------------------- /API-Samples/utils/README.md: -------------------------------------------------------------------------------- 1 | # Utility Functions for the Vulkan Samples Kit 2 | 3 | ## utils.hpp/utils.cpp 4 | 5 | - get_base_data_dir() - return full path to the base data directory; uses 6 | CMAKE definition VULKAN_SAMPLES_BASE_DIR to get the samples base directory 7 | and appends “/data/” 8 | - get_data_dir(__FILE__) - return the full path to the release-specific data 9 | directory 10 | - the version prefix is extracted from __FILE__ to determine the release 11 | specific data directory component 12 | - implies that function must be called from the main sample source file, 13 | not another utility 14 | 15 | Other utility functions may be added to utils.cpp, or new source files created. 16 | 17 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/common.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_COMMON_INCLUDED 30 | #define GLM_COMMON_INCLUDED 31 | 32 | #include "detail/func_common.hpp" 33 | 34 | #endif//GLM_COMMON_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/detail/intrinsic_exponential.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_exponential.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/detail/intrinsic_trigonometric.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_trigonometric.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/detail/precision.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/utils/glm/detail/precision.inl -------------------------------------------------------------------------------- /API-Samples/utils/glm/detail/type_half.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/API-Samples/utils/glm/detail/type_half.inl -------------------------------------------------------------------------------- /API-Samples/utils/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_mat.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_vec.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_swizzle 24 | /// @file glm/gtc/swizzle.inl 25 | /// @date 2009-06-14 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | namespace glm 30 | { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-30 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/closest_point.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef glm_gtx_closest_point 11 | #define glm_gtx_closest_point 12 | 13 | namespace glm 14 | { 15 | template 16 | GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine 17 | ( 18 | detail::tvec3 const & point, 19 | detail::tvec3 const & a, 20 | detail::tvec3 const & b 21 | ) 22 | { 23 | T LineLength = distance(a, b); 24 | detail::tvec3 Vector = point - a; 25 | detail::tvec3 LineDirection = (b - a) / LineLength; 26 | 27 | // Project Vector to LineDirection to get the distance of point from a 28 | T Distance = dot(Vector, LineDirection); 29 | 30 | if(Distance <= T(0)) return a; 31 | if(Distance >= LineLength) return b; 32 | return a + LineDirection * Distance; 33 | } 34 | }//namespace glm 35 | 36 | #endif//glm_gtx_closest_point 37 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/component_wise.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-21 5 | // Updated : 2010-02-12 6 | // Licence : This source is under MIT License 7 | // File : gtx_component_wise.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template class vecType> 13 | GLM_FUNC_QUALIFIER T compAdd(vecType const & v) 14 | { 15 | T result(0); 16 | for(length_t i = 0; i < v.length(); ++i) 17 | result += v[i]; 18 | return result; 19 | } 20 | 21 | template class vecType> 22 | GLM_FUNC_QUALIFIER T compMul(vecType const & v) 23 | { 24 | T result(1); 25 | for(length_t i = 0; i < v.length(); ++i) 26 | result *= v[i]; 27 | return result; 28 | } 29 | 30 | template class vecType> 31 | GLM_FUNC_QUALIFIER T compMin(vecType const & v) 32 | { 33 | T result(v[0]); 34 | for(length_t i = 1; i < v.length(); ++i) 35 | result = min(result, v[i]); 36 | return result; 37 | } 38 | 39 | template class vecType> 40 | GLM_FUNC_QUALIFIER T compMax(vecType const & v) 41 | { 42 | T result(v[0]); 43 | for(length_t i = 1; i < v.length(); ++i) 44 | result = max(result, v[i]); 45 | return result; 46 | } 47 | }//namespace glm 48 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/epsilon.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/epsilon.hpp" 30 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2006-01-07 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/extend.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType extend 14 | ( 15 | genType const & Origin, 16 | genType const & Source, 17 | genType const & Distance 18 | ) 19 | { 20 | return Origin + (Source - Origin) * Distance; 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER detail::tvec2 extend 25 | ( 26 | detail::tvec2 const & Origin, 27 | detail::tvec2 const & Source, 28 | T const & Distance 29 | ) 30 | { 31 | return Origin + (Source - Origin) * Distance; 32 | } 33 | 34 | template 35 | GLM_FUNC_QUALIFIER detail::tvec3 extend 36 | ( 37 | detail::tvec3 const & Origin, 38 | detail::tvec3 const & Source, 39 | T const & Distance 40 | ) 41 | { 42 | return Origin + (Source - Origin) * Distance; 43 | } 44 | 45 | template 46 | GLM_FUNC_QUALIFIER detail::tvec4 extend 47 | ( 48 | detail::tvec4 const & Origin, 49 | detail::tvec4 const & Source, 50 | T const & Distance 51 | ) 52 | { 53 | return Origin + (Source - Origin) * Distance; 54 | } 55 | }//namespace glm 56 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2009-03-06 5 | // Updated : 2013-04-09 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/gradient_paint.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER T radialGradient 14 | ( 15 | detail::tvec2 const & Center, 16 | T const & Radius, 17 | detail::tvec2 const & Focal, 18 | detail::tvec2 const & Position 19 | ) 20 | { 21 | detail::tvec2 F = Focal - Center; 22 | detail::tvec2 D = Position - Focal; 23 | T Radius2 = pow2(Radius); 24 | T Fx2 = pow2(F.x); 25 | T Fy2 = pow2(F.y); 26 | 27 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 28 | T Denominator = Radius2 - (Fx2 + Fy2); 29 | return Numerator / Denominator; 30 | } 31 | 32 | template 33 | GLM_FUNC_QUALIFIER T linearGradient 34 | ( 35 | detail::tvec2 const & Point0, 36 | detail::tvec2 const & Point1, 37 | detail::tvec2 const & Position 38 | ) 39 | { 40 | detail::tvec2 Dist = Point1 - Point0; 41 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-02-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/handed_coordinate_space.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER bool rightHanded 14 | ( 15 | detail::tvec3 const & tangent, 16 | detail::tvec3 const & binormal, 17 | detail::tvec3 const & normal 18 | ) 19 | { 20 | return dot(cross(normal, tangent), binormal) > T(0); 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER bool leftHanded 25 | ( 26 | detail::tvec3 const & tangent, 27 | detail::tvec3 const & binormal, 28 | detail::tvec3 const & normal 29 | ) 30 | { 31 | return dot(cross(normal, tangent), binormal) < T(0); 32 | } 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/int_10_10_10_2.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | namespace glm 25 | { 26 | GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast 27 | ( 28 | glm::vec4 const & v 29 | ) 30 | { 31 | return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30); 32 | } 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-10-24 5 | // Updated : 2008-10-24 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/log_base.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType log( 14 | genType const & x, 15 | genType const & base) 16 | { 17 | assert(x != genType(0)); 18 | 19 | return glm::log(x) / glm::log(base); 20 | } 21 | 22 | VECTORIZE_VEC_SCA(log) 23 | VECTORIZE_VEC_VEC(log) 24 | }//namespace glm 25 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/matrix_cross_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 14 | ( 15 | detail::tvec3 const & x 16 | ) 17 | { 18 | detail::tmat3x3 Result(T(0)); 19 | Result[0][1] = x.z; 20 | Result[1][0] = -x.z; 21 | Result[0][2] = -x.y; 22 | Result[2][0] = x.y; 23 | Result[1][2] = x.x; 24 | Result[2][1] = -x.x; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 30 | ( 31 | detail::tvec3 const & x 32 | ) 33 | { 34 | detail::tmat4x4 Result(T(0)); 35 | Result[0][1] = x.z; 36 | Result[1][0] = -x.z; 37 | Result[0][2] = -x.y; 38 | Result[2][0] = x.y; 39 | Result[1][2] = x.x; 40 | Result[2][1] = -x.x; 41 | return Result; 42 | } 43 | 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-04-03 5 | // Updated : 2008-09-17 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/mixed_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER T mixedProduct 14 | ( 15 | detail::tvec3 const & v1, 16 | detail::tvec3 const & v2, 17 | detail::tvec3 const & v3 18 | ) 19 | { 20 | return dot(cross(v1, v2), v3); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/noise.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/noise.hpp" 30 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2011-06-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/normal.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal 14 | ( 15 | detail::tvec3 const & p1, 16 | detail::tvec3 const & p2, 17 | detail::tvec3 const & p3 18 | ) 19 | { 20 | return normalize(cross(p1 - p2, p1 - p3)); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-10 5 | // Updated : 2007-05-10 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/number_precision.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/orthonormalize.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize 14 | ( 15 | const detail::tmat3x3& m 16 | ) 17 | { 18 | detail::tmat3x3 r = m; 19 | 20 | r[0] = normalize(r[0]); 21 | 22 | float d0 = dot(r[0], r[1]); 23 | r[1] -= r[0] * d0; 24 | r[1] = normalize(r[1]); 25 | 26 | float d1 = dot(r[1], r[2]); 27 | d0 = dot(r[0], r[2]); 28 | r[2] -= r[0] * d0 + r[1] * d1; 29 | r[2] = normalize(r[2]); 30 | 31 | return r; 32 | } 33 | 34 | template 35 | GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize 36 | ( 37 | const detail::tvec3& x, 38 | const detail::tvec3& y 39 | ) 40 | { 41 | return normalize(x - y * dot(y, x)); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/perpendicular.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType perp 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return x - proj(x, Normal); 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/projection.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType proj 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/random.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/random.hpp" 30 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-11-19 5 | // Updated : 2008-11-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/raw_data.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // Dependency: 10 | // - GLM core 11 | /////////////////////////////////////////////////////////////////////////////////////////////////// 12 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead") 26 | #endif 27 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-06-08 5 | // Updated : 2008-06-08 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/std_based_type.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-04-29 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/transform.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat4x4 translate( 14 | detail::tvec3 const & v) 15 | { 16 | return translate( 17 | detail::tmat4x4(1.0f), v); 18 | } 19 | 20 | template 21 | GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( 22 | T angle, 23 | detail::tvec3 const & v) 24 | { 25 | return rotate( 26 | detail::tmat4x4(1), angle, v); 27 | } 28 | 29 | template 30 | GLM_FUNC_QUALIFIER detail::tmat4x4 scale( 31 | detail::tvec3 const & v) 32 | { 33 | return scale( 34 | detail::tmat4x4(1.0f), v); 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/ulp.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/ulp.hpp" 30 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/unsigned_int.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead") 26 | #endif 27 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/unsigned_int.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-24 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/unsigned_int.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/gtx/vec1.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_vec1 24 | /// @file glm/gtx/vec1.inl 25 | /// @date 2013-03-16 / 2013-03-16 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/integer.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_INTEGER_INCLUDED 30 | #define GLM_INTEGER_INCLUDED 31 | 32 | #include "detail/func_integer.hpp" 33 | 34 | #endif//GLM_INTEGER_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/matrix.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/matrix.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MATRIX_INCLUDED 30 | #define GLM_MATRIX_INCLUDED 31 | 32 | #include "detail/func_matrix.hpp" 33 | 34 | #endif//GLM_MATRIX_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/packing.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/packing.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_PACKING_INCLUDED 30 | #define GLM_PACKING_INCLUDED 31 | 32 | #include "detail/func_packing.hpp" 33 | 34 | #endif//GLM_PACKING_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vec2.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VEC2_INCLUDED 30 | #define GLM_VEC2_INCLUDED 31 | 32 | #include "detail/type_vec2.hpp" 33 | 34 | #endif//GLM_VEC2_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vec3.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VEC3_INCLUDED 30 | #define GLM_VEC3_INCLUDED 31 | 32 | #include "detail/type_vec3.hpp" 33 | 34 | #endif//GLM_VEC3_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/utils/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vec4.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VEC4_INCLUDED 30 | #define GLM_VEC4_INCLUDED 31 | 32 | #include "detail/type_vec4.hpp" 33 | 34 | #endif//GLM_VEC4_INCLUDED 35 | -------------------------------------------------------------------------------- /API-Samples/validation_cache/validation_cache.frag: -------------------------------------------------------------------------------- 1 | // The fragment shader contains a 32-bit integer constant (tweak_value) 2 | // which we can search for in the compiled SPIRV and replace with new 3 | // values to generate "different" shaders. 4 | #version 400 5 | #extension GL_ARB_separate_shader_objects : enable 6 | #extension GL_ARB_shading_language_420pack : enable 7 | const uint tweak_value = 0xdeadbeef; 8 | layout (binding = 1) uniform sampler2D tex; 9 | layout (location = 0) in vec2 texcoord; 10 | layout (location = 0) out vec4 outColor; 11 | void main() { 12 | outColor = textureLod(tex, texcoord, 0.0); 13 | outColor.a = float(tweak_value); 14 | } -------------------------------------------------------------------------------- /API-Samples/validation_cache/validation_cache.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | #extension GL_ARB_separate_shader_objects : enable 3 | #extension GL_ARB_shading_language_420pack : enable 4 | layout (std140, binding = 0) uniform buf { 5 | mat4 mvp; 6 | } ubuf; 7 | layout (location = 0) in vec4 pos; 8 | layout (location = 1) in vec2 inTexCoords; 9 | layout (location = 0) out vec2 texcoord; 10 | void main() { 11 | texcoord = inTexCoords; 12 | gl_Position = ubuf.mvp * pos; 13 | } 14 | -------------------------------------------------------------------------------- /README-contrib.md: -------------------------------------------------------------------------------- 1 | # Contributing Vulkan Samples 2 | Contributions to the Vulkan Samples Kit effort are encouraged! 3 | 4 | ## General Requirements 5 | - All contributions MUST have an Apache-style license. 6 | 7 | ## Procedure for Contributing 8 | 0. contact LunarG for access to the VulkanSamplesKit repository 9 | 1. clone the VulkanSamplesKit repository 10 | 2. create a new branch for your work 11 | 3. add contributions to your new branch 12 | 4. ensure the requirements in src/README.md are met and the branch builds 13 | 5. submit a pull/merge request for your branch 14 | 15 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/Hologram.frag: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | precision highp float; 4 | 5 | layout(location = 0) in vec3 color; 6 | layout(location = 1) in float alpha; 7 | 8 | layout(location = 0) out vec4 fragcolor; 9 | 10 | void main() 11 | { 12 | fragcolor = vec4(color, alpha); 13 | } 14 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/Hologram.push_constant.vert: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | layout(location = 0) in vec3 in_pos; 4 | layout(location = 1) in vec3 in_normal; 5 | 6 | layout(std140, push_constant) uniform param_block { 7 | vec3 light_pos; 8 | vec3 light_color; 9 | mat4 model; 10 | mat4 view_projection; 11 | float alpha; 12 | } params; 13 | 14 | layout(location = 0) out vec3 color; 15 | layout(location = 1) out float alpha; 16 | 17 | void main() 18 | { 19 | vec3 world_light = vec3(params.model * vec4(params.light_pos, 1.0)); 20 | vec3 world_pos = vec3(params.model * vec4(in_pos, 1.0)); 21 | vec3 world_normal = mat3(params.model) * in_normal; 22 | 23 | vec3 light_dir = world_light - world_pos; 24 | float brightness = dot(light_dir, world_normal) / length(light_dir) / length(world_normal); 25 | brightness = abs(brightness); 26 | 27 | gl_Position = params.view_projection * vec4(world_pos, 1.0); 28 | color = params.light_color * brightness; 29 | alpha = params.alpha; 30 | } 31 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/Hologram.vert: -------------------------------------------------------------------------------- 1 | #version 310 es 2 | 3 | layout(location = 0) in vec3 in_pos; 4 | layout(location = 1) in vec3 in_normal; 5 | 6 | layout(std140, set = 0, binding = 0) uniform param_block { 7 | vec3 light_pos; 8 | vec3 light_color; 9 | mat4 model; 10 | mat4 view_projection; 11 | float alpha; 12 | } params; 13 | 14 | layout(location = 0) out vec3 color; 15 | layout(location = 1) out float alpha; 16 | 17 | void main() 18 | { 19 | vec3 world_light = vec3(params.model * vec4(params.light_pos, 1.0)); 20 | vec3 world_pos = vec3(params.model * vec4(in_pos, 1.0)); 21 | vec3 world_normal = mat3(params.model) * in_normal; 22 | 23 | vec3 light_dir = world_light - world_pos; 24 | float brightness = dot(light_dir, world_normal) / length(light_dir) / length(world_normal); 25 | brightness = abs(brightness); 26 | 27 | gl_Position = params.view_projection * vec4(world_pos, 1.0); 28 | color = params.light_color * brightness; 29 | alpha = params.alpha; 30 | } 31 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/README.md: -------------------------------------------------------------------------------- 1 | This demo demonstrates multi-thread command buffer recording. 2 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/ShellXcb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Google, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef SHELL_XCB_H 18 | #define SHELL_XCB_H 19 | 20 | #include 21 | #include "Shell.h" 22 | 23 | class ShellXcb : public Shell { 24 | public: 25 | ShellXcb(Game &game); 26 | ~ShellXcb(); 27 | 28 | void run(); 29 | void quit() { quit_ = true; } 30 | 31 | private: 32 | void init_connection(); 33 | 34 | PFN_vkGetInstanceProcAddr load_vk(); 35 | bool can_present(VkPhysicalDevice phy, uint32_t queue_family); 36 | 37 | void create_window(); 38 | VkSurfaceKHR create_surface(VkInstance instance); 39 | 40 | void handle_event(const xcb_generic_event_t *ev); 41 | void loop_wait(); 42 | void loop_poll(); 43 | 44 | xcb_connection_t *c_; 45 | xcb_screen_t *scr_; 46 | xcb_window_t win_; 47 | 48 | xcb_atom_t wm_protocols_; 49 | xcb_atom_t wm_delete_window_; 50 | 51 | void *lib_handle_; 52 | 53 | bool quit_; 54 | }; 55 | 56 | #endif // SHELL_XCB_H 57 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/android/build-and-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [ -z "${ANDROID_SDK_HOME}" ]; 6 | then echo "Please set ANDROID_SDK_HOME, exiting"; exit; 7 | else echo "ANDROID_SDK_HOME is ${ANDROID_SDK_HOME}"; 8 | fi 9 | 10 | if [ -z "${ANDROID_NDK_HOME}" ]; 11 | then echo "Please set ANDROID_NDK_HOME, exiting"; exit; 12 | else echo "ANDROID_NDK_HOME is ${ANDROID_NDK_HOME}"; 13 | fi 14 | 15 | 16 | generate_local_properties() { 17 | : > local.properties 18 | echo "sdk.dir=${ANDROID_SDK_HOME}" >> local.properties 19 | echo "ndk.dir=${ANDROID_NDK_HOME}" >> local.properties 20 | } 21 | 22 | build() { 23 | ./gradlew build 24 | } 25 | 26 | install() { 27 | adb uninstall com.example.Hologram 28 | adb install build/outputs/apk/android-debug.apk 29 | } 30 | 31 | run() { 32 | adb shell am start com.example.Hologram/android.app.NativeActivity 33 | } 34 | 35 | generate_local_properties 36 | build 37 | install 38 | #run 39 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | } 5 | 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:2.3.0' 8 | } 9 | } 10 | 11 | apply plugin: 'com.android.application' 12 | 13 | android { 14 | compileSdkVersion 25 15 | buildToolsVersion "25.0.2" 16 | 17 | defaultConfig { 18 | applicationId "com.example.Hologram" 19 | minSdkVersion 23 20 | targetSdkVersion 23 21 | versionCode 1 22 | versionName "0.1" 23 | ndk { 24 | abiFilters 'armeabi-v7a', 'x86' 25 | } 26 | externalNativeBuild { 27 | cmake { 28 | arguments '-DANDROID_PLATFORM=android-23', 29 | '-DANDROID_STL=c++_static', 30 | '-DANDROID_TOOLCHAIN=clang' 31 | } 32 | } 33 | } 34 | externalNativeBuild { 35 | cmake { 36 | path 'CMakeLists.txt' 37 | } 38 | } 39 | buildTypes { 40 | release { 41 | ndk { 42 | debuggable true 43 | } 44 | minifyEnabled = false 45 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 46 | 'proguard-rules.pro' 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/Sample-Programs/Hologram/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Sample-Programs/Hologram/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Apr 24 18:58:48 PDT 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Sample-Programs/Hologram/android/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hologram 4 | 5 | -------------------------------------------------------------------------------- /Vulkan_LogoBug_48px_Nov17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/Vulkan_LogoBug_48px_Nov17.png -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2016, 2018 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 16 | 17 | buildscript { 18 | repositories { 19 | google() 20 | jcenter() 21 | } 22 | dependencies { 23 | classpath 'com.android.tools.build:gradle:4.1.3' 24 | // NOTE: Do not place your application dependencies here; they belong 25 | // in the individual module build.gradle files 26 | } 27 | } 28 | 29 | allprojects { 30 | repositories { 31 | google() 32 | jcenter() 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /build_windows_samples_sdk.bat: -------------------------------------------------------------------------------- 1 | echo off 2 | 3 | :: Specify UTF-8 for character encoding 4 | chcp 65001 5 | 6 | :: Check that cmake is configured 7 | where cmake.exe > nul 2>&1 8 | if not %errorlevel% equ 0 ( 9 | echo ERROR: CMake was not found. Please install CMake or put cmake.exe in your PATH. 10 | exit /b 1 11 | ) 12 | 13 | where msbuild.exe > nul 2>&1 14 | if not %errorlevel% equ 0 ( 15 | echo ERROR: MSBuild was not found. Please use a visual studio developer console, or put MSBuild.exe in your PATH. 16 | exit /b 1 17 | ) 18 | 19 | :: Get the version of msbuild 20 | set cmd="msbuild /version | findstr /rxc:"[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*"" 21 | for /f "tokens=1* delims=." %%i in ('%cmd%') do set msbuild_version=%%i 22 | if %msbuild_version% lss 14 ( 23 | echo ERROR: MSBuild must be at least version 14 ^(Visual Studio 2015^). Found version %msbuild_version%. 24 | exit /b 1 25 | ) 26 | set version_string=Visual Studio %msbuild_version% 27 | 28 | set START_DIR=%CD% 29 | cd %VULKAN_SDK% 30 | 31 | :: Build samples 32 | cd samples 33 | md build 34 | cd build 35 | cmake -G "%version_string%" -A x64 -DGLSLANG_INSTALL_DIR=%VULKAN_SDK% .. 36 | call msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet 37 | call msbuild ALL_BUILD.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet 38 | 39 | cd %START_DIR% 40 | -------------------------------------------------------------------------------- /cmake/FindPCIAccess.cmake: -------------------------------------------------------------------------------- 1 | # - FindPCIAccess 2 | # 3 | # Copyright 2015 Valve Corporation 4 | 5 | find_package(PkgConfig) 6 | 7 | pkg_check_modules(PC_PCIACCESS QUIET pciaccess) 8 | 9 | find_path(PCIACCESS_INCLUDE_DIR NAMES pciaccess.h 10 | HINTS 11 | ${PC_PCIACCESS_INCLUDEDIR} 12 | ${PC_PCIACCESS_INCLUDE_DIRS} 13 | ) 14 | 15 | find_library(PCIACCESS_LIBRARY NAMES pciaccess 16 | HINTS 17 | ${PC_PCIACCESS_LIBDIR} 18 | ${PC_PCIACCESS_LIBRARY_DIRS} 19 | ) 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(PCIAccess DEFAULT_MSG 23 | PCIACCESS_INCLUDE_DIR PCIACCESS_LIBRARY) 24 | 25 | mark_as_advanced(PCIACCESS_INCLUDE_DIR PCIACCESS_LIBRARY) 26 | 27 | set(PCIACCESS_INCLUDE_DIRS ${PCIACCESS_INCLUDE_DIR}) 28 | set(PCIACCESS_LIBRARIES ${PCIACCESS_LIBRARY}) 29 | -------------------------------------------------------------------------------- /cmake/FindPthreadStubs.cmake: -------------------------------------------------------------------------------- 1 | # - FindPthreadStubs 2 | # 3 | # Copyright (C) 2015 Valve Corporation 4 | 5 | find_package(PkgConfig) 6 | 7 | pkg_check_modules(PC_PTHREADSTUBS QUIET pthread-stubs) 8 | 9 | include(FindPackageHandleStandardArgs) 10 | find_package_handle_standard_args(PthreadStubs DEFAULT_MSG 11 | PC_PTHREADSTUBS_FOUND) 12 | 13 | set(PTHREADSTUBS_INCLUDE_DIRS "") 14 | set(PTHREADSTUBS_LIBRARIES "") 15 | -------------------------------------------------------------------------------- /cmake/FindUDev.cmake: -------------------------------------------------------------------------------- 1 | # - FindUDev 2 | # 3 | # Copyright (C) 2015 Valve Corporation 4 | 5 | find_package(PkgConfig) 6 | 7 | pkg_check_modules(PC_LIBUDEV QUIET libudev) 8 | 9 | find_path(UDEV_INCLUDE_DIR NAMES libudev.h 10 | HINTS 11 | ${PC_LIBUDEV_INCLUDEDIR} 12 | ${PC_LIBUDEV_INCLUDE_DIRS} 13 | ) 14 | 15 | find_library(UDEV_LIBRARY NAMES udev 16 | HINTS 17 | ${PC_LIBUDEV_LIBDIR} 18 | ${PC_LIBUDEV_LIBRARY_DIRS} 19 | ) 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(UDev DEFAULT_MSG 23 | UDEV_INCLUDE_DIR UDEV_LIBRARY) 24 | 25 | mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARY) 26 | 27 | set(UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR}) 28 | set(UDEV_LIBRARIES ${UDEV_LIBRARY}) 29 | -------------------------------------------------------------------------------- /cmake/FindValgrind.cmake: -------------------------------------------------------------------------------- 1 | # - FindValgrind 2 | # 3 | # Copyright (C) 2015 Valve Corporation 4 | 5 | find_package(PkgConfig) 6 | 7 | pkg_check_modules(PC_VALGRIND QUIET valgrind) 8 | 9 | find_path(VALGRIND_INCLUDE_DIR NAMES valgrind.h memcheck.h 10 | HINTS 11 | ${PC_VALGRIND_INCLUDEDIR} 12 | ${PC_VALGRIND_INCLUDE_DIRS} 13 | ) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(Valgrind DEFAULT_MSG 17 | VALGRIND_INCLUDE_DIR) 18 | 19 | mark_as_advanced(VALGRIND_INCLUDE_DIR) 20 | 21 | set(VALGRIND_INCLUDE_DIRS ${VALGRIND_INCLUDE_DIR}) 22 | set(VALGRIND_LIBRARIES "") 23 | -------------------------------------------------------------------------------- /cmake/FindX11_XCB.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find libX11-xcb 2 | # Once done this will define 3 | # 4 | # X11_XCB_FOUND - system has libX11-xcb 5 | # X11_XCB_LIBRARIES - Link these to use libX11-xcb 6 | # X11_XCB_INCLUDE_DIR - the libX11-xcb include dir 7 | # X11_XCB_DEFINITIONS - compiler switches required for using libX11-xcb 8 | 9 | # Copyright (c) 2011 Fredrik Höglund 10 | # Copyright (c) 2008 Helio Chissini de Castro, 11 | # Copyright (c) 2007 Matthias Kretz, 12 | # 13 | # Redistribution and use is allowed according to the terms of the BSD license. 14 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 15 | 16 | IF (NOT WIN32) 17 | # use pkg-config to get the directories and then use these values 18 | # in the FIND_PATH() and FIND_LIBRARY() calls 19 | FIND_PACKAGE(PkgConfig) 20 | PKG_CHECK_MODULES(PKG_X11_XCB QUIET x11-xcb) 21 | 22 | SET(X11_XCB_DEFINITIONS ${PKG_X11_XCB_CFLAGS}) 23 | 24 | FIND_PATH(X11_XCB_INCLUDE_DIR NAMES X11/Xlib-xcb.h HINTS ${PKG_X11_XCB_INCLUDE_DIRS}) 25 | FIND_LIBRARY(X11_XCB_LIBRARIES NAMES X11-xcb HINTS ${PKG_X11_XCB_LIBRARY_DIRS}) 26 | 27 | include(FindPackageHandleStandardArgs) 28 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(X11_XCB DEFAULT_MSG X11_XCB_LIBRARIES X11_XCB_INCLUDE_DIR) 29 | 30 | MARK_AS_ADVANCED(X11_XCB_INCLUDE_DIR X11_XCB_LIBRARIES) 31 | ENDIF (NOT WIN32) 32 | 33 | -------------------------------------------------------------------------------- /cmake/FindXCB.cmake: -------------------------------------------------------------------------------- 1 | # - FindXCB 2 | # 3 | # Copyright (C) 2015 Valve Corporation 4 | 5 | find_package(PkgConfig) 6 | 7 | if(NOT XCB_FIND_COMPONENTS) 8 | set(XCB_FIND_COMPONENTS xcb) 9 | endif() 10 | 11 | include(FindPackageHandleStandardArgs) 12 | set(XCB_FOUND true) 13 | set(XCB_INCLUDE_DIRS "") 14 | set(XCB_LIBRARIES "") 15 | foreach(comp ${XCB_FIND_COMPONENTS}) 16 | # component name 17 | string(TOUPPER ${comp} compname) 18 | string(REPLACE "-" "_" compname ${compname}) 19 | # header name 20 | string(REPLACE "xcb-" "" headername xcb/${comp}.h) 21 | # library name 22 | set(libname ${comp}) 23 | 24 | pkg_check_modules(PC_${comp} QUIET ${comp}) 25 | 26 | find_path(${compname}_INCLUDE_DIR NAMES ${headername} 27 | HINTS 28 | ${PC_${comp}_INCLUDEDIR} 29 | ${PC_${comp}_INCLUDE_DIRS} 30 | ) 31 | 32 | find_library(${compname}_LIBRARY NAMES ${libname} 33 | HINTS 34 | ${PC_${comp}_LIBDIR} 35 | ${PC_${comp}_LIBRARY_DIRS} 36 | ) 37 | 38 | find_package_handle_standard_args(${comp} 39 | FOUND_VAR ${comp}_FOUND 40 | REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY) 41 | mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY) 42 | 43 | list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR}) 44 | list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY}) 45 | 46 | if(NOT ${comp}_FOUND) 47 | set(XCB_FOUND false) 48 | endif() 49 | endforeach() 50 | 51 | list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS) 52 | -------------------------------------------------------------------------------- /cmake/README.txt: -------------------------------------------------------------------------------- 1 | The following files are copied out of CMake 2.8. 2 | - FindImageMagick.cmake 3 | 4 | I have also copied the Copyright.txt file out of cmake and renamed it: 5 | - Copyright_cmake.txt 6 | 7 | All other files are created and/or maintained by either LunarG Inc or Valve Corporation. -------------------------------------------------------------------------------- /cmake/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 3 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach(file ${files}) 8 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 9 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 10 | exec_program( 11 | "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 12 | OUTPUT_VARIABLE rm_out 13 | RETURN_VALUE rm_retval 14 | ) 15 | if(NOT "${rm_retval}" STREQUAL 0) 16 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 17 | endif(NOT "${rm_retval}" STREQUAL 0) 18 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 19 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 20 | endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 21 | endforeach(file) 22 | -------------------------------------------------------------------------------- /external_revisions/glslang_giturl: -------------------------------------------------------------------------------- 1 | https://github.com/KhronosGroup/glslang.git 2 | -------------------------------------------------------------------------------- /external_revisions/glslang_revision: -------------------------------------------------------------------------------- 1 | 2651ccaec8 2 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apri 28 11:51:21 PDT 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip 7 | -------------------------------------------------------------------------------- /samples_images/CopyBlitImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/CopyBlitImage.png -------------------------------------------------------------------------------- /samples_images/Hologram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/Hologram.png -------------------------------------------------------------------------------- /samples_images/Overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/Overlay.png -------------------------------------------------------------------------------- /samples_images/cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/cube.png -------------------------------------------------------------------------------- /samples_images/drawcube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/drawcube.png -------------------------------------------------------------------------------- /samples_images/drawsubpasses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/drawsubpasses.png -------------------------------------------------------------------------------- /samples_images/drawtexturedcube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/drawtexturedcube.png -------------------------------------------------------------------------------- /samples_images/dynamicuniform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/dynamicuniform.png -------------------------------------------------------------------------------- /samples_images/immutable_sampler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/immutable_sampler.png -------------------------------------------------------------------------------- /samples_images/inputattachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/inputattachment.png -------------------------------------------------------------------------------- /samples_images/memory_barriers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/memory_barriers.png -------------------------------------------------------------------------------- /samples_images/multiplesets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/multiplesets.png -------------------------------------------------------------------------------- /samples_images/multithreadedcmdbuf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/multithreadedcmdbuf.png -------------------------------------------------------------------------------- /samples_images/occlusionquery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/occlusionquery.png -------------------------------------------------------------------------------- /samples_images/pipeline_cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/pipeline_cache.png -------------------------------------------------------------------------------- /samples_images/push_constants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/push_constants.png -------------------------------------------------------------------------------- /samples_images/secondarycmd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/secondarycmd.png -------------------------------------------------------------------------------- /samples_images/separate_image_sampler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/separate_image_sampler.png -------------------------------------------------------------------------------- /samples_images/spirv_assembly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/spirv_assembly.png -------------------------------------------------------------------------------- /samples_images/spirv_specialization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/spirv_specialization.png -------------------------------------------------------------------------------- /samples_images/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/template.png -------------------------------------------------------------------------------- /samples_images/texelbuffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlesamples/vulkan-basic-samples/405c8cfa7395b535dc38527de2ca476b536684a0/samples_images/texelbuffer.png -------------------------------------------------------------------------------- /scripts/check_code_format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2017 Google Inc. 3 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # Script to determine if source code in Pull Request is properly formatted. 17 | # Exits with non 0 exit code if formatting is needed. 18 | # 19 | # This script assumes to be invoked at the project root directory. 20 | 21 | RED='\033[0;31m' 22 | GREEN='\033[0;32m' 23 | NC='\033[0m' # No Color 24 | 25 | FILES_TO_CHECK=$(git diff --name-only master | grep -E ".*\.(cpp|cc|c\+\+|cxx|c|h|hpp)$") 26 | 27 | if [ -z "${FILES_TO_CHECK}" ]; then 28 | echo -e "${GREEN}No source code to check for formatting.${NC}" 29 | exit 0 30 | fi 31 | 32 | FORMAT_DIFF=$(git diff -U0 master -- ${FILES_TO_CHECK} | python ./scripts/clang-format-diff.py -p1 -style=file) 33 | 34 | if [ -z "${FORMAT_DIFF}" ]; then 35 | echo -e "${GREEN}All source code in PR properly formatted.${NC}" 36 | exit 0 37 | else 38 | echo -e "${RED}Found formatting errors!${NC}" 39 | echo "${FORMAT_DIFF}" 40 | exit 1 41 | fi 42 | -------------------------------------------------------------------------------- /scripts/known_good.json: -------------------------------------------------------------------------------- 1 | { 2 | "repos" : [ 3 | { 4 | "name" : "Vulkan-Headers", 5 | "url" : "https://github.com/KhronosGroup/Vulkan-Headers.git", 6 | "sub_dir" : "Vulkan-Headers", 7 | "build_dir" : "Vulkan-Headers/build", 8 | "install_dir" : "Vulkan-Headers/build/install", 9 | "commit" : "v1.2.170" 10 | }, 11 | { 12 | "name" : "Vulkan-Loader", 13 | "url" : "https://github.com/KhronosGroup/Vulkan-Loader.git", 14 | "sub_dir" : "Vulkan-Loader", 15 | "build_dir" : "Vulkan-Loader/build", 16 | "install_dir" : "Vulkan-Loader/build/install", 17 | "commit" : "v1.2.170", 18 | "deps" : [ 19 | { 20 | "var_name" : "VULKAN_HEADERS_INSTALL_DIR", 21 | "repo_name" : "Vulkan-Headers" 22 | } 23 | ], 24 | "cmake_options" : [ 25 | "-DBUILD_TESTS=NO" 26 | ], 27 | "build_platforms" : [ 28 | "linux", 29 | "darwin" 30 | ] 31 | } 32 | ], 33 | "install_names" : { 34 | "Vulkan-Headers" : "VULKAN_HEADERS_INSTALL_DIR", 35 | "Vulkan-Loader" : "VULKAN_LOADER_INSTALL_DIR" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /update_external_sources.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set errorCode=0 4 | set BUILD_DIR=%~dp0 5 | 6 | set BASE_DIR="%BUILD_DIR%submodules" 7 | set V_LVL_DIR=%BASE_DIR%\Vulkan-LoaderAndValidationLayers 8 | 9 | git submodule update --init --recursive 10 | 11 | :build_lvl 12 | echo. 13 | echo Setting Up %V_LVL_DIR% 14 | cd "%V_LVL_DIR%" 15 | call .\update_external_sources.bat %1 %2 %3 %4 %5 %6 %7 %8 %9 -------------------------------------------------------------------------------- /update_external_sources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Update source for glslang 3 | 4 | set -e 5 | 6 | if [[ $(uname) == "Linux" || $(uname) =~ "CYGWIN" ]]; then 7 | CURRENT_DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" 8 | CORE_COUNT=$(nproc || echo 4) 9 | elif [[ $(uname) == "Darwin" ]]; then 10 | CURRENT_DIR="$(dirname "$(python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' ${BASH_SOURCE[0]})")" 11 | CORE_COUNT=$(sysctl -n hw.ncpu || echo 4) 12 | fi 13 | echo CURRENT_DIR=$CURRENT_DIR 14 | echo CORE_COUNT=$CORE_COUNT 15 | 16 | BUILDDIR=${CURRENT_DIR} 17 | BASEDIR="$BUILDDIR/submodules" 18 | 19 | git submodule update --init --recursive 20 | 21 | echo "Running LVL update external sources" 22 | cd ${BASEDIR}/Vulkan-LoaderAndValidationLayers 23 | ./update_external_sources.sh "$@" --------------------------------------------------------------------------------