Browse Source

Don't define Texture3D on WebGL 1.0.

There's no matching extension (no OES_texture3D equivalent), moreover
constructing Texture3D doesn't even link (missing definitions).
pull/196/head
Vladimír Vondruš 9 years ago
parent
commit
c22d440e69
  1. 2
      src/Magnum/Magnum.h
  2. 2
      src/Magnum/Texture.h

2
src/Magnum/Magnum.h

@ -639,7 +639,9 @@ template<UnsignedInt> class Texture;
typedef Texture<1> Texture1D;
#endif
typedef Texture<2> Texture2D;
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
typedef Texture<3> Texture3D;
#endif
#ifndef MAGNUM_TARGET_GLES2
template<UnsignedInt> class TextureArray;

2
src/Magnum/Texture.h

@ -1279,6 +1279,7 @@ typedef Texture<1> Texture1D;
/** @brief Two-dimensional texture */
typedef Texture<2> Texture2D;
#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2))
/**
@brief Three-dimensional texture
@ -1286,6 +1287,7 @@ typedef Texture<2> Texture2D;
@requires_webgl20 3D textures are not available in WebGL 1.0.
*/
typedef Texture<3> Texture3D;
#endif
}

Loading…
Cancel
Save