summaryrefslogtreecommitdiffstats
path: root/Imgui/src/ImGuiDiligentRenderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Imgui/src/ImGuiDiligentRenderer.cpp')
-rw-r--r--Imgui/src/ImGuiDiligentRenderer.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/Imgui/src/ImGuiDiligentRenderer.cpp b/Imgui/src/ImGuiDiligentRenderer.cpp
index f8857cb..a446f5c 100644
--- a/Imgui/src/ImGuiDiligentRenderer.cpp
+++ b/Imgui/src/ImGuiDiligentRenderer.cpp
@@ -82,7 +82,12 @@ float4 main(in PSInput PSIn) : SV_Target
static const char* VertexShaderGLSL = R"(
-layout(binding=0) uniform Constants
+#ifdef VULKAN
+# define BINDING(X) layout(binding=X)
+#else
+# define BINDING(X)
+#endif
+BINDING(0) uniform Constants
{
mat4 ProjectionMatrix;
};
@@ -110,7 +115,12 @@ void main()
)";
static const char* PixelShaderGLSL = R"(
-layout(binding = 0) uniform sampler2D Texture;
+#ifdef VULKAN
+# define BINDING(X) layout(binding=X)
+#else
+# define BINDING(X)
+#endif
+BINDING(0) uniform sampler2D Texture;
layout(location = 0) in vec4 vsout_col;
layout(location = 1) in vec2 vsout_uv;