Browse Source

Shaders: using attachShaders() everywhere.

pull/68/head
Vladimír Vondruš 12 years ago
parent
commit
3be4422ded
  1. 3
      src/Magnum/Shaders/DistanceFieldVector.cpp
  2. 3
      src/Magnum/Shaders/Flat.cpp
  3. 3
      src/Magnum/Shaders/MeshVisualizer.cpp
  4. 3
      src/Magnum/Shaders/Phong.cpp
  5. 3
      src/Magnum/Shaders/Vector.cpp
  6. 3
      src/Magnum/Shaders/VertexColor.cpp

3
src/Magnum/Shaders/DistanceFieldVector.cpp

@ -59,8 +59,7 @@ template<UnsignedInt dimensions> DistanceFieldVector<dimensions>::DistanceFieldV
CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({frag, vert})); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({frag, vert}));
AbstractShaderProgram::attachShader(frag); AbstractShaderProgram::attachShaders({frag, vert});
AbstractShaderProgram::attachShader(vert);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version)) if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version))

3
src/Magnum/Shaders/Flat.cpp

@ -64,8 +64,7 @@ template<UnsignedInt dimensions> Flat<dimensions>::Flat(const Flags flags): tran
CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag})); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag}));
attachShader(vert); attachShaders({vert, frag});
attachShader(frag);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version)) if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version))

3
src/Magnum/Shaders/MeshVisualizer.cpp

@ -87,8 +87,7 @@ MeshVisualizer::MeshVisualizer(const Flags flags): flags(flags), transformationP
#endif #endif
Shader::compile({vert, frag}); Shader::compile({vert, frag});
attachShader(vert); attachShaders({vert, frag});
attachShader(frag);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(geom) attachShader(*geom); if(geom) attachShader(*geom);
#endif #endif

3
src/Magnum/Shaders/Phong.cpp

@ -66,8 +66,7 @@ Phong::Phong(const Flags flags): transformationMatrixUniform(0), projectionMatri
CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag})); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag}));
attachShader(vert); attachShaders({vert, frag});
attachShader(frag);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version)) if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version))

3
src/Magnum/Shaders/Vector.cpp

@ -59,8 +59,7 @@ template<UnsignedInt dimensions> Vector<dimensions>::Vector(): transformationPro
CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag})); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag}));
AbstractShaderProgram::attachShader(vert); AbstractShaderProgram::attachShaders({vert, frag});
AbstractShaderProgram::attachShader(frag);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version)) if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version))

3
src/Magnum/Shaders/VertexColor.cpp

@ -59,8 +59,7 @@ template<UnsignedInt dimensions> VertexColor<dimensions>::VertexColor(): transfo
CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag})); CORRADE_INTERNAL_ASSERT_OUTPUT(Shader::compile({vert, frag}));
attachShader(vert); attachShaders({vert, frag});
attachShader(frag);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version)) if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::explicit_attrib_location>(version))

Loading…
Cancel
Save