From a87141b250db68f9c6040bbe068e0b3107842248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 7 Aug 2012 15:27:41 +0200 Subject: [PATCH] Mention required version/extension in shader code. --- src/AbstractShaderProgram.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AbstractShaderProgram.h b/src/AbstractShaderProgram.h index 827d238de..f50d20040 100644 --- a/src/AbstractShaderProgram.h +++ b/src/AbstractShaderProgram.h @@ -80,6 +80,8 @@ The preferred workflow is to specify attribute location for vertex shader input attributes and fragment shader output attributes explicitly in the shader code, e.g.: @code +#version 330 +// or #extension GL_ARB_explicit_attrib_location: enable layout(location = 0) in vec4 vertex; layout(location = 1) in vec3 normal; layout(location = 2) in vec2 textureCoords; @@ -122,6 +124,8 @@ bindFragmentDataLocationIndexed(1, 1, "ambient"); The preferred workflow is to specify texture layers directly in the shader code, e.g.: @code +#version 420 +// or #extension GL_ARB_shading_language_420pack: enable layout(binding = 0) uniform sampler2D diffuseTexture; layout(binding = 1) uniform sampler2D specularTexture; @endcode