diff --git a/src/Magnum/Shaders/DistanceFieldVectorGL.cpp b/src/Magnum/Shaders/DistanceFieldVectorGL.cpp index def52fe4f..77de6d56d 100644 --- a/src/Magnum/Shaders/DistanceFieldVectorGL.cpp +++ b/src/Magnum/Shaders/DistanceFieldVectorGL.cpp @@ -157,7 +157,11 @@ template typename DistanceFieldVectorGL::Com #endif out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } template typename DistanceFieldVectorGL::CompileState DistanceFieldVectorGL::compile() { diff --git a/src/Magnum/Shaders/DistanceFieldVectorGL.h b/src/Magnum/Shaders/DistanceFieldVectorGL.h index 21d8e6d28..7a31c67e5 100644 --- a/src/Magnum/Shaders/DistanceFieldVectorGL.h +++ b/src/Magnum/Shaders/DistanceFieldVectorGL.h @@ -748,10 +748,20 @@ template class DistanceFieldVectorGL::Compil explicit CompileState(NoCreateT): DistanceFieldVectorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(DistanceFieldVectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): DistanceFieldVectorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} + explicit CompileState(DistanceFieldVectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): DistanceFieldVectorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + {} Implementation::GLShaderWrapper _vert, _frag; + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /** diff --git a/src/Magnum/Shaders/FlatGL.cpp b/src/Magnum/Shaders/FlatGL.cpp index 637afb300..5f9e5aa14 100644 --- a/src/Magnum/Shaders/FlatGL.cpp +++ b/src/Magnum/Shaders/FlatGL.cpp @@ -289,7 +289,11 @@ template typename FlatGL::CompileState FlatG out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } template typename FlatGL::CompileState FlatGL::compile() { diff --git a/src/Magnum/Shaders/FlatGL.h b/src/Magnum/Shaders/FlatGL.h index 99752de7f..9200d860b 100644 --- a/src/Magnum/Shaders/FlatGL.h +++ b/src/Magnum/Shaders/FlatGL.h @@ -1516,10 +1516,20 @@ template class FlatGL::CompileState: public explicit CompileState(NoCreateT): FlatGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(FlatGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): FlatGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} + explicit CompileState(FlatGL&& shader, GL::Shader&& vert, GL::Shader&& frag + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): FlatGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + {} Implementation::GLShaderWrapper _vert, _frag; + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /** diff --git a/src/Magnum/Shaders/MeshVisualizerGL.cpp b/src/Magnum/Shaders/MeshVisualizerGL.cpp index e5a1868fd..fc5481b52 100644 --- a/src/Magnum/Shaders/MeshVisualizerGL.cpp +++ b/src/Magnum/Shaders/MeshVisualizerGL.cpp @@ -608,7 +608,14 @@ MeshVisualizerGL2D::CompileState MeshVisualizerGL2D::compile(const Configuration out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), geom ? &*geom : nullptr, version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + , geom ? &*geom : nullptr + #endif + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } #ifdef MAGNUM_BUILD_DEPRECATED @@ -634,10 +641,14 @@ MeshVisualizerGL2D::MeshVisualizerGL2D(CompileState&& state): MeshVisualizerGL2D if(!id()) return; #endif - if(state._geom.id) + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + if(state._geom.id) { CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag), GL::Shader(state._geom)})); - else + } else + #endif + { CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag)})); + } #ifndef MAGNUM_TARGET_GLES const GL::Context& context = GL::Context::current(); @@ -1091,7 +1102,14 @@ MeshVisualizerGL3D::CompileState MeshVisualizerGL3D::compile(const Configuration out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), geom ? &*geom : nullptr, version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + , geom ? &*geom : nullptr + #endif + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } #ifdef MAGNUM_BUILD_DEPRECATED @@ -1117,10 +1135,14 @@ MeshVisualizerGL3D::MeshVisualizerGL3D(CompileState&& state): MeshVisualizerGL3D if(!id()) return; #endif - if(state._geom.id) + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + if(state._geom.id) { CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag), GL::Shader(state._geom)})); - else + } else + #endif + { CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink({GL::Shader(state._vert), GL::Shader(state._frag)})); + } #ifndef MAGNUM_TARGET_GLES const GL::Context& context = GL::Context::current(); diff --git a/src/Magnum/Shaders/MeshVisualizerGL.h b/src/Magnum/Shaders/MeshVisualizerGL.h index 1b060893b..634a03883 100644 --- a/src/Magnum/Shaders/MeshVisualizerGL.h +++ b/src/Magnum/Shaders/MeshVisualizerGL.h @@ -1311,14 +1311,32 @@ class MeshVisualizerGL2D::CompileState: public MeshVisualizerGL2D { /* Everything deliberately private except for the inheritance */ friend class MeshVisualizerGL2D; - explicit CompileState(NoCreateT): MeshVisualizerGL2D{NoCreate}, _vert{NoCreate}, _frag{NoCreate}, _geom{NoCreate} {} + explicit CompileState(NoCreateT): MeshVisualizerGL2D{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(MeshVisualizerGL2D&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Shader* geom, GL::Version version): MeshVisualizerGL2D{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _geom{NoCreate}, _version{version} { + explicit CompileState(MeshVisualizerGL2D&& shader, GL::Shader&& vert, GL::Shader&& frag + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + , GL::Shader* geom + #endif + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): MeshVisualizerGL2D{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + { + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) if(geom) _geom = Implementation::GLShaderWrapper{std::move(*geom)}; + #endif } - Implementation::GLShaderWrapper _vert, _frag, _geom; + Implementation::GLShaderWrapper _vert, _frag; + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + Implementation::GLShaderWrapper _geom{NoCreate}; + #endif + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /** @@ -3261,14 +3279,32 @@ class MeshVisualizerGL3D::CompileState: public MeshVisualizerGL3D { /* Everything deliberately private except for the inheritance */ friend class MeshVisualizerGL3D; - explicit CompileState(NoCreateT): MeshVisualizerGL3D{NoCreate}, _vert{NoCreate}, _frag{NoCreate}, _geom{NoCreate} {} + explicit CompileState(NoCreateT): MeshVisualizerGL3D{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(MeshVisualizerGL3D&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Shader* geom, GL::Version version): MeshVisualizerGL3D{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _geom{NoCreate}, _version{version} { + explicit CompileState(MeshVisualizerGL3D&& shader, GL::Shader&& vert, GL::Shader&& frag + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + , GL::Shader* geom + #endif + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): MeshVisualizerGL3D{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + { + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) if(geom) _geom = Implementation::GLShaderWrapper{std::move(*geom)}; + #endif } - Implementation::GLShaderWrapper _vert, _frag, _geom; + Implementation::GLShaderWrapper _vert, _frag; + #if !defined(MAGNUM_TARGET_WEBGL) && !defined(MAGNUM_TARGET_GLES2) + Implementation::GLShaderWrapper _geom{NoCreate}; + #endif + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /** @debugoperatorclassenum{MeshVisualizerGL2D,MeshVisualizerGL2D::Flag} */ diff --git a/src/Magnum/Shaders/PhongGL.cpp b/src/Magnum/Shaders/PhongGL.cpp index 9ad18b6ac..836161e57 100644 --- a/src/Magnum/Shaders/PhongGL.cpp +++ b/src/Magnum/Shaders/PhongGL.cpp @@ -405,7 +405,11 @@ PhongGL::CompileState PhongGL::compile(const Configuration& configuration) { out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } PhongGL::CompileState PhongGL::compile() { diff --git a/src/Magnum/Shaders/PhongGL.h b/src/Magnum/Shaders/PhongGL.h index 3822e2a09..740f0d2ea 100644 --- a/src/Magnum/Shaders/PhongGL.h +++ b/src/Magnum/Shaders/PhongGL.h @@ -2297,10 +2297,20 @@ class PhongGL::CompileState: public PhongGL { explicit CompileState(NoCreateT): PhongGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(PhongGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): PhongGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} + explicit CompileState(PhongGL&& shader, GL::Shader&& vert, GL::Shader&& frag + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): PhongGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + {} Implementation::GLShaderWrapper _vert, _frag; + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /** @debugoperatorclassenum{PhongGL,PhongGL::Flag} */ diff --git a/src/Magnum/Shaders/VectorGL.cpp b/src/Magnum/Shaders/VectorGL.cpp index c841011e0..1a733d8c4 100644 --- a/src/Magnum/Shaders/VectorGL.cpp +++ b/src/Magnum/Shaders/VectorGL.cpp @@ -158,7 +158,11 @@ template typename VectorGL::CompileState Vec out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } template typename VectorGL::CompileState VectorGL::compile() { diff --git a/src/Magnum/Shaders/VectorGL.h b/src/Magnum/Shaders/VectorGL.h index 976d41e0e..d4ee04a3d 100644 --- a/src/Magnum/Shaders/VectorGL.h +++ b/src/Magnum/Shaders/VectorGL.h @@ -698,10 +698,20 @@ template class VectorGL::CompileState: publi explicit CompileState(NoCreateT): VectorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(VectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): VectorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} + explicit CompileState(VectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): VectorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + {} Implementation::GLShaderWrapper _vert, _frag; + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /** diff --git a/src/Magnum/Shaders/VertexColorGL.cpp b/src/Magnum/Shaders/VertexColorGL.cpp index 442820d34..e2b995587 100644 --- a/src/Magnum/Shaders/VertexColorGL.cpp +++ b/src/Magnum/Shaders/VertexColorGL.cpp @@ -136,7 +136,11 @@ template typename VertexColorGL::CompileStat out.submitLink(); - return CompileState{std::move(out), std::move(vert), std::move(frag), version}; + return CompileState{std::move(out), std::move(vert), std::move(frag) + #ifndef MAGNUM_TARGET_GLES + , version + #endif + }; } template typename VertexColorGL::CompileState VertexColorGL::compile() { diff --git a/src/Magnum/Shaders/VertexColorGL.h b/src/Magnum/Shaders/VertexColorGL.h index 78a26ee25..a45d0cc6e 100644 --- a/src/Magnum/Shaders/VertexColorGL.h +++ b/src/Magnum/Shaders/VertexColorGL.h @@ -515,10 +515,20 @@ template class VertexColorGL::CompileState: explicit CompileState(NoCreateT): VertexColorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - explicit CompileState(VertexColorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): VertexColorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} + explicit CompileState(VertexColorGL&& shader, GL::Shader&& vert, GL::Shader&& frag + #ifndef MAGNUM_TARGET_GLES + , GL::Version version + #endif + ): VertexColorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)} + #ifndef MAGNUM_TARGET_GLES + , _version{version} + #endif + {} Implementation::GLShaderWrapper _vert, _frag; + #ifndef MAGNUM_TARGET_GLES GL::Version _version; + #endif }; /**