Browse Source

Shaders: what the hell.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
fd3f7febae
  1. 8
      src/Shaders/Flat.cpp

8
src/Shaders/Flat.cpp

@ -46,17 +46,17 @@ template<UnsignedInt dimensions> Flat<dimensions>::Flat(const Flags flags): tran
const Version version = Context::current()->supportedVersion({Version::GLES300, Version::GLES200});
#endif
Shader vert(version, Shader::Type::Fragment);
Shader vert(version, Shader::Type::Vertex);
vert.addSource(flags & Flag::Textured ? "#define TEXTURED\n" : "")
.addSource(rs.get("compatibility.glsl"))
.addSource(rs.get("Flat.frag"));
.addSource(rs.get(vertexShaderName<dimensions>()));
CORRADE_INTERNAL_ASSERT_OUTPUT(vert.compile());
attachShader(vert);
Shader frag(version, Shader::Type::Vertex);
Shader frag(version, Shader::Type::Fragment);
frag.addSource(flags & Flag::Textured ? "#define TEXTURED\n" : "")
.addSource(rs.get("compatibility.glsl"))
.addSource(rs.get(vertexShaderName<dimensions>()));
.addSource(rs.get("Flat.frag"));
CORRADE_INTERNAL_ASSERT_OUTPUT(frag.compile());
attachShader(frag);

Loading…
Cancel
Save