Browse Source

doc: rename DOXYGEN_IGNORE() to DOXYGEN_ELLIPSIS().

And use DOXYGEN_IGNORE() for replacing with nothing.
pull/525/head
Vladimír Vondruš 4 years ago
parent
commit
9c2181dc3c
  1. 27
      doc/conf.py
  2. 6
      doc/snippets/Magnum.cpp
  3. 8
      doc/snippets/MagnumGL-application.cpp
  4. 32
      doc/snippets/MagnumGL.cpp
  5. 6
      doc/snippets/MagnumMath.cpp
  6. 4
      doc/snippets/MagnumMeshTools-gl.cpp
  7. 2
      doc/snippets/MagnumShaderTools.cpp
  8. 46
      doc/snippets/MagnumShaders-gl.cpp
  9. 38
      doc/snippets/MagnumTrade.cpp
  10. 278
      doc/snippets/MagnumVk.cpp
  11. 4
      doc/snippets/debugtools-compareimage.cpp

27
doc/conf.py

@ -41,22 +41,25 @@ VERSION_LABELS = True
_magnum_colors_src = re.compile(r"""<span class="mh">0x(?P<hex>[0-9a-f]{6})(?P<alpha>[0-9a-f]{2})?(?P<literal>_s?rgba?f?)</span>""") _magnum_colors_src = re.compile(r"""<span class="mh">0x(?P<hex>[0-9a-f]{6})(?P<alpha>[0-9a-f]{2})?(?P<literal>_s?rgba?f?)</span>""")
_magnum_colors_dst = r"""<span class="mh">0x\g<hex>\g<alpha>\g<literal><span class="m-code-color" style="background-color: #\g<hex>;"></span></span>""" _magnum_colors_dst = r"""<span class="mh">0x\g<hex>\g<alpha>\g<literal><span class="m-code-color" style="background-color: #\g<hex>;"></span></span>"""
# Code wrapped in DOXYGEN_IGNORE() will get replaced by an (Unicode) ellipsis # Code wrapped in DOXYGEN_ELLIPSIS() will get replaced by an (Unicode) ellipsis
# in the output. In order to make the same code compilable, add # in the output; code wrapped in DOXYGEN_IGNORE() will get replaced by nothing.
# In order to make the same code compilable, add
# #
# #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
# #define DOXYGEN_IGNORE(...) __VA_ARGS__ # #define DOXYGEN_IGNORE(...) __VA_ARGS__
# #
# to the snippet code # to the snippet code.
def _doxygen_ignore(code: str): def _doxygen_ignore(code: str):
while 'DOXYGEN_IGNORE(' in code: for macro, replace in [('DOXYGEN_ELLIPSIS(', ''), ('DOXYGEN_IGNORE(', '')]:
i = code.index('DOXYGEN_IGNORE(') while macro in code:
depth = 1 i = code.index(macro)
for j in range(i + len('DOXYGEN_IGNORE('), len(code)): depth = 1
if code[j] == '(': depth += 1 for j in range(i + len(macro), len(code)):
elif code[j] == ')': depth -= 1 if code[j] == '(': depth += 1
if depth == 0: break elif code[j] == ')': depth -= 1
assert depth == 0, "unmatched DOXYGEN_IGNORE() parentheses in %s" % code if depth == 0: break
code = code[:i] + '' + code[j+1:] assert depth == 0, "unmatched %s) parentheses in %s" % (macro, code)
code = code[:i] + replace + code[j+1:]
return code return code
M_CODE_FILTERS_PRE = { M_CODE_FILTERS_PRE = {

6
doc/snippets/Magnum.cpp

@ -38,7 +38,7 @@
#include "Magnum/GL/Texture.h" #include "Magnum/GL/Texture.h"
#endif #endif
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
@ -87,7 +87,7 @@ namespace Mn = Magnum;
#include <Magnum/Magnum.h> /* only a Matrix4 forward declaration */ #include <Magnum/Magnum.h> /* only a Matrix4 forward declaration */
#include <Magnum/Math/Matrix4.h> /* the actual definition */ #include <Magnum/Math/Matrix4.h> /* the actual definition */
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Matrix4 a = Matrix4::translation({3.0f, 1.0f, 0.5f}); Matrix4 a = Matrix4::translation({3.0f, 1.0f, 0.5f});
/* [features-forward-declaration-use] */ /* [features-forward-declaration-use] */
@ -96,7 +96,7 @@ static_cast<void>(a);
{ {
/* [features-debug-output] */ /* [features-debug-output] */
Image2D image = DOXYGEN_IGNORE(Image2D{{}, {}, {}}); Image2D image = DOXYGEN_ELLIPSIS(Image2D{{}, {}, {}});
Debug{} << "Image format is" << image.format() << "and size" << image.size(); Debug{} << "Image format is" << image.format() << "and size" << image.size();
Debug{} << "Color of the first pixel is" << image.pixels<Color4ub>()[0][0]; Debug{} << "Color of the first pixel is" << image.pixels<Color4ub>()[0][0];

8
doc/snippets/MagnumGL-application.cpp

@ -33,23 +33,23 @@
using namespace Magnum; using namespace Magnum;
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
/* [opengl-wrapping-nocreate] */ /* [opengl-wrapping-nocreate] */
class MyApplication: public Platform::Application { class MyApplication: public Platform::Application {
DOXYGEN_IGNORE(explicit MyApplication(const Arguments& arguments);) DOXYGEN_ELLIPSIS(explicit MyApplication(const Arguments& arguments);)
private: private:
/* Placeholders without an underlying GL object */ /* Placeholders without an underlying GL object */
GL::Mesh _mesh{NoCreate}; GL::Mesh _mesh{NoCreate};
Shaders::PhongGL _shader{NoCreate}; Shaders::PhongGL _shader{NoCreate};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}; };
MyApplication::MyApplication(const Arguments& arguments): MyApplication::MyApplication(const Arguments& arguments):
Platform::Application{arguments, NoCreate} Platform::Application{arguments, NoCreate}
{ {
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
create(); create();
/* GL context is ready, now it's safe to populate the GL objects */ /* GL context is ready, now it's safe to populate the GL objects */

32
doc/snippets/MagnumGL.cpp

@ -85,7 +85,7 @@
#include "Magnum/GL/RectangleTexture.h" #include "Magnum/GL/RectangleTexture.h"
#endif #endif
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
@ -453,7 +453,7 @@ GL::BufferImage2D image = framebuffer.read(framebuffer.viewport(),
{ {
/* [Buffer-setdata] */ /* [Buffer-setdata] */
const Vector3 data[]{ const Vector3 data[]{
DOXYGEN_IGNORE({}) DOXYGEN_ELLIPSIS({})
}; };
GL::Buffer buffer; GL::Buffer buffer;
@ -466,7 +466,7 @@ GL::Buffer buffer2{data}; // or construct & fill in a single step
{ {
GL::Buffer buffer; GL::Buffer buffer;
/* [Buffer-setdata-stl] */ /* [Buffer-setdata-stl] */
std::vector<Vector3> data = DOXYGEN_IGNORE({}); std::vector<Vector3> data = DOXYGEN_ELLIPSIS({});
buffer.setData(data); buffer.setData(data);
/* [Buffer-setdata-stl] */ /* [Buffer-setdata-stl] */
} }
@ -1042,7 +1042,7 @@ framebuffer.mapForDraw({
{ {
/* [Mesh-vertices] */ /* [Mesh-vertices] */
const Vector3 positions[]{ const Vector3 positions[]{
DOXYGEN_IGNORE({}) DOXYGEN_ELLIPSIS({})
}; };
GL::Buffer vertices{positions}; GL::Buffer vertices{positions};
@ -1059,7 +1059,7 @@ struct Vertex {
Vector3 normal; Vector3 normal;
}; };
const Vertex vertexData[]{ const Vertex vertexData[]{
DOXYGEN_IGNORE({}) DOXYGEN_ELLIPSIS({})
}; };
GL::Buffer vertices{vertexData}; GL::Buffer vertices{vertexData};
@ -1075,11 +1075,11 @@ mesh.setCount(Containers::arraySize(vertexData))
GL::Mesh mesh; GL::Mesh mesh;
/* [Mesh-indices] */ /* [Mesh-indices] */
const UnsignedInt indexData[]{ const UnsignedInt indexData[]{
DOXYGEN_IGNORE(0) DOXYGEN_ELLIPSIS(0)
}; };
GL::Buffer indices{indexData}; GL::Buffer indices{indexData};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
mesh.setIndexBuffer(indices, 0, MeshIndexType::UnsignedInt); mesh.setIndexBuffer(indices, 0, MeshIndexType::UnsignedInt);
/* [Mesh-indices] */ /* [Mesh-indices] */
} }
@ -1087,11 +1087,11 @@ mesh.setIndexBuffer(indices, 0, MeshIndexType::UnsignedInt);
{ {
GL::Mesh mesh; GL::Mesh mesh;
/* [Mesh-vertices-interleaved-tool] */ /* [Mesh-vertices-interleaved-tool] */
Containers::ArrayView<const Vector3> positions = DOXYGEN_IGNORE({}); Containers::ArrayView<const Vector3> positions = DOXYGEN_ELLIPSIS({});
Containers::ArrayView<const Vector3> normals = DOXYGEN_IGNORE({}); Containers::ArrayView<const Vector3> normals = DOXYGEN_ELLIPSIS({});
GL::Buffer vertices{MeshTools::interleave(positions, normals)}; GL::Buffer vertices{MeshTools::interleave(positions, normals)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
mesh.addVertexBuffer(vertices, 0, mesh.addVertexBuffer(vertices, 0,
Shaders::PhongGL::Position{}, Shaders::PhongGL::Position{},
Shaders::PhongGL::Normal{}); Shaders::PhongGL::Normal{});
@ -1107,7 +1107,7 @@ MeshIndexType type;
std::tie(compressed, type) = MeshTools::compressIndices(indexData); std::tie(compressed, type) = MeshTools::compressIndices(indexData);
GL::Buffer indices{compressed}; GL::Buffer indices{compressed};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
mesh.setIndexBuffer(indices, 0, type); mesh.setIndexBuffer(indices, 0, type);
/* [Mesh-indices-tool] */ /* [Mesh-indices-tool] */
} }
@ -1125,11 +1125,11 @@ struct Packed {
Short:16; Short:16;
}; };
const Packed vertexData[]{ const Packed vertexData[]{
DOXYGEN_IGNORE({}) DOXYGEN_ELLIPSIS({})
}; };
GL::Buffer vertices{vertexData}; GL::Buffer vertices{vertexData};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
mesh.addVertexBuffer(vertices, 0, mesh.addVertexBuffer(vertices, 0,
Shaders::PhongGL::Position{Shaders::PhongGL::Position::Components::Three, Shaders::PhongGL::Position{Shaders::PhongGL::Position::Components::Three,
Shaders::PhongGL::Position::DataType::Half}, Shaders::PhongGL::Position::DataType::Half},
@ -1167,7 +1167,7 @@ mesh.addVertexBuffer(colorBuffer, 0, 4, GL::DynamicAttribute{
GL::Mesh mesh; GL::Mesh mesh;
/* [Mesh-buffer-ownership] */ /* [Mesh-buffer-ownership] */
GL::Buffer vertices, indices; GL::Buffer vertices, indices;
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
mesh.addVertexBuffer(std::move(vertices), 0, mesh.addVertexBuffer(std::move(vertices), 0,
Shaders::PhongGL::Position{}, Shaders::PhongGL::Position{},
Shaders::PhongGL::Normal{}) Shaders::PhongGL::Normal{})
@ -1183,8 +1183,8 @@ mesh.addVertexBuffer(vertices, 0, Shaders::PhongGL::Position{}, 20)
{ {
GL::Mesh mesh; GL::Mesh mesh;
/* [Mesh-draw] */ /* [Mesh-draw] */
Shaders::PhongGL shader{DOXYGEN_IGNORE()}; Shaders::PhongGL shader{DOXYGEN_ELLIPSIS()};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
shader.draw(mesh); shader.draw(mesh);
/* [Mesh-draw] */ /* [Mesh-draw] */
} }

6
doc/snippets/MagnumMath.cpp

@ -41,7 +41,7 @@
#include "Magnum/Math/StrictWeakOrdering.h" #include "Magnum/Math/StrictWeakOrdering.h"
#include "Magnum/Math/Swizzle.h" #include "Magnum/Math/Swizzle.h"
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
@ -1037,7 +1037,7 @@ static_cast<void>(transformation);
{ {
/* [Matrix3-rotation-extract-reflection] */ /* [Matrix3-rotation-extract-reflection] */
Matrix3 transformation = DOXYGEN_IGNORE({}); Matrix3 transformation = DOXYGEN_ELLIPSIS({});
Matrix2x2 rotation = transformation.rotation(); Matrix2x2 rotation = transformation.rotation();
Vector2 scaling = transformation.scaling(); Vector2 scaling = transformation.scaling();
if(rotation.determinant() < 0.0f) { if(rotation.determinant() < 0.0f) {
@ -1060,7 +1060,7 @@ static_cast<void>(transformation);
{ {
/* [Matrix4-rotation-extract-reflection] */ /* [Matrix4-rotation-extract-reflection] */
Matrix4 transformation = DOXYGEN_IGNORE({}); Matrix4 transformation = DOXYGEN_ELLIPSIS({});
Matrix3x3 rotation = transformation.rotation(); Matrix3x3 rotation = transformation.rotation();
Vector3 scaling = transformation.scaling(); Vector3 scaling = transformation.scaling();
if(rotation.determinant() < 0.0f) { if(rotation.determinant() < 0.0f) {

4
doc/snippets/MagnumMeshTools-gl.cpp

@ -38,7 +38,7 @@
#include <vector> #include <vector>
#endif #endif
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;
@ -58,7 +58,7 @@ GL::Mesh mesh = MeshTools::compile(meshData, indices, vertices);
{ {
Trade::MeshData meshData{MeshPrimitive::Lines, 5}; Trade::MeshData meshData{MeshPrimitive::Lines, 5};
/* [compile-external-attributes] */ /* [compile-external-attributes] */
Trade::MeshAttribute myCustomAttribute = DOXYGEN_IGNORE({}); Trade::MeshAttribute myCustomAttribute = DOXYGEN_ELLIPSIS({});
GL::Buffer indices, vertices; GL::Buffer indices, vertices;
indices.setData(meshData.indexData()); indices.setData(meshData.indexData());

2
doc/snippets/MagnumShaderTools.cpp

@ -33,7 +33,7 @@
#include "Magnum/ShaderTools/AbstractConverter.h" #include "Magnum/ShaderTools/AbstractConverter.h"
#include "Magnum/ShaderTools/Stage.h" #include "Magnum/ShaderTools/Stage.h"
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;

46
doc/snippets/MagnumShaders-gl.cpp

@ -65,7 +65,7 @@
#include "Magnum/Shaders/Vector.h" #include "Magnum/Shaders/Vector.h"
#endif #endif
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
@ -103,7 +103,7 @@ mesh.addVertexBuffer(vertices, 0,
{ {
GL::Mesh mesh; GL::Mesh mesh;
/* [shaders-classic] */ /* [shaders-classic] */
Matrix4 transformationMatrix{DOXYGEN_IGNORE()}, projectionMatrix{DOXYGEN_IGNORE()}; Matrix4 transformationMatrix{DOXYGEN_ELLIPSIS()}, projectionMatrix{DOXYGEN_ELLIPSIS()};
Shaders::PhongGL shader; Shaders::PhongGL shader;
shader shader
@ -159,10 +159,10 @@ shader
GL::Buffer projectionUniform, transformationUniform, drawUniform, lightUniform, GL::Buffer projectionUniform, transformationUniform, drawUniform, lightUniform,
materialUniform; materialUniform;
/* [shaders-multi] */ /* [shaders-multi] */
GL::Mesh redCone{DOXYGEN_IGNORE()}, yellowCube{DOXYGEN_IGNORE()}, redSphere{DOXYGEN_IGNORE()}; GL::Mesh redCone{DOXYGEN_ELLIPSIS()}, yellowCube{DOXYGEN_ELLIPSIS()}, redSphere{DOXYGEN_ELLIPSIS()};
Matrix4 redConeTransformation{DOXYGEN_IGNORE()}, Matrix4 redConeTransformation{DOXYGEN_ELLIPSIS()},
yellowCubeTransformation{DOXYGEN_IGNORE()}, yellowCubeTransformation{DOXYGEN_ELLIPSIS()},
redSphereTransformation{DOXYGEN_IGNORE()}; redSphereTransformation{DOXYGEN_ELLIPSIS()};
materialUniform.setData({ materialUniform.setData({
Shaders::PhongMaterialUniform{} Shaders::PhongMaterialUniform{}
@ -210,13 +210,13 @@ shader
{ {
GL::Mesh mesh; GL::Mesh mesh;
/* [shaders-multidraw] */ /* [shaders-multidraw] */
GL::MeshView redConeView{DOXYGEN_IGNORE(mesh)}, yellowCubeView{DOXYGEN_IGNORE(mesh)}, redSphereView{DOXYGEN_IGNORE(mesh)}; GL::MeshView redConeView{DOXYGEN_ELLIPSIS(mesh)}, yellowCubeView{DOXYGEN_ELLIPSIS(mesh)}, redSphereView{DOXYGEN_ELLIPSIS(mesh)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
/* One light, two materials, three draws; with multidraw enabled */ /* One light, two materials, three draws; with multidraw enabled */
Shaders::PhongGL shader{Shaders::PhongGL::Flag::MultiDraw, 1, 2, 3}; Shaders::PhongGL shader{Shaders::PhongGL::Flag::MultiDraw, 1, 2, 3};
shader shader
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.draw({redConeView, yellowCubeView, redSphereView}); .draw({redConeView, yellowCubeView, redSphereView});
/* [shaders-multidraw] */ /* [shaders-multidraw] */
} }
@ -225,9 +225,9 @@ shader
{ {
Matrix4 projectionMatrix; Matrix4 projectionMatrix;
/* [shaders-instancing] */ /* [shaders-instancing] */
Matrix4 redSphereTransformation{DOXYGEN_IGNORE()}, Matrix4 redSphereTransformation{DOXYGEN_ELLIPSIS()},
yellowSphereTransformation{DOXYGEN_IGNORE()}, yellowSphereTransformation{DOXYGEN_ELLIPSIS()},
greenSphereTransformation{DOXYGEN_IGNORE()}; greenSphereTransformation{DOXYGEN_ELLIPSIS()};
struct { struct {
Matrix4 transformationMatrix; Matrix4 transformationMatrix;
@ -245,7 +245,7 @@ struct {
0x3bd267_rgbf}, 0x3bd267_rgbf},
}; };
GL::Mesh sphereInstanced{DOXYGEN_IGNORE()}; GL::Mesh sphereInstanced{DOXYGEN_ELLIPSIS()};
sphereInstanced.addVertexBufferInstanced(GL::Buffer{instanceData}, 1, 0, sphereInstanced.addVertexBufferInstanced(GL::Buffer{instanceData}, 1, 0,
Shaders::PhongGL::TransformationMatrix{}, Shaders::PhongGL::TransformationMatrix{},
Shaders::PhongGL::NormalMatrix{}, Shaders::PhongGL::NormalMatrix{},
@ -256,7 +256,7 @@ Shaders::PhongGL shader{Shaders::PhongGL::Flag::InstancedTransformation|
Shaders::PhongGL::Flag::VertexColor}; Shaders::PhongGL::Flag::VertexColor};
shader shader
.setProjectionMatrix(projectionMatrix) .setProjectionMatrix(projectionMatrix)
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.draw(sphereInstanced); .draw(sphereInstanced);
/* [shaders-instancing] */ /* [shaders-instancing] */
} }
@ -265,11 +265,11 @@ shader
GL::Mesh mesh; GL::Mesh mesh;
/* [shaders-textures] */ /* [shaders-textures] */
GL::Texture2D diffuseTexture; GL::Texture2D diffuseTexture;
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Shaders::PhongGL shader{Shaders::PhongGL::Flag::DiffuseTexture}; Shaders::PhongGL shader{Shaders::PhongGL::Flag::DiffuseTexture};
shader.bindDiffuseTexture(diffuseTexture) shader.bindDiffuseTexture(diffuseTexture)
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.draw(mesh); .draw(mesh);
/* [shaders-textures] */ /* [shaders-textures] */
} }
@ -277,13 +277,13 @@ shader.bindDiffuseTexture(diffuseTexture)
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
{ {
GL::Mesh mesh; GL::Mesh mesh;
GL::MeshView redConeView{DOXYGEN_IGNORE(mesh)}, yellowCubeView{DOXYGEN_IGNORE(mesh)}, redSphereView{DOXYGEN_IGNORE(mesh)}; GL::MeshView redConeView{DOXYGEN_ELLIPSIS(mesh)}, yellowCubeView{DOXYGEN_ELLIPSIS(mesh)}, redSphereView{DOXYGEN_ELLIPSIS(mesh)};
/* [shaders-texture-arrays] */ /* [shaders-texture-arrays] */
ImageView2D coneDiffuse{DOXYGEN_IGNORE({}, {})}, cubeDiffuse{DOXYGEN_IGNORE({}, {})}, sphereDiffuse{DOXYGEN_IGNORE({}, {})}; ImageView2D coneDiffuse{DOXYGEN_ELLIPSIS({}, {})}, cubeDiffuse{DOXYGEN_ELLIPSIS({}, {})}, sphereDiffuse{DOXYGEN_ELLIPSIS({}, {})};
GL::Texture2DArray diffuseTexture; GL::Texture2DArray diffuseTexture;
diffuseTexture diffuseTexture
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
/* Assuming all iamges have the same format and size */ /* Assuming all iamges have the same format and size */
.setStorage(1, GL::textureFormat(coneDiffuse.format()), .setStorage(1, GL::textureFormat(coneDiffuse.format()),
{coneDiffuse.size(), 3}) {coneDiffuse.size(), 3})
@ -307,7 +307,7 @@ Shaders::PhongGL shader{
Shaders::PhongGL::Flag::TextureArrays, Shaders::PhongGL::Flag::TextureArrays,
1, 2, 3}; 1, 2, 3};
shader shader
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.bindDiffuseTexture(diffuseTexture) .bindDiffuseTexture(diffuseTexture)
.bindTextureTransformationBuffer(textureTransformationUniform) .bindTextureTransformationBuffer(textureTransformationUniform)
.draw({redConeView, yellowCubeView, redSphereView}); .draw({redConeView, yellowCubeView, redSphereView});
@ -885,7 +885,7 @@ shader
.setLightColors({0xf0f0ff_srgbf*0.1f, .setLightColors({0xf0f0ff_srgbf*0.1f,
0xff8080_srgbf*10.0f, 0xff8080_srgbf*10.0f,
0x80ff80_srgbf*10.0f}) 0x80ff80_srgbf*10.0f})
.setLightColors(DOXYGEN_IGNORE({0xf0f0ff_srgbf})) .setLightColors(DOXYGEN_ELLIPSIS({0xf0f0ff_srgbf}))
.setLightRanges({Constants::inf(), .setLightRanges({Constants::inf(),
2.0f, 2.0f,
2.0f}); 2.0f});
@ -896,9 +896,9 @@ shader
Color3 ambientColor; Color3 ambientColor;
GL::Texture2D diffuseTexture; GL::Texture2D diffuseTexture;
/* [PhongGL-usage-lights-ambient] */ /* [PhongGL-usage-lights-ambient] */
Trade::LightData ambientLight = DOXYGEN_IGNORE(Trade::LightData{{}, {}, {}}); Trade::LightData ambientLight = DOXYGEN_ELLIPSIS(Trade::LightData{{}, {}, {}});
Shaders::PhongGL shader{Shaders::PhongGL::Flag::AmbientTexture|DOXYGEN_IGNORE(Shaders::PhongGL::Flag::DiffuseTexture), DOXYGEN_IGNORE(3)}; Shaders::PhongGL shader{Shaders::PhongGL::Flag::AmbientTexture|DOXYGEN_ELLIPSIS(Shaders::PhongGL::Flag::DiffuseTexture), DOXYGEN_ELLIPSIS(3)};
shader shader
.setAmbientColor(ambientColor + ambientLight.color()*ambientLight.intensity()) .setAmbientColor(ambientColor + ambientLight.color()*ambientLight.intensity())
.bindAmbientTexture(diffuseTexture) .bindAmbientTexture(diffuseTexture)

38
doc/snippets/MagnumTrade.cpp

@ -71,7 +71,7 @@
#include "Magnum/Trade/MeshData3D.h" #include "Magnum/Trade/MeshData3D.h"
#endif #endif
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
using namespace Magnum; using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
@ -85,7 +85,7 @@ PluginManager::Manager<Trade::AbstractImageConverter> manager;
Containers::Pointer<Trade::AbstractImageConverter> converter = Containers::Pointer<Trade::AbstractImageConverter> converter =
manager.loadAndInstantiate("AnyImageConverter"); manager.loadAndInstantiate("AnyImageConverter");
Image2D image{PixelFormat::RGBA8Unorm, size, DOXYGEN_IGNORE({})}; Image2D image{PixelFormat::RGBA8Unorm, size, DOXYGEN_ELLIPSIS({})};
if(!converter || !converter->convertToFile(image, "image.png")) if(!converter || !converter->convertToFile(image, "image.png"))
Fatal{} << "Can't save image.png with AnyImageConverter"; Fatal{} << "Can't save image.png with AnyImageConverter";
/* [AbstractImageConverter-usage-file] */ /* [AbstractImageConverter-usage-file] */
@ -97,9 +97,9 @@ PluginManager::Manager<Trade::AbstractImageConverter> manager;
Containers::Pointer<Trade::AbstractImageConverter> converter = Containers::Pointer<Trade::AbstractImageConverter> converter =
manager.loadAndInstantiate("AnyImageConverter"); manager.loadAndInstantiate("AnyImageConverter");
Image2D level0{PixelFormat::RGBA16F, {256, 256}, DOXYGEN_IGNORE({})}; Image2D level0{PixelFormat::RGBA16F, {256, 256}, DOXYGEN_ELLIPSIS({})};
Image2D level1{PixelFormat::RGBA16F, {128, 128}, DOXYGEN_IGNORE({})}; Image2D level1{PixelFormat::RGBA16F, {128, 128}, DOXYGEN_ELLIPSIS({})};
Image2D level2{PixelFormat::RGBA16F, {64, 64}, DOXYGEN_IGNORE({})}; Image2D level2{PixelFormat::RGBA16F, {64, 64}, DOXYGEN_ELLIPSIS({})};
if(!converter || !converter->convertToFile({level0, level1, level2}, "image.exr")) if(!converter || !converter->convertToFile({level0, level1, level2}, "image.exr"))
Fatal{} << "Can't save image.exr with AnyImageConverter"; Fatal{} << "Can't save image.exr with AnyImageConverter";
@ -236,7 +236,7 @@ void doOpenData(Containers::Array<char>&& data, Trade::DataFlags dataFlags) over
Utility::copy(data, _in); Utility::copy(data, _in);
} }
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
} }
/* [AbstractImporter-doOpenData-ownership] */ /* [AbstractImporter-doOpenData-ownership] */
} importer; } importer;
@ -248,7 +248,7 @@ PluginManager::Manager<Trade::AbstractSceneConverter> manager;
Containers::Pointer<Trade::AbstractSceneConverter> converter = Containers::Pointer<Trade::AbstractSceneConverter> converter =
manager.loadAndInstantiate("AnySceneConverter"); manager.loadAndInstantiate("AnySceneConverter");
Trade::MeshData mesh = DOXYGEN_IGNORE(Trade::MeshData{{}, {}}); Trade::MeshData mesh = DOXYGEN_ELLIPSIS(Trade::MeshData{{}, {}});
if(!converter || !converter->convertToFile(mesh, "mesh.ply")) if(!converter || !converter->convertToFile(mesh, "mesh.ply"))
Fatal{} << "Can't save mesh.ply with AnySceneConverter"; Fatal{} << "Can't save mesh.ply with AnySceneConverter";
/* [AbstractSceneConverter-usage-file] */ /* [AbstractSceneConverter-usage-file] */
@ -339,7 +339,7 @@ Containers::Optional<Trade::ImageData2D> image = importer->image2D(0);
if(!image) Fatal{} << "Oopsie!"; if(!image) Fatal{} << "Oopsie!";
GL::Texture2D texture; GL::Texture2D texture;
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
texture.setStorage(1, GL::textureFormat(image->format()), image->size()); texture.setStorage(1, GL::textureFormat(image->format()), image->size());
if(!image->isCompressed()) if(!image->isCompressed())
texture.setSubImage(0, {}, *image); texture.setSubImage(0, {}, *image);
@ -397,7 +397,7 @@ Trade::MaterialAttributeData b{"DiffuseColor", 0x3bd267ff_srgbaf};
{ {
/* [MaterialData-usage] */ /* [MaterialData-usage] */
Trade::MaterialData data = DOXYGEN_IGNORE(Trade::MaterialData{{}, {}}); Trade::MaterialData data = DOXYGEN_ELLIPSIS(Trade::MaterialData{{}, {}});
// Assumes the attribute exists // Assumes the attribute exists
Float roughness = data.attribute<Float>(Trade::MaterialAttribute::Roughness); Float roughness = data.attribute<Float>(Trade::MaterialAttribute::Roughness);
@ -426,7 +426,7 @@ if(data.types() & Trade::MaterialType::PbrSpecularGlossiness) {
Color4 specular = pbr.specularColor(); Color4 specular = pbr.specularColor();
Float glossiness = pbr.glossiness(); Float glossiness = pbr.glossiness();
DOXYGEN_IGNORE(static_cast<void>(diffuse), static_cast<void>(specular), static_cast<void>(glossiness);) DOXYGEN_ELLIPSIS(static_cast<void>(diffuse), static_cast<void>(specular), static_cast<void>(glossiness);)
/* Otherwise use metallic/roughness (or defaults if no attributes present) */ /* Otherwise use metallic/roughness (or defaults if no attributes present) */
} else { } else {
@ -436,14 +436,14 @@ if(data.types() & Trade::MaterialType::PbrSpecularGlossiness) {
Float metalness = pbr.metalness(); Float metalness = pbr.metalness();
Float roughness = pbr.roughness(); Float roughness = pbr.roughness();
DOXYGEN_IGNORE(static_cast<void>(base), static_cast<void>(metalness), static_cast<void>(roughness);) DOXYGEN_ELLIPSIS(static_cast<void>(base), static_cast<void>(metalness), static_cast<void>(roughness);)
} }
/* [MaterialData-usage-types] */ /* [MaterialData-usage-types] */
} }
{ {
/* [MaterialData-usage-texture-complexity] */ /* [MaterialData-usage-texture-complexity] */
Trade::PbrSpecularGlossinessMaterialData data = DOXYGEN_IGNORE(Trade::PbrSpecularGlossinessMaterialData{{}, {}}); Trade::PbrSpecularGlossinessMaterialData data = DOXYGEN_ELLIPSIS(Trade::PbrSpecularGlossinessMaterialData{{}, {}});
/* Simple case for diffuse + packed specular/glossiness texture, the default /* Simple case for diffuse + packed specular/glossiness texture, the default
coordinate set and a common coordinate transformation for all textures */ coordinate set and a common coordinate transformation for all textures */
@ -455,11 +455,11 @@ if(data.hasAttribute(Trade::MaterialAttribute::DiffuseTexture) &&
UnsignedInt specularGlossiness = data.specularTexture(); UnsignedInt specularGlossiness = data.specularTexture();
Matrix3 textureMatrix = data.commonTextureMatrix(); Matrix3 textureMatrix = data.commonTextureMatrix();
DOXYGEN_IGNORE(static_cast<void>(diffuse), static_cast<void>(specularGlossiness), static_cast<void>(textureMatrix);) DOXYGEN_ELLIPSIS(static_cast<void>(diffuse), static_cast<void>(specularGlossiness), static_cast<void>(textureMatrix);)
/* Extra work needed when using a non-default texture coordinate set */ /* Extra work needed when using a non-default texture coordinate set */
} else if(data.hasTextureCoordinates() && data.hasCommonTextureCoordinates()) { } else if(data.hasTextureCoordinates() && data.hasCommonTextureCoordinates()) {
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
/* Etc... */ /* Etc... */
} else Fatal{} << "Material too complex, giving up"; } else Fatal{} << "Material too complex, giving up";
@ -475,7 +475,7 @@ if(data.hasLayer(Trade::MaterialLayer::ClearCoat)) {
Float clearCoatRoughness = data.attributeOr(Trade::MaterialLayer::ClearCoat, Float clearCoatRoughness = data.attributeOr(Trade::MaterialLayer::ClearCoat,
Trade::MaterialAttribute::Roughness, 0.0f); Trade::MaterialAttribute::Roughness, 0.0f);
DOXYGEN_IGNORE(static_cast<void>(clearCoatFactor), static_cast<void>(clearCoatRoughness);) DOXYGEN_ELLIPSIS(static_cast<void>(clearCoatFactor), static_cast<void>(clearCoatRoughness);)
} }
/* [MaterialData-usage-layers] */ /* [MaterialData-usage-layers] */
} }
@ -489,7 +489,7 @@ if(data.types() & Trade::MaterialType::PbrClearCoat) {
Float clearCoatFactor = clearCoat.layerFactor(); Float clearCoatFactor = clearCoat.layerFactor();
Float clearCoatRoughness = clearCoat.roughness(); Float clearCoatRoughness = clearCoat.roughness();
DOXYGEN_IGNORE(static_cast<void>(clearCoatFactor), static_cast<void>(clearCoatRoughness);) DOXYGEN_ELLIPSIS(static_cast<void>(clearCoatFactor), static_cast<void>(clearCoatRoughness);)
} }
/* [MaterialData-usage-layers-types] */ /* [MaterialData-usage-layers-types] */
} }
@ -638,7 +638,7 @@ constexpr Trade::MeshAttributeData colors{Trade::MeshAttribute::Color,
/* Actual data populated later */ /* Actual data populated later */
Containers::Array<char> vertexData{15*sizeof(Vertex)}; Containers::Array<char> vertexData{15*sizeof(Vertex)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Trade::MeshData{MeshPrimitive::Triangles, std::move(vertexData), Trade::MeshData{MeshPrimitive::Triangles, std::move(vertexData),
{positions, colors}}; {positions, colors}};
/* [MeshAttributeData-usage-offset-only] */ /* [MeshAttributeData-usage-offset-only] */
@ -659,7 +659,7 @@ Trade::MeshAttributeData normals{Trade::MeshAttribute::Normal,
{ {
/* This snippet is also used by GL::Mesh, bear that in mind when updating */ /* This snippet is also used by GL::Mesh, bear that in mind when updating */
/* [MeshData-usage-compile] */ /* [MeshData-usage-compile] */
Trade::MeshData data = DOXYGEN_IGNORE(Trade::MeshData{MeshPrimitive::Points, 0}); Trade::MeshData data = DOXYGEN_ELLIPSIS(Trade::MeshData{MeshPrimitive::Points, 0});
GL::Mesh mesh = MeshTools::compile(data); GL::Mesh mesh = MeshTools::compile(data);
/* [MeshData-usage-compile] */ /* [MeshData-usage-compile] */
@ -747,7 +747,7 @@ struct Vertex {
Containers::Array<char> indexData{indexCount*sizeof(UnsignedShort)}; Containers::Array<char> indexData{indexCount*sizeof(UnsignedShort)};
Containers::Array<char> vertexData{vertexCount*sizeof(Vertex)}; Containers::Array<char> vertexData{vertexCount*sizeof(Vertex)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
auto vertices = Containers::arrayCast<const Vertex>(vertexData); auto vertices = Containers::arrayCast<const Vertex>(vertexData);
auto indices = Containers::arrayCast<const UnsignedShort>(indexData); auto indices = Containers::arrayCast<const UnsignedShort>(indexData);

278
doc/snippets/MagnumVk.cpp

@ -82,7 +82,7 @@
using namespace Magnum; using namespace Magnum;
using namespace Magnum::Math::Literals; using namespace Magnum::Math::Literals;
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
/* [Instance-delayed-creation] */ /* [Instance-delayed-creation] */
class MyApplication { class MyApplication {
@ -96,8 +96,8 @@ class MyApplication {
MyApplication::MyApplication() { MyApplication::MyApplication() {
// decide on layers, extensions, ... // decide on layers, extensions, ...
_instance.create(Vk::InstanceCreateInfo{DOXYGEN_IGNORE()} _instance.create(Vk::InstanceCreateInfo{DOXYGEN_ELLIPSIS()}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
); );
} }
/* [Instance-delayed-creation] */ /* [Instance-delayed-creation] */
@ -107,17 +107,17 @@ namespace B {
/* [Device-delayed-creation] */ /* [Device-delayed-creation] */
class MyApplication { class MyApplication {
public: public:
explicit MyApplication(DOXYGEN_IGNORE(Vk::Instance& instance)); explicit MyApplication(DOXYGEN_ELLIPSIS(Vk::Instance& instance));
private: private:
Vk::Device _device{NoCreate}; Vk::Device _device{NoCreate};
}; };
MyApplication::MyApplication(DOXYGEN_IGNORE(Vk::Instance& instance)) { MyApplication::MyApplication(DOXYGEN_ELLIPSIS(Vk::Instance& instance)) {
// decide on extensions, features, ... // decide on extensions, features, ...
_device.create(instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(Vk::pickDevice(instance))} _device.create(instance, Vk::DeviceCreateInfo{DOXYGEN_ELLIPSIS(Vk::pickDevice(instance))}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
); );
} }
/* [Device-delayed-creation] */ /* [Device-delayed-creation] */
@ -128,7 +128,7 @@ int main() {
{ {
/* [wrapping-extending-create-info] */ /* [wrapping-extending-create-info] */
Vk::InstanceCreateInfo info{DOXYGEN_IGNORE()}; Vk::InstanceCreateInfo info{DOXYGEN_ELLIPSIS()};
/* Add a custom validation features setup */ /* Add a custom validation features setup */
VkValidationFeaturesEXT validationFeatures{}; VkValidationFeaturesEXT validationFeatures{};
@ -146,8 +146,8 @@ using namespace Containers::Literals;
int argc{}; int argc{};
char** argv{}; char** argv{};
/* [wrapping-optimizing-properties-instance] */ /* [wrapping-optimizing-properties-instance] */
Vk::LayerProperties layers = DOXYGEN_IGNORE(Vk::enumerateLayerProperties()); Vk::LayerProperties layers = DOXYGEN_ELLIPSIS(Vk::enumerateLayerProperties());
Vk::InstanceExtensionProperties extensions = DOXYGEN_IGNORE(Vk::enumerateInstanceExtensionProperties(layers.names())); Vk::InstanceExtensionProperties extensions = DOXYGEN_ELLIPSIS(Vk::enumerateInstanceExtensionProperties(layers.names()));
/* Pass the layer and extension properties for use by InstanceCreateInfo */ /* Pass the layer and extension properties for use by InstanceCreateInfo */
Vk::InstanceCreateInfo info{argc, argv, &layers, &extensions}; Vk::InstanceCreateInfo info{argc, argv, &layers, &extensions};
@ -155,7 +155,7 @@ if(layers.isSupported("VK_LAYER_KHRONOS_validation"_s))
info.addEnabledLayers({"VK_LAYER_KHRONOS_validation"_s}); info.addEnabledLayers({"VK_LAYER_KHRONOS_validation"_s});
if(extensions.isSupported<Vk::Extensions::EXT::debug_report>()) if(extensions.isSupported<Vk::Extensions::EXT::debug_report>())
info.addEnabledExtensions<Vk::Extensions::EXT::debug_report>(); info.addEnabledExtensions<Vk::Extensions::EXT::debug_report>();
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Instance instance{info}; Vk::Instance instance{info};
/* [wrapping-optimizing-properties-instance] */ /* [wrapping-optimizing-properties-instance] */
@ -166,8 +166,8 @@ Vk::Instance instance{NoCreate};
Vk::Queue queue{NoCreate}; Vk::Queue queue{NoCreate};
/* [wrapping-optimizing-properties-device-single-expression] */ /* [wrapping-optimizing-properties-device-single-expression] */
Vk::Device device{instance, Vk::DeviceCreateInfo{Vk::pickDevice(instance)} Vk::Device device{instance, Vk::DeviceCreateInfo{Vk::pickDevice(instance)}
.addQueues(DOXYGEN_IGNORE(Vk::QueueFlag::Graphics, {0.0f}, {queue})) .addQueues(DOXYGEN_ELLIPSIS(Vk::QueueFlag::Graphics, {0.0f}, {queue}))
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}; };
/* [wrapping-optimizing-properties-device-single-expression] */ /* [wrapping-optimizing-properties-device-single-expression] */
} }
@ -186,7 +186,7 @@ if(extensions.isSupported<Vk::Extensions::EXT::index_type_uint8>())
info.addEnabledExtensions<Vk::Extensions::EXT::index_type_uint8>(); info.addEnabledExtensions<Vk::Extensions::EXT::index_type_uint8>();
if(extensions.isSupported("VK_NV_mesh_shader"_s)) if(extensions.isSupported("VK_NV_mesh_shader"_s))
info.addEnabledExtensions({"VK_NV_mesh_shader"_s}); info.addEnabledExtensions({"VK_NV_mesh_shader"_s});
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
/* Finally, be sure to move the info structure to the device as well */ /* Finally, be sure to move the info structure to the device as well */
Vk::Device device{instance, std::move(info)}; Vk::Device device{instance, std::move(info)};
@ -214,7 +214,7 @@ Vk::Device device{NoCreate};
/* [Buffer-creation] */ /* [Buffer-creation] */
#include <Magnum/Vk/BufferCreateInfo.h> #include <Magnum/Vk/BufferCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Buffer buffer{device, Vk::Buffer buffer{device,
Vk::BufferCreateInfo{Vk::BufferUsage::VertexBuffer, 1024*1024}, Vk::BufferCreateInfo{Vk::BufferUsage::VertexBuffer, 1024*1024},
@ -247,10 +247,10 @@ Vk::Device device{NoCreate};
Vk::CommandBuffer cmd{NoCreate}; Vk::CommandBuffer cmd{NoCreate};
/* [Buffer-usage-fill] */ /* [Buffer-usage-fill] */
Vk::Buffer buffer{device, Vk::BufferCreateInfo{ Vk::Buffer buffer{device, Vk::BufferCreateInfo{
Vk::BufferUsage::TransferDestination|DOXYGEN_IGNORE(Vk::BufferUsage{}), DOXYGEN_IGNORE(0) Vk::BufferUsage::TransferDestination|DOXYGEN_ELLIPSIS(Vk::BufferUsage{}), DOXYGEN_ELLIPSIS(0)
}, DOXYGEN_IGNORE(Vk::MemoryFlag{})}; }, DOXYGEN_ELLIPSIS(Vk::MemoryFlag{})};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.fillBuffer(buffer, 0x00000000); cmd.fillBuffer(buffer, 0x00000000);
/* [Buffer-usage-fill] */ /* [Buffer-usage-fill] */
@ -268,7 +268,7 @@ Vk::Buffer vertices{device, Vk::BufferCreateInfo{
Vk::BufferUsage::TransferDestination|Vk::BufferUsage::VertexBuffer, size Vk::BufferUsage::TransferDestination|Vk::BufferUsage::VertexBuffer, size
}, Vk::MemoryFlag::DeviceLocal}; }, Vk::MemoryFlag::DeviceLocal};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.copyBuffer({input, vertices, { cmd.copyBuffer({input, vertices, {
{0, 0, size} /* Copy the whole buffer */ {0, 0, size} /* Copy the whole buffer */
@ -285,9 +285,9 @@ cmd.copyBuffer({input, vertices, {
/* [CommandPool-creation] */ /* [CommandPool-creation] */
#include <Magnum/Vk/CommandPoolCreateInfo.h> #include <Magnum/Vk/CommandPoolCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Device device{DOXYGEN_IGNORE(NoCreate)}; Vk::Device device{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::CommandPool commandPool{device, Vk::CommandPoolCreateInfo{ Vk::CommandPool commandPool{device, Vk::CommandPoolCreateInfo{
device.properties().pickQueueFamily(Vk::QueueFlag::Graphics) device.properties().pickQueueFamily(Vk::QueueFlag::Graphics)
@ -298,19 +298,19 @@ Vk::CommandPool commandPool{device, Vk::CommandPoolCreateInfo{
{ {
Vk::Device device{NoCreate}; Vk::Device device{NoCreate};
/* [CommandBuffer-allocation] */ /* [CommandBuffer-allocation] */
Vk::CommandPool commandPool{device, DOXYGEN_IGNORE(Vk::CommandPoolCreateInfo{0})}; Vk::CommandPool commandPool{device, DOXYGEN_ELLIPSIS(Vk::CommandPoolCreateInfo{0})};
Vk::CommandBuffer cmd = commandPool.allocate(); Vk::CommandBuffer cmd = commandPool.allocate();
/* [CommandBuffer-allocation] */ /* [CommandBuffer-allocation] */
/* [CommandBuffer-usage] */ /* [CommandBuffer-usage] */
cmd.begin() cmd.begin()
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.end(); .end();
/* [CommandBuffer-usage] */ /* [CommandBuffer-usage] */
/* [CommandBuffer-usage-submit] */ /* [CommandBuffer-usage-submit] */
Vk::Queue queue{DOXYGEN_IGNORE(NoCreate)}; Vk::Queue queue{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::Fence fence{device}; Vk::Fence fence{device};
queue.submit({Vk::SubmitInfo{}.setCommandBuffers({cmd})}, fence); queue.submit({Vk::SubmitInfo{}.setCommandBuffers({cmd})}, fence);
@ -324,7 +324,7 @@ Vk::Device device{NoCreate};
/* [DescriptorPool-creation] */ /* [DescriptorPool-creation] */
#include <Magnum/Vk/DescriptorPoolCreateInfo.h> #include <Magnum/Vk/DescriptorPoolCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::DescriptorPool pool{device, Vk::DescriptorPoolCreateInfo{8, { Vk::DescriptorPool pool{device, Vk::DescriptorPoolCreateInfo{8, {
{Vk::DescriptorType::UniformBuffer, 24}, {Vk::DescriptorType::UniformBuffer, 24},
@ -335,8 +335,8 @@ Vk::DescriptorPool pool{device, Vk::DescriptorPoolCreateInfo{8, {
{ {
/* [DescriptorSet-allocation] */ /* [DescriptorSet-allocation] */
Vk::DescriptorSetLayout layout{DOXYGEN_IGNORE(NoCreate)}; Vk::DescriptorSetLayout layout{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::DescriptorPool pool{DOXYGEN_IGNORE(NoCreate)}; Vk::DescriptorPool pool{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::DescriptorSet set = pool.allocate(layout); Vk::DescriptorSet set = pool.allocate(layout);
/* [DescriptorSet-allocation] */ /* [DescriptorSet-allocation] */
@ -357,8 +357,8 @@ if(!set) set = overflowPool.allocate(layout);
Vk::Device device{NoCreate}; Vk::Device device{NoCreate};
Vk::DescriptorSetLayout layout{NoCreate}; Vk::DescriptorSetLayout layout{NoCreate};
/* [DescriptorSet-allocation-free] */ /* [DescriptorSet-allocation-free] */
Vk::DescriptorPool pool{device, Vk::DescriptorPoolCreateInfo{DOXYGEN_IGNORE(0), { Vk::DescriptorPool pool{device, Vk::DescriptorPoolCreateInfo{DOXYGEN_ELLIPSIS(0), {
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}, Vk::DescriptorPoolCreateInfo::Flag::FreeDescriptorSet}}; }, Vk::DescriptorPoolCreateInfo::Flag::FreeDescriptorSet}};
{ {
@ -373,20 +373,20 @@ Vk::DescriptorPool pool{device, Vk::DescriptorPoolCreateInfo{DOXYGEN_IGNORE(0),
Vk::Instance instance{NoCreate}; Vk::Instance instance{NoCreate};
Vk::DescriptorPool pool{NoCreate}; Vk::DescriptorPool pool{NoCreate};
/* [DescriptorSet-allocation-variable] */ /* [DescriptorSet-allocation-variable] */
Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(Vk::pickDevice(instance))} Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_ELLIPSIS(Vk::pickDevice(instance))}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.addEnabledExtensions<Vk::Extensions::EXT::descriptor_indexing>() .addEnabledExtensions<Vk::Extensions::EXT::descriptor_indexing>()
.setEnabledFeatures( .setEnabledFeatures(
Vk::DeviceFeature::DescriptorBindingVariableDescriptorCount| Vk::DeviceFeature::DescriptorBindingVariableDescriptorCount|
DOXYGEN_IGNORE(Vk::DeviceFeatures{}) DOXYGEN_ELLIPSIS(Vk::DeviceFeatures{})
) )
}; };
Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{ Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{
{{DOXYGEN_IGNORE(0), Vk::DescriptorType::SampledImage, 8, {{DOXYGEN_ELLIPSIS(0), Vk::DescriptorType::SampledImage, 8,
Vk::ShaderStage::Fragment, Vk::ShaderStage::Fragment,
Vk::DescriptorSetLayoutBinding::Flag::VariableDescriptorCount}}, Vk::DescriptorSetLayoutBinding::Flag::VariableDescriptorCount}},
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}}; }};
Vk::DescriptorSet set = pool.allocate(layout, 4); Vk::DescriptorSet set = pool.allocate(layout, 4);
@ -399,7 +399,7 @@ Vk::Device device{NoCreate};
/* [DescriptorSetLayout-creation] */ /* [DescriptorSetLayout-creation] */
#include <Magnum/Vk/DescriptorSetLayoutCreateInfo.h> #include <Magnum/Vk/DescriptorSetLayoutCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{ Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{
{{0, Vk::DescriptorType::UniformBuffer}}, {{0, Vk::DescriptorType::UniformBuffer}},
@ -412,7 +412,7 @@ Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{
{ {
Vk::Device device{NoCreate}; Vk::Device device{NoCreate};
/* [DescriptorSetLayout-creation-immutable-samplers] */ /* [DescriptorSetLayout-creation-immutable-samplers] */
Vk::Sampler sampler{DOXYGEN_IGNORE(NoCreate)}; Vk::Sampler sampler{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{ Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{
{{0, Vk::DescriptorType::UniformBuffer}}, {{0, Vk::DescriptorType::UniformBuffer}},
@ -425,12 +425,12 @@ Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{
{ {
Vk::Instance instance{NoCreate}; Vk::Instance instance{NoCreate};
/* [DescriptorSetLayout-creation-binding-flags] */ /* [DescriptorSetLayout-creation-binding-flags] */
Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(Vk::pickDevice(instance))} Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_ELLIPSIS(Vk::pickDevice(instance))}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.addEnabledExtensions<Vk::Extensions::EXT::descriptor_indexing>() .addEnabledExtensions<Vk::Extensions::EXT::descriptor_indexing>()
.setEnabledFeatures( .setEnabledFeatures(
Vk::DeviceFeature::DescriptorBindingUniformBufferUpdateAfterBind| Vk::DeviceFeature::DescriptorBindingUniformBufferUpdateAfterBind|
DOXYGEN_IGNORE(Vk::DeviceFeatures{}) DOXYGEN_ELLIPSIS(Vk::DeviceFeatures{})
) )
}; };
@ -438,7 +438,7 @@ Vk::DescriptorSetLayout layout{device, Vk::DescriptorSetLayoutCreateInfo{
{{0, Vk::DescriptorType::UniformBuffer, 1, {{0, Vk::DescriptorType::UniformBuffer, 1,
~Vk::ShaderStages{}, ~Vk::ShaderStages{},
Vk::DescriptorSetLayoutBinding::Flag::UpdateAfterBind}}, Vk::DescriptorSetLayoutBinding::Flag::UpdateAfterBind}},
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}}; }};
/* [DescriptorSetLayout-creation-binding-flags] */ /* [DescriptorSetLayout-creation-binding-flags] */
} }
@ -449,7 +449,7 @@ Vk::Instance instance;
/* [Device-creation-construct-queue] */ /* [Device-creation-construct-queue] */
#include <Magnum/Vk/DeviceCreateInfo.h> #include <Magnum/Vk/DeviceCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Queue queue{NoCreate}; Vk::Queue queue{NoCreate};
Vk::Device device{instance, Vk::DeviceCreateInfo{Vk::pickDevice(instance)} Vk::Device device{instance, Vk::DeviceCreateInfo{Vk::pickDevice(instance)}
@ -463,8 +463,8 @@ Vk::Instance instance;
Vk::DeviceProperties properties{NoCreate}; Vk::DeviceProperties properties{NoCreate};
using namespace Containers::Literals; using namespace Containers::Literals;
/* [Device-creation-extensions] */ /* [Device-creation-extensions] */
Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(properties)} Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_ELLIPSIS(properties)}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.addEnabledExtensions< // predefined extensions .addEnabledExtensions< // predefined extensions
Vk::Extensions::EXT::index_type_uint8, Vk::Extensions::EXT::index_type_uint8,
Vk::Extensions::KHR::device_group>() Vk::Extensions::KHR::device_group>()
@ -478,13 +478,13 @@ Vk::Instance instance;
Vk::DeviceProperties properties{NoCreate}; Vk::DeviceProperties properties{NoCreate};
using namespace Containers::Literals; using namespace Containers::Literals;
/* [Device-creation-features] */ /* [Device-creation-features] */
Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_IGNORE(properties)} Vk::Device device{instance, Vk::DeviceCreateInfo{DOXYGEN_ELLIPSIS(properties)}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.setEnabledFeatures( .setEnabledFeatures(
Vk::DeviceFeature::IndexTypeUnsignedByte| Vk::DeviceFeature::IndexTypeUnsignedByte|
Vk::DeviceFeature::SamplerAnisotropy| Vk::DeviceFeature::SamplerAnisotropy|
Vk::DeviceFeature::GeometryShader| Vk::DeviceFeature::GeometryShader|
DOXYGEN_IGNORE(Vk::DeviceFeature{})) DOXYGEN_ELLIPSIS(Vk::DeviceFeature{}))
}; };
/* [Device-creation-features] */ /* [Device-creation-features] */
} }
@ -501,26 +501,26 @@ if(extensions.isSupported<Vk::Extensions::EXT::index_type_uint8>())
info.addEnabledExtensions<Vk::Extensions::EXT::index_type_uint8>(); info.addEnabledExtensions<Vk::Extensions::EXT::index_type_uint8>();
if(extensions.isSupported("VK_NV_mesh_shader"_s)) if(extensions.isSupported("VK_NV_mesh_shader"_s))
info.addEnabledExtensions({"VK_NV_mesh_shader"_s}); info.addEnabledExtensions({"VK_NV_mesh_shader"_s});
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
info.setEnabledFeatures(properties.features() & // mask away unsupported ones info.setEnabledFeatures(properties.features() & // mask away unsupported ones
(Vk::DeviceFeature::IndexTypeUnsignedByte| (Vk::DeviceFeature::IndexTypeUnsignedByte|
Vk::DeviceFeature::SamplerAnisotropy| Vk::DeviceFeature::SamplerAnisotropy|
Vk::DeviceFeature::GeometryShader| Vk::DeviceFeature::GeometryShader|
DOXYGEN_IGNORE(Vk::DeviceFeature{}))); DOXYGEN_ELLIPSIS(Vk::DeviceFeature{})));
/* [Device-creation-check-supported] */ /* [Device-creation-check-supported] */
} }
{ {
Vk::Instance instance; Vk::Instance instance;
/* [Device-creation-portability-subset] */ /* [Device-creation-portability-subset] */
Vk::DeviceProperties properties = DOXYGEN_IGNORE(Vk::pickDevice(instance)); Vk::DeviceProperties properties = DOXYGEN_ELLIPSIS(Vk::pickDevice(instance));
Vk::Device device{instance, Vk::DeviceCreateInfo{properties} Vk::Device device{instance, Vk::DeviceCreateInfo{properties}
/* enable triangle fans only if actually supported */ /* enable triangle fans only if actually supported */
.setEnabledFeatures(properties.features() & Vk::DeviceFeature::TriangleFans) .setEnabledFeatures(properties.features() & Vk::DeviceFeature::TriangleFans)
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}; };
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
if(device.enabledFeatures() & Vk::DeviceFeature::TriangleFans) { if(device.enabledFeatures() & Vk::DeviceFeature::TriangleFans) {
// draw a triangle fan mesh // draw a triangle fan mesh
@ -534,10 +534,10 @@ if(device.enabledFeatures() & Vk::DeviceFeature::TriangleFans) {
Vk::Instance instance; Vk::Instance instance;
VkQueryPool pool{}; VkQueryPool pool{};
/* [Device-function-pointers] */ /* [Device-function-pointers] */
Vk::Device device{DOXYGEN_IGNORE(NoCreate)}; Vk::Device device{DOXYGEN_ELLIPSIS(NoCreate)};
// ... // ...
device->ResetQueryPoolEXT(device, DOXYGEN_IGNORE(pool, 0, 0)); device->ResetQueryPoolEXT(device, DOXYGEN_ELLIPSIS(pool, 0, 0));
/* [Device-function-pointers] */ /* [Device-function-pointers] */
} }
@ -547,13 +547,13 @@ VkQueryPool pool{};
/* [Device-global-function-pointers] */ /* [Device-global-function-pointers] */
#include <MagnumExternal/Vulkan/flextVkGlobal.h> #include <MagnumExternal/Vulkan/flextVkGlobal.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Device device{DOXYGEN_IGNORE(NoCreate)}; Vk::Device device{DOXYGEN_ELLIPSIS(NoCreate)};
device.populateGlobalFunctionPointers(); device.populateGlobalFunctionPointers();
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
vkResetQueryPoolEXT(device, DOXYGEN_IGNORE(pool, 0, 0)); vkResetQueryPoolEXT(device, DOXYGEN_ELLIPSIS(pool, 0, 0));
/* [Device-global-function-pointers] */ /* [Device-global-function-pointers] */
} }
@ -569,41 +569,41 @@ if(device.isExtensionEnabled<Vk::Extensions::EXT::index_type_uint8>()) {
} }
{ {
Vk::Device device{DOXYGEN_IGNORE(NoCreate)}; Vk::Device device{DOXYGEN_ELLIPSIS(NoCreate)};
/* The include should be a no-op here since it was already included above */ /* The include should be a no-op here since it was already included above */
/* [Fence-creation] */ /* [Fence-creation] */
#include <Magnum/Vk/FenceCreateInfo.h> #include <Magnum/Vk/FenceCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Fence fence{device, Vk::FenceCreateInfo{Vk::FenceCreateInfo::Flag::Signaled}}; Vk::Fence fence{device, Vk::FenceCreateInfo{Vk::FenceCreateInfo::Flag::Signaled}};
/* [Fence-creation] */ /* [Fence-creation] */
} }
{ {
Vk::Device device{DOXYGEN_IGNORE(NoCreate)}; Vk::Device device{DOXYGEN_ELLIPSIS(NoCreate)};
Vector2i size; Vector2i size;
/* The include should be a no-op here since it was already included above */ /* The include should be a no-op here since it was already included above */
/* [Framebuffer-creation] */ /* [Framebuffer-creation] */
#include <Magnum/Vk/FramebufferCreateInfo.h> #include <Magnum/Vk/FramebufferCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Image color{device, Vk::ImageCreateInfo2D{ /* created before */ Vk::Image color{device, Vk::ImageCreateInfo2D{ /* created before */
Vk::ImageUsage::ColorAttachment, Vk::ImageUsage::ColorAttachment,
Vk::PixelFormat::RGBA8Unorm, size, 1}, DOXYGEN_IGNORE(NoAllocate)}; Vk::PixelFormat::RGBA8Unorm, size, 1}, DOXYGEN_ELLIPSIS(NoAllocate)};
Vk::Image depth{device, Vk::ImageCreateInfo2D{ Vk::Image depth{device, Vk::ImageCreateInfo2D{
Vk::ImageUsage::DepthStencilAttachment, Vk::ImageUsage::DepthStencilAttachment,
Vk::PixelFormat::Depth24UnormStencil8UI, size, 1}, DOXYGEN_IGNORE(NoAllocate)}; Vk::PixelFormat::Depth24UnormStencil8UI, size, 1}, DOXYGEN_ELLIPSIS(NoAllocate)};
Vk::ImageView colorView{device, Vk::ImageViewCreateInfo2D{color}}; Vk::ImageView colorView{device, Vk::ImageViewCreateInfo2D{color}};
Vk::ImageView depthView{device, Vk::ImageViewCreateInfo2D{depth}}; Vk::ImageView depthView{device, Vk::ImageViewCreateInfo2D{depth}};
Vk::RenderPass renderPass{device, Vk::RenderPassCreateInfo{} /* created before */ Vk::RenderPass renderPass{device, Vk::RenderPassCreateInfo{} /* created before */
.setAttachments({ .setAttachments({
Vk::AttachmentDescription{color.format(), DOXYGEN_IGNORE({}, {}, {}, {})}, Vk::AttachmentDescription{color.format(), DOXYGEN_ELLIPSIS({}, {}, {}, {})},
Vk::AttachmentDescription{depth.format(), DOXYGEN_IGNORE({}, {}, {}, {})}, Vk::AttachmentDescription{depth.format(), DOXYGEN_ELLIPSIS({}, {}, {}, {})},
}) })
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}; };
Vk::Framebuffer framebuffer{device, Vk::FramebufferCreateInfo{renderPass, { Vk::Framebuffer framebuffer{device, Vk::FramebufferCreateInfo{renderPass, {
@ -619,7 +619,7 @@ Vk::Device device{NoCreate};
/* [Image-creation] */ /* [Image-creation] */
#include <Magnum/Vk/ImageCreateInfo.h> #include <Magnum/Vk/ImageCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Image image{device, Vk::ImageCreateInfo2D{ Vk::Image image{device, Vk::ImageCreateInfo2D{
Vk::ImageUsage::Sampled, PixelFormat::RGBA8Srgb, {1024, 1024}, 1 Vk::ImageUsage::Sampled, PixelFormat::RGBA8Srgb, {1024, 1024}, 1
@ -650,10 +650,10 @@ Vk::Device device{NoCreate};
Vk::CommandBuffer cmd{NoCreate}; Vk::CommandBuffer cmd{NoCreate};
/* [Image-usage-clear] */ /* [Image-usage-clear] */
Vk::Image image{device, Vk::ImageCreateInfo2D{ Vk::Image image{device, Vk::ImageCreateInfo2D{
Vk::ImageUsage::TransferDestination|DOXYGEN_IGNORE(Vk::ImageUsage{}), Vk::PixelFormat::RGBA8Srgb, DOXYGEN_IGNORE({}, 1) Vk::ImageUsage::TransferDestination|DOXYGEN_ELLIPSIS(Vk::ImageUsage{}), Vk::PixelFormat::RGBA8Srgb, DOXYGEN_ELLIPSIS({}, 1)
}, DOXYGEN_IGNORE(Vk::MemoryFlag{})}; }, DOXYGEN_ELLIPSIS(Vk::MemoryFlag{})};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.pipelineBarrier(Vk::PipelineStage::TopOfPipe, Vk::PipelineStage::Transfer, { cmd.pipelineBarrier(Vk::PipelineStage::TopOfPipe, Vk::PipelineStage::Transfer, {
/* Transition the image to a layout required by the clear operation */ /* Transition the image to a layout required by the clear operation */
@ -669,14 +669,14 @@ Vk::Device device{NoCreate};
Vk::CommandBuffer cmd{NoCreate}; Vk::CommandBuffer cmd{NoCreate};
/* [Image-usage-copy-from-buffer] */ /* [Image-usage-copy-from-buffer] */
Vk::Buffer input{device, Vk::BufferCreateInfo{ Vk::Buffer input{device, Vk::BufferCreateInfo{
Vk::BufferUsage::TransferSource, 256*256*4 DOXYGEN_IGNORE() Vk::BufferUsage::TransferSource, 256*256*4 DOXYGEN_ELLIPSIS()
}, Vk::MemoryFlag::HostVisible}; }, Vk::MemoryFlag::HostVisible};
Vk::Image texture{device, Vk::ImageCreateInfo2D{ Vk::Image texture{device, Vk::ImageCreateInfo2D{
Vk::ImageUsage::TransferDestination|Vk::ImageUsage::Sampled, Vk::ImageUsage::TransferDestination|Vk::ImageUsage::Sampled,
Vk::PixelFormat::RGBA8Srgb, {256, 256}, DOXYGEN_IGNORE(1) Vk::PixelFormat::RGBA8Srgb, {256, 256}, DOXYGEN_ELLIPSIS(1)
}, Vk::MemoryFlag::DeviceLocal}; }, Vk::MemoryFlag::DeviceLocal};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.pipelineBarrier(Vk::PipelineStage::TopOfPipe, Vk::PipelineStage::Transfer, { cmd.pipelineBarrier(Vk::PipelineStage::TopOfPipe, Vk::PipelineStage::Transfer, {
/* Transition the image to a layout required by the copy operation */ /* Transition the image to a layout required by the copy operation */
@ -701,7 +701,7 @@ cmd.copyBufferToImage(Vk::CopyBufferToImageInfo2D{
{ 0, Vk::ImageAspect::Color, 0, {{}, {256, 256}}}, { 0, Vk::ImageAspect::Color, 0, {{}, {256, 256}}},
{262144, Vk::ImageAspect::Color, 1, {{}, {128, 128}}}, {262144, Vk::ImageAspect::Color, 1, {{}, {128, 128}}},
{327680, Vk::ImageAspect::Color, 2, {{}, { 64, 64}}}, {327680, Vk::ImageAspect::Color, 2, {{}, { 64, 64}}},
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
} }
}); });
/* [Image-usage-copy-from-buffer-multiple] */ /* [Image-usage-copy-from-buffer-multiple] */
@ -712,19 +712,19 @@ Vk::Device device{NoCreate};
Vk::CommandBuffer cmd{NoCreate}; Vk::CommandBuffer cmd{NoCreate};
/* [Image-usage-copy-from-image] */ /* [Image-usage-copy-from-image] */
Vk::Image a{device, Vk::ImageCreateInfo2D{ Vk::Image a{device, Vk::ImageCreateInfo2D{
Vk::ImageUsage::TransferSource|DOXYGEN_IGNORE(Vk::ImageUsage{}), Vk::ImageUsage::TransferSource|DOXYGEN_ELLIPSIS(Vk::ImageUsage{}),
Vk::PixelFormat::RGBA8Srgb, {256, 256}, DOXYGEN_IGNORE(1) Vk::PixelFormat::RGBA8Srgb, {256, 256}, DOXYGEN_ELLIPSIS(1)
}, DOXYGEN_IGNORE({})}; }, DOXYGEN_ELLIPSIS({})};
Vk::Image b{device, Vk::ImageCreateInfo2D{ Vk::Image b{device, Vk::ImageCreateInfo2D{
Vk::ImageUsage::TransferDestination|DOXYGEN_IGNORE(Vk::ImageUsage{}), Vk::PixelFormat::RGBA8Srgb, {256, 256}, DOXYGEN_IGNORE(1) Vk::ImageUsage::TransferDestination|DOXYGEN_ELLIPSIS(Vk::ImageUsage{}), Vk::PixelFormat::RGBA8Srgb, {256, 256}, DOXYGEN_ELLIPSIS(1)
}, DOXYGEN_IGNORE({})}; }, DOXYGEN_ELLIPSIS({})};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.pipelineBarrier(Vk::PipelineStage::TopOfPipe, Vk::PipelineStage::Transfer, { cmd.pipelineBarrier(Vk::PipelineStage::TopOfPipe, Vk::PipelineStage::Transfer, {
/* Transfer both images to a layout required by the copy operation */ /* Transfer both images to a layout required by the copy operation */
{Vk::Accesses{}, Vk::Access::TransferRead, {Vk::Accesses{}, Vk::Access::TransferRead,
Vk::ImageLayout::DOXYGEN_IGNORE(Undefined), Vk::ImageLayout::TransferSource, a}, Vk::ImageLayout::DOXYGEN_ELLIPSIS(Undefined), Vk::ImageLayout::TransferSource, a},
{Vk::Accesses{}, Vk::Access::TransferWrite, {Vk::Accesses{}, Vk::Access::TransferWrite,
Vk::ImageLayout::Undefined, Vk::ImageLayout::TransferDestination, b} Vk::ImageLayout::Undefined, Vk::ImageLayout::TransferDestination, b}
}) })
@ -742,11 +742,11 @@ Vk::Device device{NoCreate};
/* [ImageView-creation] */ /* [ImageView-creation] */
#include <Magnum/Vk/ImageViewCreateInfo.h> #include <Magnum/Vk/ImageViewCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Image image{device, Vk::ImageCreateInfo2DArray{ /* created before */ Vk::Image image{device, Vk::ImageCreateInfo2DArray{ /* created before */
DOXYGEN_IGNORE(Vk::ImageUsage{}, PixelFormat{}, {}, 1) DOXYGEN_ELLIPSIS(Vk::ImageUsage{}, PixelFormat{}, {}, 1)
}, DOXYGEN_IGNORE(Vk::MemoryFlag{})}; }, DOXYGEN_ELLIPSIS(Vk::MemoryFlag{})};
Vk::ImageView view{device, Vk::ImageViewCreateInfo2DArray{image}}; Vk::ImageView view{device, Vk::ImageViewCreateInfo2DArray{image}};
/* [ImageView-creation] */ /* [ImageView-creation] */
@ -759,7 +759,7 @@ const char** argv{};
/* [Instance-creation-minimal] */ /* [Instance-creation-minimal] */
#include <Magnum/Vk/InstanceCreateInfo.h> #include <Magnum/Vk/InstanceCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Instance instance{{argc, argv}}; Vk::Instance instance{{argc, argv}};
/* [Instance-creation-minimal] */ /* [Instance-creation-minimal] */
@ -783,7 +783,7 @@ const char** argv{};
using namespace Containers::Literals; using namespace Containers::Literals;
/* [Instance-creation-layers-extensions] */ /* [Instance-creation-layers-extensions] */
Vk::Instance instance{Vk::InstanceCreateInfo{argc, argv} Vk::Instance instance{Vk::InstanceCreateInfo{argc, argv}
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.addEnabledLayers({"VK_LAYER_KHRONOS_validation"_s}) .addEnabledLayers({"VK_LAYER_KHRONOS_validation"_s})
.addEnabledExtensions< // predefined extensions .addEnabledExtensions< // predefined extensions
Vk::Extensions::EXT::debug_report, Vk::Extensions::EXT::debug_report,
@ -810,7 +810,7 @@ if(layers.isSupported("VK_LAYER_KHRONOS_validation"_s))
info.addEnabledLayers({"VK_LAYER_KHRONOS_validation"_s}); info.addEnabledLayers({"VK_LAYER_KHRONOS_validation"_s});
if(extensions.isSupported<Vk::Extensions::EXT::debug_report>()) if(extensions.isSupported<Vk::Extensions::EXT::debug_report>())
info.addEnabledExtensions<Vk::Extensions::EXT::debug_report>(); info.addEnabledExtensions<Vk::Extensions::EXT::debug_report>();
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Instance instance{info}; Vk::Instance instance{info};
/* [Instance-creation-check-supported] */ /* [Instance-creation-check-supported] */
@ -818,7 +818,7 @@ Vk::Instance instance{info};
{ {
/* [Instance-function-pointers] */ /* [Instance-function-pointers] */
Vk::Instance instance{DOXYGEN_IGNORE()}; Vk::Instance instance{DOXYGEN_ELLIPSIS()};
VkPhysicalDeviceGroupPropertiesKHR properties[10]; VkPhysicalDeviceGroupPropertiesKHR properties[10];
UnsignedInt count = Containers::arraySize(properties); UnsignedInt count = Containers::arraySize(properties);
@ -832,7 +832,7 @@ Vk::Instance instance;
/* [Instance-global-function-pointers] */ /* [Instance-global-function-pointers] */
#include <MagnumExternal/Vulkan/flextVkGlobal.h> #include <MagnumExternal/Vulkan/flextVkGlobal.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
instance.populateGlobalFunctionPointers(); instance.populateGlobalFunctionPointers();
@ -862,7 +862,7 @@ Containers::ArrayView<const char> vertexData, indexData;
/* [Memory-allocation] */ /* [Memory-allocation] */
#include <Magnum/Vk/MemoryAllocateInfo.h> #include <Magnum/Vk/MemoryAllocateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
/* Create buffers without allocating them */ /* Create buffers without allocating them */
Vk::Buffer vertices{device, Vk::Buffer vertices{device,
@ -937,11 +937,11 @@ meshLayout
.addAttribute(TextureLocation, Binding, VertexFormat::Vector2, 3*sizeof(Float)) .addAttribute(TextureLocation, Binding, VertexFormat::Vector2, 3*sizeof(Float))
.addAttribute(NormalLocation, Binding, VertexFormat::Vector3, 5*sizeof(Float)); .addAttribute(NormalLocation, Binding, VertexFormat::Vector3, 5*sizeof(Float));
Vk::Buffer vertices{DOXYGEN_IGNORE(device), Vk::BufferCreateInfo{ Vk::Buffer vertices{DOXYGEN_ELLIPSIS(device), Vk::BufferCreateInfo{
Vk::BufferUsage::VertexBuffer, vertexCount*8*sizeof(Float) Vk::BufferUsage::VertexBuffer, vertexCount*8*sizeof(Float)
}, DOXYGEN_IGNORE(NoAllocate)}; }, DOXYGEN_ELLIPSIS(NoAllocate)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Mesh mesh{meshLayout}; Vk::Mesh mesh{meshLayout};
mesh.addVertexBuffer(Binding, vertices, 0) mesh.addVertexBuffer(Binding, vertices, 0)
@ -949,11 +949,11 @@ mesh.addVertexBuffer(Binding, vertices, 0)
/* [Mesh-populating] */ /* [Mesh-populating] */
/* [Mesh-populating-indexed] */ /* [Mesh-populating-indexed] */
Vk::Buffer indices{DOXYGEN_IGNORE(device), Vk::BufferCreateInfo{ Vk::Buffer indices{DOXYGEN_ELLIPSIS(device), Vk::BufferCreateInfo{
Vk::BufferUsage::IndexBuffer, indexCount*sizeof(UnsignedShort) Vk::BufferUsage::IndexBuffer, indexCount*sizeof(UnsignedShort)
}, DOXYGEN_IGNORE(NoAllocate)}; }, DOXYGEN_ELLIPSIS(NoAllocate)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
mesh.setIndexBuffer(indices, 0, MeshIndexType::UnsignedShort) mesh.setIndexBuffer(indices, 0, MeshIndexType::UnsignedShort)
.setCount(indexCount); .setCount(indexCount);
@ -963,19 +963,19 @@ mesh.setIndexBuffer(indices, 0, MeshIndexType::UnsignedShort)
{ {
Vk::Device device{NoCreate}; Vk::Device device{NoCreate};
/* [Mesh-populating-owned] */ /* [Mesh-populating-owned] */
Vk::Buffer buffer{DOXYGEN_IGNORE(device), Vk::BufferCreateInfo{ Vk::Buffer buffer{DOXYGEN_ELLIPSIS(device), Vk::BufferCreateInfo{
Vk::BufferUsage::VertexBuffer|Vk::BufferUsage::IndexBuffer, DOXYGEN_IGNORE(0) Vk::BufferUsage::VertexBuffer|Vk::BufferUsage::IndexBuffer, DOXYGEN_ELLIPSIS(0)
}, DOXYGEN_IGNORE(NoAllocate)}; }, DOXYGEN_ELLIPSIS(NoAllocate)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Mesh mesh{Vk::MeshLayout{MeshPrimitive::Triangles} Vk::Mesh mesh{Vk::MeshLayout{MeshPrimitive::Triangles}
.addBinding(DOXYGEN_IGNORE(0, 0)) .addBinding(DOXYGEN_ELLIPSIS(0, 0))
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}; };
mesh.addVertexBuffer(DOXYGEN_IGNORE(0), buffer, DOXYGEN_IGNORE(0)) mesh.addVertexBuffer(DOXYGEN_ELLIPSIS(0), buffer, DOXYGEN_ELLIPSIS(0))
.setIndexBuffer(std::move(buffer), DOXYGEN_IGNORE(0, MeshIndexType{})) .setIndexBuffer(std::move(buffer), DOXYGEN_ELLIPSIS(0, MeshIndexType{}))
.setCount(DOXYGEN_IGNORE(0)); .setCount(DOXYGEN_ELLIPSIS(0));
/* [Mesh-populating-owned] */ /* [Mesh-populating-owned] */
} }
@ -986,14 +986,14 @@ Vk::ShaderSet shaderSet;
Vk::PipelineLayout pipelineLayout{NoCreate}; Vk::PipelineLayout pipelineLayout{NoCreate};
Vk::RenderPass renderPass{NoCreate}; Vk::RenderPass renderPass{NoCreate};
/* [Mesh-drawing] */ /* [Mesh-drawing] */
Vk::Mesh mesh{DOXYGEN_IGNORE(Vk::MeshLayout{MeshPrimitive{}})}; Vk::Mesh mesh{DOXYGEN_ELLIPSIS(Vk::MeshLayout{MeshPrimitive{}})};
Vk::Pipeline pipeline{DOXYGEN_IGNORE(device), Vk::RasterizationPipelineCreateInfo{ Vk::Pipeline pipeline{DOXYGEN_ELLIPSIS(device), Vk::RasterizationPipelineCreateInfo{
DOXYGEN_IGNORE(shaderSet), mesh.layout(), DOXYGEN_IGNORE(pipelineLayout, renderPass, 0, 1) DOXYGEN_ELLIPSIS(shaderSet), mesh.layout(), DOXYGEN_ELLIPSIS(pipelineLayout, renderPass, 0, 1)
}DOXYGEN_IGNORE() }DOXYGEN_ELLIPSIS()
}; };
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.bindPipeline(pipeline) cmd.bindPipeline(pipeline)
.draw(mesh); .draw(mesh);
@ -1021,15 +1021,15 @@ dynamicMeshLayout
.addAttribute(TextureLocation, 1, VertexFormat::Vector2, 0) .addAttribute(TextureLocation, 1, VertexFormat::Vector2, 0)
.addAttribute(NormalLocation, 2, VertexFormat::Vector3, 0); .addAttribute(NormalLocation, 2, VertexFormat::Vector3, 0);
Vk::Pipeline pipeline{DOXYGEN_IGNORE(device), Vk::RasterizationPipelineCreateInfo{ Vk::Pipeline pipeline{DOXYGEN_ELLIPSIS(device), Vk::RasterizationPipelineCreateInfo{
DOXYGEN_IGNORE(shaderSet), dynamicMeshLayout, DOXYGEN_IGNORE(pipelineLayout, renderPass, 0, 1)} DOXYGEN_ELLIPSIS(shaderSet), dynamicMeshLayout, DOXYGEN_ELLIPSIS(pipelineLayout, renderPass, 0, 1)}
/* Enable dynamic primitive and stride */ /* Enable dynamic primitive and stride */
.setDynamicStates(Vk::DynamicRasterizationState::MeshPrimitive| .setDynamicStates(Vk::DynamicRasterizationState::MeshPrimitive|
Vk::DynamicRasterizationState::VertexInputBindingStride) Vk::DynamicRasterizationState::VertexInputBindingStride)
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
}; };
Vk::Buffer vertices{DOXYGEN_IGNORE(NoCreate)}; Vk::Buffer vertices{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::Mesh mesh{Vk::MeshLayout{MeshPrimitive::Triangles} /* Or TriangleStrip etc */ Vk::Mesh mesh{Vk::MeshLayout{MeshPrimitive::Triangles} /* Or TriangleStrip etc */
/* Concrete stride */ /* Concrete stride */
@ -1046,7 +1046,7 @@ Vk::Mesh mesh{Vk::MeshLayout{MeshPrimitive::Triangles} /* Or TriangleStrip etc *
mesh.addVertexBuffer(0, vertices, 0) mesh.addVertexBuffer(0, vertices, 0)
.addVertexBuffer(1, vertices, 3*sizeof(Float)) .addVertexBuffer(1, vertices, 3*sizeof(Float))
.addVertexBuffer(2, vertices, 5*sizeof(Float)) .addVertexBuffer(2, vertices, 5*sizeof(Float))
.setCount(DOXYGEN_IGNORE(0)); .setCount(DOXYGEN_ELLIPSIS(0));
cmd.bindPipeline(pipeline) cmd.bindPipeline(pipeline)
/* Updates the dynamic primitive and stride as needed by the mesh */ /* Updates the dynamic primitive and stride as needed by the mesh */
@ -1060,12 +1060,12 @@ Vk::Device device{NoCreate};
/* [Pipeline-creation-rasterization] */ /* [Pipeline-creation-rasterization] */
#include <Magnum/Vk/RasterizationPipelineCreateInfo.h> #include <Magnum/Vk/RasterizationPipelineCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::ShaderSet shaderSet{DOXYGEN_IGNORE()}; Vk::ShaderSet shaderSet{DOXYGEN_ELLIPSIS()};
Vk::MeshLayout meshLayout{DOXYGEN_IGNORE(MeshPrimitive{})}; Vk::MeshLayout meshLayout{DOXYGEN_ELLIPSIS(MeshPrimitive{})};
Vk::PipelineLayout pipelineLayout{DOXYGEN_IGNORE(NoCreate)}; Vk::PipelineLayout pipelineLayout{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::RenderPass renderPass{DOXYGEN_IGNORE(NoCreate)}; Vk::RenderPass renderPass{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::Pipeline pipeline{device, Vk::RasterizationPipelineCreateInfo{ Vk::Pipeline pipeline{device, Vk::RasterizationPipelineCreateInfo{
shaderSet, meshLayout, pipelineLayout, renderPass, 0, 1} shaderSet, meshLayout, pipelineLayout, renderPass, 0, 1}
@ -1080,10 +1080,10 @@ Vk::Device device{NoCreate};
/* [Pipeline-creation-compute] */ /* [Pipeline-creation-compute] */
#include <Magnum/Vk/ComputePipelineCreateInfo.h> #include <Magnum/Vk/ComputePipelineCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::ShaderSet shaderSet{DOXYGEN_IGNORE()}; Vk::ShaderSet shaderSet{DOXYGEN_ELLIPSIS()};
Vk::PipelineLayout pipelineLayout{DOXYGEN_IGNORE(NoCreate)}; Vk::PipelineLayout pipelineLayout{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::Pipeline pipeline{device, Vk::ComputePipelineCreateInfo{ Vk::Pipeline pipeline{device, Vk::ComputePipelineCreateInfo{
shaderSet, pipelineLayout shaderSet, pipelineLayout
@ -1094,9 +1094,9 @@ Vk::Pipeline pipeline{device, Vk::ComputePipelineCreateInfo{
{ {
Vk::CommandBuffer cmd{NoCreate}; Vk::CommandBuffer cmd{NoCreate};
/* [Pipeline-usage] */ /* [Pipeline-usage] */
Vk::Pipeline pipeline{DOXYGEN_IGNORE(NoCreate)}; Vk::Pipeline pipeline{DOXYGEN_ELLIPSIS(NoCreate)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
cmd.bindPipeline(pipeline); cmd.bindPipeline(pipeline);
/* [Pipeline-usage] */ /* [Pipeline-usage] */
@ -1108,14 +1108,14 @@ Vk::Device device{NoCreate};
/* [PipelineLayout-creation] */ /* [PipelineLayout-creation] */
#include <Magnum/Vk/PipelineLayoutCreateInfo.h> #include <Magnum/Vk/PipelineLayoutCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::DescriptorSetLayout layout1{DOXYGEN_IGNORE(NoCreate)}; Vk::DescriptorSetLayout layout1{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::DescriptorSetLayout layout2{DOXYGEN_IGNORE(NoCreate)}; Vk::DescriptorSetLayout layout2{DOXYGEN_ELLIPSIS(NoCreate)};
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::PipelineLayout{device, Vk::PipelineLayoutCreateInfo{ Vk::PipelineLayout{device, Vk::PipelineLayoutCreateInfo{
layout1, layout2, DOXYGEN_IGNORE(layout1) layout1, layout2, DOXYGEN_ELLIPSIS(layout1)
}}; }};
/* [PipelineLayout-creation] */ /* [PipelineLayout-creation] */
} }
@ -1126,7 +1126,7 @@ Vk::Device device{NoCreate};
/* [RenderPass-creation] */ /* [RenderPass-creation] */
#include <Magnum/Vk/RenderPassCreateInfo.h> #include <Magnum/Vk/RenderPassCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::RenderPass renderPass{device, Vk::RenderPassCreateInfo{} Vk::RenderPass renderPass{device, Vk::RenderPassCreateInfo{}
.setAttachments({ .setAttachments({
@ -1168,16 +1168,16 @@ Vk::RenderPass renderPass{device, Vk::RenderPassCreateInfo{}
Vk::Framebuffer framebuffer{NoCreate}; Vk::Framebuffer framebuffer{NoCreate};
/* [RenderPass-usage-begin] */ /* [RenderPass-usage-begin] */
Vk::CommandBuffer cmd = DOXYGEN_IGNORE(Vk::CommandBuffer{NoCreate}); Vk::CommandBuffer cmd = DOXYGEN_ELLIPSIS(Vk::CommandBuffer{NoCreate});
cmd.begin() cmd.begin()
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.beginRenderPass(Vk::RenderPassBeginInfo{renderPass, framebuffer} .beginRenderPass(Vk::RenderPassBeginInfo{renderPass, framebuffer}
.clearColor(0, 0x1f1f1f_srgbf) .clearColor(0, 0x1f1f1f_srgbf)
.clearDepthStencil(1, 1.0f, 0)) .clearDepthStencil(1, 1.0f, 0))
/* [RenderPass-usage-begin] */ /* [RenderPass-usage-begin] */
/* [RenderPass-usage-end] */ /* [RenderPass-usage-end] */
.endRenderPass() .endRenderPass()
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
.end(); .end();
/* [RenderPass-usage-end] */ /* [RenderPass-usage-end] */
} }
@ -1188,7 +1188,7 @@ Vk::Device device{NoCreate};
/* [Sampler-creation] */ /* [Sampler-creation] */
#include <Magnum/Vk/SamplerCreateInfo.h> #include <Magnum/Vk/SamplerCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Sampler sampler{device, Vk::SamplerCreateInfo{}}; Vk::Sampler sampler{device, Vk::SamplerCreateInfo{}};
/* [Sampler-creation] */ /* [Sampler-creation] */
@ -1211,13 +1211,13 @@ Vk::Device device{NoCreate};
/* [Shader-creation] */ /* [Shader-creation] */
#include <Magnum/Vk/ShaderCreateInfo.h> #include <Magnum/Vk/ShaderCreateInfo.h>
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::ShaderCreateInfo info{ Vk::ShaderCreateInfo info{
CORRADE_INTERNAL_ASSERT_EXPRESSION(Utility::Directory::read("shader.spv")) CORRADE_INTERNAL_ASSERT_EXPRESSION(Utility::Directory::read("shader.spv"))
}; };
DOXYGEN_IGNORE() DOXYGEN_ELLIPSIS()
Vk::Shader shader{device, info}; Vk::Shader shader{device, info};
/* [Shader-creation] */ /* [Shader-creation] */
@ -1225,7 +1225,7 @@ Vk::Shader shader{device, info};
{ {
/* [ShaderSet-usage] */ /* [ShaderSet-usage] */
Vk::Shader vert{DOXYGEN_IGNORE(NoCreate)}, frag{DOXYGEN_IGNORE(NoCreate)}; Vk::Shader vert{DOXYGEN_ELLIPSIS(NoCreate)}, frag{DOXYGEN_ELLIPSIS(NoCreate)};
using namespace Containers::Literals; using namespace Containers::Literals;
@ -1246,7 +1246,7 @@ set.addShader(Vk::ShaderStage::Fragment, frag, "main"_s, {
{ {
using namespace Containers::Literals; using namespace Containers::Literals;
/* [ShaderSet-usage-ownership-transfer] */ /* [ShaderSet-usage-ownership-transfer] */
Vk::Shader shader{DOXYGEN_IGNORE(NoCreate)}; Vk::Shader shader{DOXYGEN_ELLIPSIS(NoCreate)};
Vk::ShaderSet set; Vk::ShaderSet set;
set.addShader(Vk::ShaderStage::Vertex, shader, "vert"_s) set.addShader(Vk::ShaderStage::Vertex, shader, "vert"_s)

4
doc/snippets/debugtools-compareimage.cpp

@ -38,7 +38,7 @@
using namespace Magnum; using namespace Magnum;
#define DOXYGEN_IGNORE(...) __VA_ARGS__ #define DOXYGEN_ELLIPSIS(...) __VA_ARGS__
namespace { namespace {
@ -73,7 +73,7 @@ ProcessingTest::ProcessingTest() {
if(false) { if(false) {
/* [basic] */ /* [basic] */
Image2D actual{DOXYGEN_IGNORE(doProcessing())}, expected{DOXYGEN_IGNORE(loadExpectedImage())}; Image2D actual{DOXYGEN_ELLIPSIS(doProcessing())}, expected{DOXYGEN_ELLIPSIS(loadExpectedImage())};
CORRADE_COMPARE_AS(actual, expected, DebugTools::CompareImage); CORRADE_COMPARE_AS(actual, expected, DebugTools::CompareImage);
/* [basic] */ /* [basic] */
} }

Loading…
Cancel
Save