summaryrefslogtreecommitdiffstats
path: root/examples/vulkan/hellovulkantexture/texture.vert
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-02-12 15:08:52 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-03-22 15:40:57 +0000
commit8d72aba9e3358fdf51578533ab7f46602f7fd103 (patch)
tree5e6ff0ec0ee399bf343654fc9280012eafa29a3d /examples/vulkan/hellovulkantexture/texture.vert
parent66e162e8f19f8a1f9b4f96008f2853be7fc1822e (diff)
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 <andy.nichols@qt.io>
Diffstat (limited to 'examples/vulkan/hellovulkantexture/texture.vert')
-rw-r--r--examples/vulkan/hellovulkantexture/texture.vert18
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/vulkan/hellovulkantexture/texture.vert b/examples/vulkan/hellovulkantexture/texture.vert
new file mode 100644
index 0000000000..de486cb772
--- /dev/null
+++ b/examples/vulkan/hellovulkantexture/texture.vert
@@ -0,0 +1,18 @@
+#version 440
+
+layout(location = 0) in vec4 position;
+layout(location = 1) in vec2 texcoord;
+
+layout(location = 0) out vec2 v_texcoord;
+
+layout(std140, binding = 0) uniform buf {
+ mat4 mvp;
+} ubuf;
+
+out gl_PerVertex { vec4 gl_Position; };
+
+void main()
+{
+ v_texcoord = texcoord;
+ gl_Position = ubuf.mvp * position;
+}