Browse Source

Shaders: drop the createCompatibilityShader() helper.

With the workarounds moved to the GL::Shader class itself, it's just a
complicated wrapper for adding the compatibility.glsl file and a rather
strange way to define a file-local helper for resource import on static
builds. Do that directly instead.
pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
1f2b19c698
  1. 12
      src/Magnum/MeshTools/Test/FullScreenTriangleGLTest.cpp
  2. 1
      src/Magnum/Shaders/CMakeLists.txt
  3. 14
      src/Magnum/Shaders/DistanceFieldVectorGL.cpp
  4. 18
      src/Magnum/Shaders/FlatGL.cpp
  5. 55
      src/Magnum/Shaders/Implementation/CreateCompatibilityShader.h
  6. 17
      src/Magnum/Shaders/LineGL.cpp
  7. 22
      src/Magnum/Shaders/MeshVisualizerGL.cpp
  8. 16
      src/Magnum/Shaders/PhongGL.cpp
  9. 14
      src/Magnum/Shaders/VectorGL.cpp
  10. 17
      src/Magnum/Shaders/VertexColorGL.cpp
  11. 13
      src/Magnum/TextureTools/DistanceField.cpp

12
src/Magnum/MeshTools/Test/FullScreenTriangleGLTest.cpp

@ -25,6 +25,7 @@
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/Iterable.h>
#include <Corrade/Containers/StringView.h>
#include <Corrade/TestSuite/Compare/Container.h>
#include <Corrade/Utility/Resource.h>
@ -40,7 +41,6 @@
#include "Magnum/GL/Version.h"
#include "Magnum/Math/Color.h"
#include "Magnum/MeshTools/FullScreenTriangle.h"
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
namespace Magnum { namespace MeshTools { namespace Test { namespace {
@ -81,16 +81,18 @@ void FullScreenTriangleGLTest::test() {
FullscreenFlatShader(GL::Version version) {
Utility::Resource rs{"FullScreenTriangleTest"};
GL::Shader vert = Shaders::Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource(rs.getString("FullScreenTriangle.glsl"))
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"))
.addSource(rs.getString("FullScreenTriangle.glsl"))
.addSource(R"(
void main() {
fullScreenTriangle();
}
)");
GL::Shader frag = Shaders::Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
frag.addSource(R"(
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"))
.addSource(R"(
#ifdef NEW_GLSL
out lowp vec4 fragmentColor;
#else

1
src/Magnum/Shaders/CMakeLists.txt

@ -73,7 +73,6 @@ set(MagnumShaders_HEADERS
# Header files to display in project view of IDEs only
set(MagnumShaders_PRIVATE_HEADERS
Implementation/CreateCompatibilityShader.h
Implementation/lineMiterLimit.h)
if(NOT MAGNUM_TARGET_GLES2)

14
src/Magnum/Shaders/DistanceFieldVectorGL.cpp

@ -45,7 +45,11 @@
#include "Magnum/GL/Buffer.h"
#endif
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
@ -124,8 +128,9 @@ template<UnsignedInt dimensions> typename DistanceFieldVectorGL<dimensions>::Com
GL::Version::GLES300, GL::Version::GLES200});
#endif
GL::Shader vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource(configuration.flags() & Flag::TextureTransformation ? "#define TEXTURE_TRANSFORMATION\n"_s : ""_s)
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource(configuration.flags() & Flag::TextureTransformation ? "#define TEXTURE_TRANSFORMATION\n"_s : ""_s)
.addSource(dimensions == 2 ? "#define TWO_DIMENSIONS\n"_s : "#define THREE_DIMENSIONS\n"_s);
#ifndef MAGNUM_TARGET_GLES2
if(configuration.flags() >= Flag::UniformBuffers) {
@ -151,7 +156,8 @@ template<UnsignedInt dimensions> typename DistanceFieldVectorGL<dimensions>::Com
.addSource(rs.getString("Vector.vert"_s))
.submitCompile();
GL::Shader frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s));
#ifndef MAGNUM_TARGET_GLES2
if(configuration.flags() >= Flag::UniformBuffers) {
#ifndef MAGNUM_TARGET_WEBGL

18
src/Magnum/Shaders/FlatGL.cpp

@ -38,8 +38,6 @@
#include "Magnum/Math/Matrix3.h"
#include "Magnum/Math/Matrix4.h"
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifndef MAGNUM_TARGET_GLES2
#include <Corrade/Containers/String.h>
#include <Corrade/Utility/Format.h>
@ -48,6 +46,12 @@
#include "Magnum/GL/TextureArray.h"
#endif
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
using namespace Containers::Literals;
@ -180,8 +184,9 @@ template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatG
1 : out._perInstanceJointCountUniform + 1;
#endif
GL::Shader vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource((configuration.flags() & Flag::Textured
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource((configuration.flags() & Flag::Textured
#ifndef MAGNUM_TARGET_GLES2
|| configuration.flags() >= Flag::ObjectIdTexture
#endif
@ -286,8 +291,9 @@ template<UnsignedInt dimensions> typename FlatGL<dimensions>::CompileState FlatG
.addSource(rs.getString("Flat.vert"_s))
.submitCompile();
GL::Shader frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
frag.addSource(configuration.flags() & Flag::Textured ? "#define TEXTURED\n"_s : ""_s)
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s))
.addSource(configuration.flags() & Flag::Textured ? "#define TEXTURED\n"_s : ""_s)
#ifndef MAGNUM_TARGET_GLES2
.addSource(configuration.flags() & Flag::TextureArrays ? "#define TEXTURE_ARRAYS\n"_s : ""_s)
#endif

55
src/Magnum/Shaders/Implementation/CreateCompatibilityShader.h

@ -1,55 +0,0 @@
#ifndef Magnum_Shaders_Implementation_CreateCompatibilityShader_h
#define Magnum_Shaders_Implementation_CreateCompatibilityShader_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020, 2021, 2022, 2023 Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
#include <Corrade/Containers/StringView.h>
#include <Corrade/Utility/Resource.h>
#include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h"
#include "Magnum/GL/Shader.h"
/* Enable only when compiling Shaders library and thus work around
"static symbol not used" warning when using this file for TextureTools */
#if defined(MAGNUM_BUILD_STATIC) && defined(MAGNUM_SHADERS_EXPORT)
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders { namespace Implementation {
inline GL::Shader createCompatibilityShader(const Utility::Resource& rs, GL::Version version, GL::Shader::Type type) {
using namespace Containers::Literals;
GL::Shader shader(version, type);
shader.addSource(rs.getString("compatibility.glsl"_s));
return shader;
}
}}}
#endif

17
src/Magnum/Shaders/LineGL.cpp

@ -39,9 +39,14 @@
#include "Magnum/Math/Matrix3.h"
#include "Magnum/Math/Matrix4.h"
#include "Magnum/Shaders/Line.h"
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#include "Magnum/Shaders/Implementation/lineMiterLimit.h"
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
using namespace Containers::Literals;
@ -145,8 +150,9 @@ template<UnsignedInt dimensions> typename LineGL<dimensions>::CompileState LineG
CORRADE_INTERNAL_ASSERT(capStyleDefine);
CORRADE_INTERNAL_ASSERT(joinStyleDefine);
GL::Shader vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource(capStyleDefine)
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource(capStyleDefine)
.addSource(joinStyleDefine)
.addSource(configuration.flags() & Flag::VertexColor ? "#define VERTEX_COLOR\n"_s : ""_s)
.addSource(dimensions == 2 ? "#define TWO_DIMENSIONS\n"_s : "#define THREE_DIMENSIONS\n"_s)
@ -176,8 +182,9 @@ template<UnsignedInt dimensions> typename LineGL<dimensions>::CompileState LineG
.addSource(rs.getString("Line.vert"_s))
.submitCompile();
GL::Shader frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
frag.addSource(capStyleDefine)
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s))
.addSource(capStyleDefine)
.addSource(joinStyleDefine)
.addSource(configuration.flags() & Flag::VertexColor ? "#define VERTEX_COLOR\n"_s : ""_s)
.addSource(configuration.flags() & Flag::ObjectId ? "#define OBJECT_ID\n"_s : ""_s)

22
src/Magnum/Shaders/MeshVisualizerGL.cpp

@ -46,7 +46,11 @@
#include "Magnum/GL/TextureArray.h"
#endif
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
@ -187,8 +191,9 @@ GL::Version MeshVisualizerGLBase::setupShaders(GL::Shader& vert, GL::Shader& fra
const GL::Version version = context.supportedVersion({GL::Version::GLES300, GL::Version::GLES200});
#endif
vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource(flags & FlagBase::Wireframe ? "#define WIREFRAME_RENDERING\n"_s : ""_s)
vert = GL::Shader{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource(flags & FlagBase::Wireframe ? "#define WIREFRAME_RENDERING\n"_s : ""_s)
#ifndef MAGNUM_TARGET_GLES2
.addSource(flags >= FlagBase::ObjectIdTexture ? "#define TEXTURED\n"_s : ""_s)
.addSource(flags & FlagBase::TextureTransformation ? "#define TEXTURE_TRANSFORMATION\n"_s : ""_s)
@ -296,8 +301,9 @@ GL::Version MeshVisualizerGLBase::setupShaders(GL::Shader& vert, GL::Shader& fra
}
#endif
frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
frag.addSource(flags & FlagBase::Wireframe ? "#define WIREFRAME_RENDERING\n"_s : ""_s)
frag = GL::Shader{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s))
.addSource(flags & FlagBase::Wireframe ? "#define WIREFRAME_RENDERING\n"_s : ""_s)
#ifndef MAGNUM_TARGET_GLES2
.addSource(flags & FlagBase::ObjectId ? "#define OBJECT_ID\n"_s : ""_s)
.addSource(flags >= FlagBase::ObjectIdTexture ? "#define OBJECT_ID_TEXTURE\n"_s : ""_s)
@ -648,8 +654,9 @@ MeshVisualizerGL2D::CompileState MeshVisualizerGL2D::compile(const Configuration
#if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)
if(configuration.flags() & Flag::Wireframe && !(configuration.flags() & Flag::NoGeometryShader)) {
geom = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Geometry);
geom = GL::Shader{version, GL::Shader::Type::Geometry};
(*geom)
.addSource(rs.getString("compatibility.glsl"_s))
.addSource("#define WIREFRAME_RENDERING\n#define MAX_VERTICES 3\n"_s)
.addSource(baseFlags >= FlagBase::ObjectIdTexture ? "#define TEXTURED\n"_s : ""_s)
.addSource(baseFlags & FlagBase::TextureArrays ? "#define TEXTURE_ARRAYS\n"_s : ""_s)
@ -1172,8 +1179,9 @@ MeshVisualizerGL3D::CompileState MeshVisualizerGL3D::compile(const Configuration
maxVertices += 3*6;
if(configuration.flags() & Flag::NormalDirection) maxVertices += 3*6;
geom = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Geometry);
geom = GL::Shader{version, GL::Shader::Type::Geometry};
(*geom)
.addSource(rs.getString("compatibility.glsl"_s))
.addSource(Utility::format("#define MAX_VERTICES {}\n", maxVertices))
.addSource(configuration.flags() & Flag::Wireframe ? "#define WIREFRAME_RENDERING\n"_s : ""_s)
.addSource(baseFlags >= FlagBase::ObjectIdTexture ? "#define TEXTURED\n"_s : ""_s)

16
src/Magnum/Shaders/PhongGL.cpp

@ -49,7 +49,11 @@
#include "Magnum/GL/TextureArray.h"
#endif
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
@ -222,8 +226,9 @@ PhongGL::CompileState PhongGL::compile(const Configuration& configuration) {
("1.0/0.0, "_s*configuration.lightCount()).exceptSuffix(2));
#endif
GL::Shader vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource((configuration.flags() & (Flag::AmbientTexture|Flag::DiffuseTexture|Flag::SpecularTexture|Flag::NormalTexture)
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource((configuration.flags() & (Flag::AmbientTexture|Flag::DiffuseTexture|Flag::SpecularTexture|Flag::NormalTexture)
#ifndef MAGNUM_TARGET_GLES2
|| configuration.flags() >= Flag::ObjectIdTexture
#endif
@ -332,8 +337,9 @@ PhongGL::CompileState PhongGL::compile(const Configuration& configuration) {
.addSource(rs.getString("Phong.vert"_s))
.submitCompile();
GL::Shader frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
frag.addSource(configuration.flags() & Flag::AmbientTexture ? "#define AMBIENT_TEXTURE\n"_s : ""_s)
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s))
.addSource(configuration.flags() & Flag::AmbientTexture ? "#define AMBIENT_TEXTURE\n"_s : ""_s)
.addSource(configuration.flags() & Flag::DiffuseTexture ? "#define DIFFUSE_TEXTURE\n"_s : ""_s)
.addSource(configuration.flags() & Flag::SpecularTexture ? "#define SPECULAR_TEXTURE\n"_s : ""_s)
.addSource(configuration.flags() & Flag::NormalTexture ? "#define NORMAL_TEXTURE\n"_s : ""_s)

14
src/Magnum/Shaders/VectorGL.cpp

@ -45,7 +45,11 @@
#include "Magnum/GL/Buffer.h"
#endif
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
@ -124,8 +128,9 @@ template<UnsignedInt dimensions> typename VectorGL<dimensions>::CompileState Vec
GL::Version::GLES300, GL::Version::GLES200});
#endif
GL::Shader vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource(configuration.flags() & Flag::TextureTransformation ? "#define TEXTURE_TRANSFORMATION\n"_s : ""_s)
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource(configuration.flags() & Flag::TextureTransformation ? "#define TEXTURE_TRANSFORMATION\n"_s : ""_s)
.addSource(dimensions == 2 ? "#define TWO_DIMENSIONS\n"_s : "#define THREE_DIMENSIONS\n"_s);
#ifndef MAGNUM_TARGET_GLES2
if(configuration.flags() >= Flag::UniformBuffers) {
@ -151,7 +156,8 @@ template<UnsignedInt dimensions> typename VectorGL<dimensions>::CompileState Vec
.addSource(rs.getString("Vector.vert"_s))
.submitCompile();
GL::Shader frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s));
#ifndef MAGNUM_TARGET_GLES2
if(configuration.flags() >= Flag::UniformBuffers) {
#ifndef MAGNUM_TARGET_WEBGL

17
src/Magnum/Shaders/VertexColorGL.cpp

@ -32,6 +32,7 @@
#include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h"
#include "Magnum/GL/Shader.h"
#include "Magnum/Math/Color.h"
#include "Magnum/Math/Matrix3.h"
#include "Magnum/Math/Matrix4.h"
@ -43,7 +44,11 @@
#include "Magnum/GL/Buffer.h"
#endif
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifdef MAGNUM_BUILD_STATIC
static void importShaderResources() {
CORRADE_RESOURCE_INITIALIZE(MagnumShaders_RESOURCES_GL)
}
#endif
namespace Magnum { namespace Shaders {
@ -115,8 +120,9 @@ template<UnsignedInt dimensions> typename VertexColorGL<dimensions>::CompileStat
GL::Version::GLES300, GL::Version::GLES200});
#endif
GL::Shader vert = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Vertex);
vert.addSource(dimensions == 2 ? "#define TWO_DIMENSIONS\n"_s : "#define THREE_DIMENSIONS\n"_s);
GL::Shader vert{version, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource(dimensions == 2 ? "#define TWO_DIMENSIONS\n"_s : "#define THREE_DIMENSIONS\n"_s);
#ifndef MAGNUM_TARGET_GLES2
if(configuration.flags() >= Flag::UniformBuffers) {
#ifndef MAGNUM_TARGET_WEBGL
@ -141,8 +147,9 @@ template<UnsignedInt dimensions> typename VertexColorGL<dimensions>::CompileStat
.addSource(rs.getString("VertexColor.vert"_s))
.submitCompile();
GL::Shader frag = Implementation::createCompatibilityShader(rs, version, GL::Shader::Type::Fragment);
frag.addSource(rs.getString("generic.glsl"_s))
GL::Shader frag{version, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s))
.addSource(rs.getString("generic.glsl"_s))
.addSource(rs.getString("VertexColor.frag"_s))
.submitCompile();

13
src/Magnum/TextureTools/DistanceField.cpp

@ -39,7 +39,6 @@
#include "Magnum/GL/Mesh.h"
#include "Magnum/GL/Shader.h"
#include "Magnum/GL/Texture.h"
#include "Magnum/Shaders/Implementation/CreateCompatibilityShader.h"
#ifdef MAGNUM_BUILD_STATIC
static void importTextureToolResources() {
@ -103,12 +102,14 @@ DistanceFieldShader::DistanceFieldShader(const UnsignedInt radius) {
GL::Version::GLES300, GL::Version::GLES200});
#endif
GL::Shader vert = Shaders::Implementation::createCompatibilityShader(rs, v, GL::Shader::Type::Vertex);
GL::Shader frag = Shaders::Implementation::createCompatibilityShader(rs, v, GL::Shader::Type::Fragment);
vert.addSource(rs.getString("FullScreenTriangle.glsl"_s))
GL::Shader vert{v, GL::Shader::Type::Vertex};
vert.addSource(rs.getString("compatibility.glsl"_s))
.addSource(rs.getString("FullScreenTriangle.glsl"_s))
.addSource(rs.getString("DistanceFieldShader.vert"_s));
frag.addSource(Utility::format("#define RADIUS {}\n", radius))
GL::Shader frag{v, GL::Shader::Type::Fragment};
frag.addSource(rs.getString("compatibility.glsl"_s))
.addSource(Utility::format("#define RADIUS {}\n", radius))
.addSource(rs.getString("DistanceFieldShader.frag"_s));
CORRADE_INTERNAL_ASSERT_OUTPUT(vert.compile() && frag.compile());

Loading…
Cancel
Save