From 8d72aba9e3358fdf51578533ab7f46602f7fd103 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sun, 12 Feb 2017 15:08:52 +0100 Subject: Introduce QVulkanWindow A convenience subclass of QWindow that provides a Vulkan-capable window with a double-buffered FIFO swapchain. While advanced use cases are better served by a custom QWindow subclass, many applications can benefit from having a convenient helper that makes getting started easier. Add also three examples of increasing complexity, and a variant that shows embeddeding into widgets via QWindowContainer. [ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of QWindow. Task-number: QTBUG-55981 Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc Reviewed-by: Andy Nichols --- examples/vulkan/shared/color.vert | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/vulkan/shared/color.vert (limited to 'examples/vulkan/shared/color.vert') diff --git a/examples/vulkan/shared/color.vert b/examples/vulkan/shared/color.vert new file mode 100644 index 0000000000..02492c0e65 --- /dev/null +++ b/examples/vulkan/shared/color.vert @@ -0,0 +1,18 @@ +#version 440 + +layout(location = 0) in vec4 position; +layout(location = 1) in vec3 color; + +layout(location = 0) out vec3 v_color; + +layout(std140, binding = 0) uniform buf { + mat4 mvp; +} ubuf; + +out gl_PerVertex { vec4 gl_Position; }; + +void main() +{ + v_color = color; + gl_Position = ubuf.mvp * position; +} -- cgit v1.2.3