mirror of https://github.com/mosra/magnum.git
Browse Source
Advantages:
* The enums were large (600-800 lines) and they polluted the header,
now they are in separate files (except for BufferTexture, which has
the enum small enough to be left in the same file).
* Image classes now don't need to include OpenGL headers, as they were
needed only for the enum values. With advantage of C++11's forward
enum declarations there is no need to include the enum headers
anywhere in implementation, only when particular values are needed.
* The values are now less verbose:
AbstractTexture::InternalFormat::RGB8 // before
TextureFormat::RGB8 // now
* Resolved another "trivial choice" problem (thanks @JanDupal for
introducing this term to me): how to specify the format if there are
ten ways to do it (some being massively confusing):
Image2D::Format f = AbstractImage::Format::RGB; // too long...
Image2D::Format f = Image3D::Format::RGBA; // why 3D? this works?
Image2D::Format f = BufferImage1D::Format::RGBA; // wat?
It is even worse (and more verbose) with textures:
Texture2D::InternalFormat f =
CubeMapTextureArray::InternalFormat::RGB8; // this is allowed?
To have consistent naming this change was done also with
BufferTexture::InternalFormat (now BufferTextureFormat), although there
were no trivial choice issues and the enum isn't too large. But at least
it is now less typing.
pull/278/head
30 changed files with 2229 additions and 2131 deletions
@ -0,0 +1,128 @@ |
|||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013 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 "ImageFormat.h" |
||||||
|
|
||||||
|
#include <Utility/Debug.h> |
||||||
|
|
||||||
|
namespace Magnum { |
||||||
|
|
||||||
|
#ifndef DOXYGEN_GENERATING_OUTPUT |
||||||
|
Debug operator<<(Debug debug, ImageFormat value) { |
||||||
|
switch(value) { |
||||||
|
#define _c(value) case ImageFormat::value: return debug << "ImageFormat::" #value; |
||||||
|
_c(Red) |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(Green) |
||||||
|
_c(Blue) |
||||||
|
#endif |
||||||
|
_c(RG) |
||||||
|
_c(RGB) |
||||||
|
_c(RGBA) |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(BGR) |
||||||
|
#endif |
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
_c(BGRA) |
||||||
|
#endif |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
_c(RedInteger) |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(GreenInteger) |
||||||
|
_c(BlueInteger) |
||||||
|
#endif |
||||||
|
_c(RGInteger) |
||||||
|
_c(RGBInteger) |
||||||
|
_c(RGBAInteger) |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(BGRInteger) |
||||||
|
_c(BGRAInteger) |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
_c(DepthComponent) |
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
_c(StencilIndex) |
||||||
|
#endif |
||||||
|
_c(DepthStencil) |
||||||
|
#undef _c |
||||||
|
} |
||||||
|
|
||||||
|
return debug << "ImageFormat::(invalid)"; |
||||||
|
} |
||||||
|
|
||||||
|
Debug operator<<(Debug debug, ImageType value) { |
||||||
|
switch(value) { |
||||||
|
#define _c(value) case ImageType::value: return debug << "ImageType::" #value; |
||||||
|
_c(UnsignedByte) |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
_c(Byte) |
||||||
|
#endif |
||||||
|
_c(UnsignedShort) |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
_c(Short) |
||||||
|
#endif |
||||||
|
_c(UnsignedInt) |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
_c(Int) |
||||||
|
#endif |
||||||
|
_c(HalfFloat) |
||||||
|
_c(Float) |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(UnsignedByte332) |
||||||
|
_c(UnsignedByte233Rev) |
||||||
|
#endif |
||||||
|
_c(UnsignedShort565) |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(UnsignedShort565Rev) |
||||||
|
#endif |
||||||
|
_c(UnsignedShort4444) |
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
_c(UnsignedShort4444Rev) |
||||||
|
#endif |
||||||
|
_c(UnsignedShort5551) |
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
_c(UnsignedShort1555Rev) |
||||||
|
#endif |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
_c(UnsignedInt8888) |
||||||
|
_c(UnsignedInt8888Rev) |
||||||
|
_c(UnsignedInt1010102) |
||||||
|
#endif |
||||||
|
_c(UnsignedInt2101010Rev) |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
_c(UnsignedInt10F11F11FRev) |
||||||
|
_c(UnsignedInt5999Rev) |
||||||
|
#endif |
||||||
|
_c(UnsignedInt248) |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
_c(Float32UnsignedInt248Rev) |
||||||
|
#endif |
||||||
|
#undef _c |
||||||
|
} |
||||||
|
|
||||||
|
return debug << "ImageType::(invalid)"; |
||||||
|
} |
||||||
|
#endif |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,454 @@ |
|||||||
|
#ifndef Magnum_ImageFormat_h |
||||||
|
#define Magnum_ImageFormat_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013 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. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Enum Magnum::ImageFormat, Magnum::ImageType |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "Magnum.h" |
||||||
|
#include "OpenGL.h" |
||||||
|
#include "magnumVisibility.h" |
||||||
|
|
||||||
|
namespace Magnum { |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Format of image data |
||||||
|
|
||||||
|
Note that some formats can be used only for framebuffer reading (using |
||||||
|
AbstractFramebuffer::read()) and some only for texture data (using Texture::setImage() |
||||||
|
and others). |
||||||
|
@see Image, ImageWrapper, BufferImage, Trade::ImageData |
||||||
|
*/ |
||||||
|
enum class ImageFormat: GLenum { |
||||||
|
/**
|
||||||
|
* Floating-point red channel. |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{EXT,texture_rg}. |
||||||
|
* @requires_es_extension For framebuffer reading, extension @es_extension{EXT,texture_rg}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
Red = GL_RED, |
||||||
|
#else |
||||||
|
Red = GL_RED_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Floating-point green channel. |
||||||
|
* @requires_gl Only @ref Magnum::ImageFormat "ImageFormat::Red" is |
||||||
|
* available in OpenGL ES. |
||||||
|
*/ |
||||||
|
Green = GL_GREEN, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Floating-point blue channel. |
||||||
|
* @requires_gl Only @ref Magnum::ImageFormat "ImageFormat::Red" is |
||||||
|
* available in OpenGL ES. |
||||||
|
*/ |
||||||
|
Blue = GL_BLUE, |
||||||
|
|
||||||
|
/** @todo GL_ALPHA? */ |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Floating-point red and green channel. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{EXT,texture_rg}. |
||||||
|
* @requires_es_extension For framebuffer reading, extension @es_extension{EXT,texture_rg}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RG = GL_RG, |
||||||
|
#else |
||||||
|
RG = GL_RG_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Floating-point RGB. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
*/ |
||||||
|
RGB = GL_RGB, |
||||||
|
|
||||||
|
/** Floating-point RGBA. */ |
||||||
|
RGBA = GL_RGBA, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Floating-point BGR. |
||||||
|
* @requires_gl Only RGB component ordering is available in OpenGL ES. |
||||||
|
*/ |
||||||
|
BGR = GL_BGR, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* Floating-point BGRA. |
||||||
|
* @requires_es_extension %Extension @es_extension{EXT,read_format_bgra} |
||||||
|
* for framebuffer reading, extension @es_extension{APPLE,texture_format_BGRA8888} |
||||||
|
* or @es_extension{EXT,texture_format_BGRA8888} for texture data. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
BGRA = GL_BGRA, |
||||||
|
#else |
||||||
|
BGRA = GL_BGRA_EXT, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Integer red channel. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only floating-point image data are available in OpenGL |
||||||
|
* ES 2.0. |
||||||
|
*/ |
||||||
|
RedInteger = GL_RED_INTEGER, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Integer green channel. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gl Only @ref Magnum::ImageFormat "ImageFormat::RedInteger" |
||||||
|
* is available in OpenGL ES 3.0, only floating-point image data are |
||||||
|
* available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
GreenInteger = GL_GREEN_INTEGER, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Integer blue channel. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gl Only @ref Magnum::ImageFormat "ImageFormat::RedInteger" is |
||||||
|
* available in OpenGL ES 3.0, only floating-point image data are |
||||||
|
* available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
BlueInteger = GL_BLUE_INTEGER, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Integer red and green channel. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
* @requires_gles30 For texture data only, only floating-point image data |
||||||
|
* are available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGInteger = GL_RG_INTEGER, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Integer RGB. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
* @requires_gles30 For texture data only, only floating-point image data |
||||||
|
* are available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBInteger = GL_RGB_INTEGER, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Integer RGBA. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only floating-point image data are available in OpenGL |
||||||
|
* ES 2.0. |
||||||
|
*/ |
||||||
|
RGBAInteger = GL_RGBA_INTEGER, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Integer BGR. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gl Only @ref Magnum::ImageFormat "ImageFormat::RGBInteger" is |
||||||
|
* available in OpenGL ES 3.0, only floating-point image data are |
||||||
|
* available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
BGRInteger = GL_BGR_INTEGER, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Integer BGRA. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gl Only @ref Magnum::ImageFormat "ImageFormat::RGBAInteger" is |
||||||
|
* available in OpenGL ES 3.0, only floating-point image data are |
||||||
|
* available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
BGRAInteger = GL_BGRA_INTEGER, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth component. |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{ANGLE,depth_texture}. |
||||||
|
* @requires_es_extension For framebuffer reading only, extension |
||||||
|
* @es_extension2{NV,read_depth,GL_NV_read_depth_stencil}. |
||||||
|
*/ |
||||||
|
DepthComponent = GL_DEPTH_COMPONENT, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* Stencil index. For framebuffer reading only. |
||||||
|
* @requires_es_extension %Extension @es_extension2{NV,read_stencil,GL_NV_read_depth_stencil} |
||||||
|
* @todo Where to get GL_STENCIL_INDEX in ES? |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
StencilIndex = GL_STENCIL_INDEX, |
||||||
|
#else |
||||||
|
StencilIndex = 0x1901, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth and stencil. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_depth_stencil} |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{OES,packed_depth_stencil}. |
||||||
|
* @requires_es_extension For framebuffer reading only, extension |
||||||
|
* @es_extension2{NV,read_depth_stencil,GL_NV_read_depth_stencil}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
DepthStencil = GL_DEPTH_STENCIL |
||||||
|
#else |
||||||
|
DepthStencil = GL_DEPTH_STENCIL_OES |
||||||
|
#endif |
||||||
|
}; |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Type of image data |
||||||
|
|
||||||
|
Note that some formats can be used only for framebuffer reading (using |
||||||
|
AbstractFramebuffer::read()) and some only for texture data (using Texture::setImage() |
||||||
|
and others). |
||||||
|
@see Image, ImageWrapper, BufferImage, Trade::ImageData |
||||||
|
*/ |
||||||
|
enum class ImageType: GLenum { |
||||||
|
/** Each component unsigned byte. */ |
||||||
|
UnsignedByte = GL_UNSIGNED_BYTE, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Each component signed byte. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
* @requires_gles30 For texture data only, only @ref Magnum::ImageType "ImageType::UnsignedByte" |
||||||
|
* is available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
Byte = GL_BYTE, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Each component unsigned short. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{OES,depth_texture} |
||||||
|
* or @es_extension{ANGLE,depth_texture}. |
||||||
|
*/ |
||||||
|
UnsignedShort = GL_UNSIGNED_SHORT, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Each component signed short. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
* @requires_gles30 For texture data only, only @ref Magnum::ImageType "ImageType::UnsignedShort" |
||||||
|
* is available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
Short = GL_SHORT, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Each component unsigned int. |
||||||
|
* @requires_gles30 Can't be used for framebuffer reading in OpenGL ES 2.0. |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{OES,depth_texture} |
||||||
|
* or @es_extension{ANGLE,depth_texture}. |
||||||
|
*/ |
||||||
|
UnsignedInt = GL_UNSIGNED_INT, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Each component signed int. |
||||||
|
* @requires_gles30 Only @ref Magnum::ImageType "ImageType::UnsignedInt" |
||||||
|
* is available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
Int = GL_INT, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Each component half float. |
||||||
|
* @requires_gl30 %Extension @extension{NV,half_float} / @extension{ARB,half_float_pixel} |
||||||
|
* @requires_gles30 For texture data only, extension |
||||||
|
* @es_extension2{OES,texture_half_float,OES_texture_float}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
HalfFloat = GL_HALF_FLOAT, |
||||||
|
#else |
||||||
|
HalfFloat = GL_HALF_FLOAT_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Each component float. |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{OES,texture_float}. |
||||||
|
*/ |
||||||
|
Float = GL_FLOAT, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGB, unsigned byte, red and green component 3bit, blue component 2bit. |
||||||
|
* @requires_gl Packed 12bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedByte332 = GL_UNSIGNED_BYTE_3_3_2, |
||||||
|
|
||||||
|
/**
|
||||||
|
* BGR, unsigned byte, red and green component 3bit, blue component 2bit. |
||||||
|
* @requires_gl Packed 12bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedByte233Rev = GL_UNSIGNED_BYTE_2_3_3_REV, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, unsigned byte, red and blue component 5bit, green 6bit. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedShort565 = GL_UNSIGNED_SHORT_5_6_5, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* BGR, unsigned short, red and blue 5bit, green 6bit. |
||||||
|
* @requires_gl Only @ref Magnum::ImageType "ImageType::RGB565" is |
||||||
|
* available in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedShort565Rev = GL_UNSIGNED_SHORT_5_6_5_REV, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, unsigned short, each component 4bit. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedShort4444 = GL_UNSIGNED_SHORT_4_4_4_4, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* ABGR, unsigned short, each component 4bit. |
||||||
|
* @requires_es_extension For framebuffer reading only, extension |
||||||
|
* @es_extension{EXT,read_format_bgra}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
UnsignedShort4444Rev = GL_UNSIGNED_SHORT_4_4_4_4_REV, |
||||||
|
#else |
||||||
|
UnsignedShort4444Rev = GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, unsigned short, each RGB component 5bit, alpha component 1bit. |
||||||
|
* @requires_gl Can't be used for framebuffer reading in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedShort5551 = GL_UNSIGNED_SHORT_5_5_5_1, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* ABGR, unsigned short, each RGB component 5bit, alpha component 1bit. |
||||||
|
* @requires_es_extension For framebuffer reading only, extension |
||||||
|
* @es_extension{EXT,read_format_bgra}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
UnsignedShort1555Rev = GL_UNSIGNED_SHORT_1_5_5_5_REV, |
||||||
|
#else |
||||||
|
UnsignedShort1555Rev = GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGBA, unsigned int, each component 8bit. |
||||||
|
* @requires_gl Use @ref Magnum::ImageType "ImageType::UnsignedByte" in |
||||||
|
* OpenGL ES instead. |
||||||
|
*/ |
||||||
|
UnsignedInt8888 = GL_UNSIGNED_INT_8_8_8_8, |
||||||
|
|
||||||
|
/**
|
||||||
|
* ABGR, unsigned int, each component 8bit. |
||||||
|
* @requires_gl Only RGBA component ordering is available in OpenGL ES, see |
||||||
|
* @ref Magnum::ImageType "ImageType::UnsignedInt8888" for more |
||||||
|
* information. |
||||||
|
*/ |
||||||
|
UnsignedInt8888Rev = GL_UNSIGNED_INT_8_8_8_8_REV, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, unsigned int, each RGB component 10bit, alpha component 2bit. |
||||||
|
* @requires_gl Only @ref Magnum::ImageType "ImageType::UnsignedInt2101010Rev" |
||||||
|
* is available in OpenGL ES. |
||||||
|
*/ |
||||||
|
UnsignedInt1010102 = GL_UNSIGNED_INT_10_10_10_2, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* ABGR, unsigned int, each RGB component 10bit, alpha component 2bit. |
||||||
|
* @requires_gles30 Can't be used for framebuffer reading in OpenGL ES 2.0. |
||||||
|
* @requires_gles30 For texture data only, extension |
||||||
|
* @es_extension{EXT,texture_type_2_10_10_10_REV}. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
UnsignedInt2101010Rev = GL_UNSIGNED_INT_2_10_10_10_REV, |
||||||
|
#else |
||||||
|
UnsignedInt2101010Rev = GL_UNSIGNED_INT_2_10_10_10_REV_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* BGR, unsigned int, red and green 11bit float, blue 10bit float. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_float} |
||||||
|
* @requires_gles30 Floating-point types are not available in OpenGL ES |
||||||
|
* 2.0. |
||||||
|
*/ |
||||||
|
UnsignedInt10F11F11FRev = GL_UNSIGNED_INT_10F_11F_11F_REV, |
||||||
|
|
||||||
|
/**
|
||||||
|
* BGR, unsigned int, each component 9bit + 5bit exponent. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_shared_exponent} |
||||||
|
* @requires_gles30 Only 8bit and 16bit types are available in OpenGL ES |
||||||
|
* 2.0. |
||||||
|
*/ |
||||||
|
UnsignedInt5999Rev = GL_UNSIGNED_INT_5_9_9_9_REV, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Unsigned int, depth component 24bit, stencil index 8bit. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_depth_stencil} |
||||||
|
* @requires_gles30 For texture data only, extension @es_extension{OES,packed_depth_stencil}. |
||||||
|
*/ |
||||||
|
#ifdef MAGNUM_TARGET_GLES2 |
||||||
|
UnsignedInt248 = GL_UNSIGNED_INT_24_8_OES |
||||||
|
#else |
||||||
|
UnsignedInt248 = GL_UNSIGNED_INT_24_8, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Float + unsigned int, depth component 32bit float, 24bit gap, stencil |
||||||
|
* index 8bit. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,depth_buffer_float} |
||||||
|
* @requires_gles30 For texture data only, only @ref Magnum::ImageType "ImageType::UnsignedInt248" |
||||||
|
* is available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
Float32UnsignedInt248Rev = GL_FLOAT_32_UNSIGNED_INT_24_8_REV |
||||||
|
#endif |
||||||
|
}; |
||||||
|
|
||||||
|
/** @debugoperator{ImageFormat} */ |
||||||
|
Debug MAGNUM_EXPORT operator<<(Debug debug, ImageFormat value); |
||||||
|
|
||||||
|
/** @debugoperator{ImageFormat} */ |
||||||
|
Debug MAGNUM_EXPORT operator<<(Debug debug, ImageType value); |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,504 @@ |
|||||||
|
#ifndef Magnum_RenderbufferFormat_h |
||||||
|
#define Magnum_RenderbufferFormat_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013 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. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Enum Magnum::RenderbufferFormat |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "OpenGL.h" |
||||||
|
|
||||||
|
namespace Magnum { |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Internal renderbuffer format |
||||||
|
|
||||||
|
@see Renderbuffer |
||||||
|
@todo RGB, RGB8 ES only (ES3 + @es_extension{OES,rgb8_rgba8}) |
||||||
|
*/ |
||||||
|
enum class RenderbufferFormat: GLenum { |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Red component, normalized unsigned, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::R8". |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Use exactly specified format in OpenGL ES instead. |
||||||
|
*/ |
||||||
|
Red = GL_RED, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gles30 %Extension @es_extension{EXT,texture_rg} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
R8 = GL_R8, |
||||||
|
#else |
||||||
|
R8 = GL_R8_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Red and green component, normalized unsigned, size |
||||||
|
* implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::RG8". |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Use exactly specified format in OpenGL ES instead. |
||||||
|
*/ |
||||||
|
RG = GL_RG, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gles30 %Extension @es_extension{EXT,texture_rg} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RG8 = GL_RG8, |
||||||
|
#else |
||||||
|
RG8 = GL_RG8_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::RenderbufferFormat "RenderbufferFormat::RGBA8". |
||||||
|
* @requires_gl Use exactly specified format in OpenGL ES 2.0 instead. |
||||||
|
*/ |
||||||
|
RGBA = GL_RGBA, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component normalized unsigned byte. |
||||||
|
* @requires_gles30 %Extension @es_extension{ARM,rgba8} or @es_extension{OES,rgb8_rgba8} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RGBA8 = GL_RGBA8, |
||||||
|
#else |
||||||
|
RGBA8 = GL_RGBA8_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Red component, normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
R16 = GL_R16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RG16 = GL_RG16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned short. |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RGB16 = GL_RGB16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component normalized unsigned short. |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RGBA16 = GL_RGBA16, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Red component, non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R8UI = GL_R8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG8UI = GL_RG8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA8UI = GL_RGBA8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R8I = GL_R8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG8I = GL_RG8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA8I = GL_RGBA8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R16UI = GL_R16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG16UI = GL_RG16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA16UI = GL_RGBA16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R16I = GL_R16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG16I = GL_RG16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA16I = GL_RGBA16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R32UI = GL_R32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG32UI = GL_RG32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA32UI = GL_RGBA32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R32I = GL_R32I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG32I = GL_RG32I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA32I = GL_RGBA32I, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Red component, half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gl Only (non)normalized integral formats are available in |
||||||
|
* OpenGL ES. |
||||||
|
*/ |
||||||
|
R16F = GL_R16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gl Only (non)normalized integral formats are available in |
||||||
|
* OpenGL ES. |
||||||
|
*/ |
||||||
|
RG16F = GL_RG16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gl Only (non)normalized integral formats are available in |
||||||
|
* OpenGL ES. |
||||||
|
*/ |
||||||
|
RGBA16F = GL_RGBA16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gl Only (non)normalized integral formats are available in |
||||||
|
* OpenGL ES. |
||||||
|
*/ |
||||||
|
R32F = GL_R32F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gl Only (non)normalized integral formats are available in |
||||||
|
* OpenGL ES. |
||||||
|
*/ |
||||||
|
RG32F = GL_RG32F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gl Only (non)normalized integral formats are available in |
||||||
|
* OpenGL ES. |
||||||
|
*/ |
||||||
|
RGBA32F = GL_RGBA32F, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, each RGB component 10bit, alpha 2bit. |
||||||
|
* @requires_gles30 Usable only as internal texture format in OpenGL ES |
||||||
|
* 2.0, see @ref Magnum::TextureFormat "TextureFormat::RGB10A2". |
||||||
|
*/ |
||||||
|
RGB10A2 = GL_RGB10_A2, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, non-normalized unsigned, each RGB component 10bit, alpha 2bit. |
||||||
|
* @requires_gl33 %Extension @extension{ARB,texture_rgb10_a2ui} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB10A2UI = GL_RGB10_A2UI, |
||||||
|
#endif |
||||||
|
|
||||||
|
/** RGBA, normalized unsigned, each RGB component 5bit, alpha 1bit. */ |
||||||
|
RGB5A1 = GL_RGB5_A1, |
||||||
|
|
||||||
|
/** RGBA, normalized unsigned, each component 4bit. */ |
||||||
|
RGBA4 = GL_RGBA4, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGB, float, red and green 11bit, blue 10bit. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_float} |
||||||
|
* @requires_gl Usable only as internal texture format in OpenGL ES, see |
||||||
|
* @ref Magnum::TextureFormat "TextureFormat::R11FG11FB10F". |
||||||
|
*/ |
||||||
|
R11FG11FB10F = GL_R11F_G11F_B10F, |
||||||
|
#endif |
||||||
|
|
||||||
|
/* 1.5.6 <= GLEW < 1.8.0 doesn't have this, even if there is
|
||||||
|
GL_ARB_ES2_compatibility */ |
||||||
|
#if defined(GL_RGB565) || defined(DOXYGEN_GENERATING_OUTPUT) |
||||||
|
/** RGB, normalized unsigned, red and blue 5bit, green 6bit. */ |
||||||
|
RGB565 = GL_RGB565, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* sRGBA, each component normalized unsigned byte. |
||||||
|
* @requires_gles30 %Extension @es_extension{EXT,sRGB} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
SRGB8Alpha8 = GL_SRGB8_ALPHA8, |
||||||
|
#else |
||||||
|
SRGB8Alpha8 = GL_SRGB8_ALPHA8_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Depth component, size implementation-dependent. |
||||||
|
* @todo is this allowed in core? |
||||||
|
* @deprecated Prefer to use exactly specified version of this format, e.g. |
||||||
|
* @ref Magnum::RenderbufferFormat "RenderbufferFormat::DepthComponent16". |
||||||
|
* @requires_gl Use exactly specified format in OpenGL ES instead. |
||||||
|
*/ |
||||||
|
DepthComponent = GL_DEPTH_COMPONENT, |
||||||
|
#endif |
||||||
|
|
||||||
|
/** Depth component, 16bit. */ |
||||||
|
DepthComponent16 = GL_DEPTH_COMPONENT16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth component, 24bit. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,depth24} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
DepthComponent24 = GL_DEPTH_COMPONENT24, |
||||||
|
#else |
||||||
|
DepthComponent24 = GL_DEPTH_COMPONENT24_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* Depth component, 32bit. |
||||||
|
* @requires_es_extension %Extension @es_extension{OES,depth32} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
DepthComponent32 = GL_DEPTH_COMPONENT32, |
||||||
|
#else |
||||||
|
DepthComponent32 = GL_DEPTH_COMPONENT32_OES, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Depth component, 32bit float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,depth_buffer_float} |
||||||
|
* @requires_gles30 Only integral depth textures are available in OpenGL ES |
||||||
|
* 2.0. |
||||||
|
*/ |
||||||
|
DepthComponent32F = GL_DEPTH_COMPONENT32F, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Stencil index, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use exactly specified version of this format, e.g. |
||||||
|
* @ref Magnum::RenderbufferFormat "RenderbufferFormat::StencilIndex8". |
||||||
|
* @requires_gl Use exactly specified format in OpenGL ES instead. |
||||||
|
*/ |
||||||
|
StencilIndex = GL_STENCIL_INDEX, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* 1-bit stencil index. |
||||||
|
* @requires_es_extension %Extension @es_extension{OES,stencil1} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
StencilIndex1 = GL_STENCIL_INDEX1, |
||||||
|
#else |
||||||
|
StencilIndex1 = GL_STENCIL_INDEX1_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* 4-bit stencil index. |
||||||
|
* @requires_es_extension %Extension @es_extension{OES,stencil4} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
StencilIndex4 = GL_STENCIL_INDEX4, |
||||||
|
#else |
||||||
|
StencilIndex4 = GL_STENCIL_INDEX4_OES, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
/** 8-bit stencil index. */ |
||||||
|
StencilIndex8 = GL_STENCIL_INDEX8, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* 16-bit stencil index. |
||||||
|
* @requires_gl At most 8bit stencil index is available in OpenGL ES. |
||||||
|
*/ |
||||||
|
StencilIndex16 = GL_STENCIL_INDEX16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth and stencil component, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use exactly specified version of this format, e.g. |
||||||
|
* @ref Magnum::RenderbufferFormat "RenderbufferFormat::Depth24Stencil8". |
||||||
|
* @requires_gl Use exactly specified format in OpenGL ES instead. |
||||||
|
*/ |
||||||
|
DepthStencil = GL_DEPTH_STENCIL, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* 24bit depth and 8bit stencil component. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_depth_stencil} |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} |
||||||
|
*/ |
||||||
|
#ifdef MAGNUM_TARGET_GLES2 |
||||||
|
Depth24Stencil8 = GL_DEPTH24_STENCIL8_OES |
||||||
|
#else |
||||||
|
Depth24Stencil8 = GL_DEPTH24_STENCIL8, |
||||||
|
|
||||||
|
/**
|
||||||
|
* 32bit float depth component and 8bit stencil component. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,depth_buffer_float} |
||||||
|
* @requires_gles30 Only integral depth textures are available in OpenGL ES |
||||||
|
* 2.0. |
||||||
|
*/ |
||||||
|
Depth32FStencil8 = GL_DEPTH32F_STENCIL8 |
||||||
|
#endif |
||||||
|
}; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
#endif |
||||||
@ -0,0 +1,823 @@ |
|||||||
|
#ifndef Magnum_TextureFormat_h |
||||||
|
#define Magnum_TextureFormat_h |
||||||
|
/*
|
||||||
|
This file is part of Magnum. |
||||||
|
|
||||||
|
Copyright © 2010, 2011, 2012, 2013 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. |
||||||
|
*/ |
||||||
|
|
||||||
|
/** @file
|
||||||
|
* @brief Enum Magnum::TextureFormat |
||||||
|
*/ |
||||||
|
|
||||||
|
#include "OpenGL.h" |
||||||
|
|
||||||
|
namespace Magnum { |
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Internal texture format |
||||||
|
|
||||||
|
@see Texture, CubeMapTexture, CubeMapTextureArray |
||||||
|
*/ |
||||||
|
enum class TextureFormat: GLenum { |
||||||
|
/**
|
||||||
|
* Red component, normalized unsigned, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::TextureFormat "TextureFormat::R8". |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gles30 %Extension @es_extension{EXT,texture_rg} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
Red = GL_RED, |
||||||
|
#else |
||||||
|
Red = GL_RED_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Red component, normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gles30 Use @ref Magnum::TextureFormat "TextureFormat::Red" in |
||||||
|
* OpenGL ES 2.0 instead. |
||||||
|
*/ |
||||||
|
R8 = GL_R8, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, normalized unsigned, size |
||||||
|
* implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::TextureFormat "TextureFormat::RG8". |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gles30 %Extension @es_extension{EXT,texture_rg} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RG = GL_RG, |
||||||
|
#else |
||||||
|
RG = GL_RG_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Red and green component, each normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gles30 Use @ref Magnum::TextureFormat "TextureFormat::RG" in |
||||||
|
* OpenGL ES 2.0 instead. |
||||||
|
*/ |
||||||
|
RG8 = GL_RG8, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, normalized unsigned, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::TextureFormat "TextureFormat::RGB8". |
||||||
|
*/ |
||||||
|
RGB = GL_RGB, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned byte. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RGB8 = GL_RGB8, |
||||||
|
#else |
||||||
|
RGB8 = GL_RGB8_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* e.g. @ref Magnum::TextureFormat "TextureFormat::RGBA8". |
||||||
|
*/ |
||||||
|
RGBA = GL_RGBA, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component normalized unsigned byte. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RGBA8 = GL_RGBA8, |
||||||
|
#else |
||||||
|
RGBA8 = GL_RGBA8_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Red component, normalized signed byte. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gles30 Only unsigned formats are available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R8Snorm = GL_R8_SNORM, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each normalized signed byte. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gles30 Only unsigned formats are available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG8Snorm = GL_RG8_SNORM, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized signed byte. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gles30 Only unsigned formats are available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB8Snorm = GL_RGB8_SNORM, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component normalized signed byte. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gles30 Only unsigned formats are available in OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA8Snorm = GL_RGBA8_SNORM, |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Red component, normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
R16 = GL_R16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RG16 = GL_RG16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned short. |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RGB16 = GL_RGB16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component normalized unsigned short. |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RGBA16 = GL_RGBA16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, normalized signed short. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
R16Snorm = GL_R16_SNORM, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each normalized signed short. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RG16Snorm = GL_RG16_SNORM, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized signed short. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RGB16Snorm = GL_RGB16_SNORM, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component normalized signed short. |
||||||
|
* @requires_gl31 %Extension @extension{EXT,texture_snorm} |
||||||
|
* @requires_gl Only byte-sized normalized formats are available in OpenGL |
||||||
|
* ES. |
||||||
|
*/ |
||||||
|
RGBA16Snorm = GL_RGBA16_SNORM, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R8UI = GL_R8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG8UI = GL_RG8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB8UI = GL_RGB8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized unsigned byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA8UI = GL_RGBA8UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R8I = GL_R8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG8I = GL_RG8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB8I = GL_RGB8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized signed byte. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA8I = GL_RGBA8I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R16UI = GL_R16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG16UI = GL_RG16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB16UI = GL_RGB16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized unsigned short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA16UI = GL_RGBA16UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R16I = GL_R16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG16I = GL_RG16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB16I = GL_RGB16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized signed short. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA16I = GL_RGBA16I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R32UI = GL_R32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG32UI = GL_RG32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB32UI = GL_RGB32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized unsigned int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA32UI = GL_RGBA32UI, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R32I = GL_R32I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG32I = GL_RG32I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB32I = GL_RGB32I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component non-normalized signed int. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_integer} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA32I = GL_RGBA32I, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R16F = GL_R16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG16F = GL_RG16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB16F = GL_RGB16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component half float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA16F = GL_RGBA16F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red component, float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R32F = GL_R32F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Red and green component, each float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} and @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RG32F = GL_RG32F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB32F = GL_RGB32F, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, each component float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGBA32F = GL_RGBA32F, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGB, normalized unsigned, red and green component 3bit, blue 2bit. |
||||||
|
* @requires_gl Packed 8bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
R3B3G2 = GL_R3_G3_B2, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned 4bit. |
||||||
|
* @requires_gl Packed 12bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
RGB4 = GL_RGB4, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned 5bit. |
||||||
|
* @requires_gl Use @ref Magnum::TextureFormat "TextureFormat::RGB5A1" or |
||||||
|
* @ref Magnum::TextureFormat "TextureFormat::RGB565" in OpenGL ES. |
||||||
|
*/ |
||||||
|
RGB5 = GL_RGB5, |
||||||
|
#endif |
||||||
|
|
||||||
|
/* 1.5.6 <= GLEW < 1.8.0 doesn't have this, even if there is
|
||||||
|
GL_ARB_ES2_compatibility */ |
||||||
|
#if defined(GL_RGB565) || defined(DOXYGEN_GENERATING_OUTPUT) |
||||||
|
/**
|
||||||
|
* RGB, normalized unsigned, red and blue component 5bit, green 6bit. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat} |
||||||
|
*/ |
||||||
|
RGB565 = GL_RGB565, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned 10bit. |
||||||
|
* @requires_es_extension %Extension @es_extension{OES,required_internalformat} |
||||||
|
* and @es_extension{EXT,texture_type_2_10_10_10_REV} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
RGB10 = GL_RGB10, |
||||||
|
#else |
||||||
|
RGB10 = GL_RGB10_EXT, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGB, each component normalized unsigned 12bit. |
||||||
|
* @requires_gl Packed 36bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
RGB12 = GL_RGB12, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, each component 2bit. |
||||||
|
* @requires_gl Packed 8bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
RGBA2 = GL_RGBA2, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, each component 4bit. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat} |
||||||
|
*/ |
||||||
|
RGBA4 = GL_RGBA4, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, each RGB component 5bit, alpha 1bit. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat} |
||||||
|
*/ |
||||||
|
RGB5A1 = GL_RGB5_A1, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RGBA, normalized unsigned, each RGB component 10bit, alpha 2bit. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat} |
||||||
|
* and @es_extension{EXT,texture_type_2_10_10_10_REV} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
RGB10A2 = GL_RGB10_A2, |
||||||
|
#else |
||||||
|
RGB10A2 = GL_RGB10_A2_EXT, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* RGBA, non-normalized unsigned, each RGB component 10bit, alpha 2bit. |
||||||
|
* @requires_gl33 %Extension @extension{ARB,texture_rgb10_a2ui} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
RGB10A2UI = GL_RGB10_A2UI, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* RGBA, each component normalized unsigned 12bit. |
||||||
|
* @requires_gl Packed 48bit types are not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
RGBA12 = GL_RGBA12, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* RGB, float, red and green component 11bit, blue 10bit. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_float} |
||||||
|
* @requires_gles30 Only normalized integral formats are available in |
||||||
|
* OpenGL ES 2.0. |
||||||
|
*/ |
||||||
|
R11FG11FB10F = GL_R11F_G11F_B10F, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* RGB, unsigned with exponent, each RGB component 9bit, exponent 5bit. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_shared_exponent} |
||||||
|
* @requires_gles30 Use @ref Magnum::TextureFormat "TextureFormat::RGB" in |
||||||
|
* OpenGL ES 2.0 instead. |
||||||
|
*/ |
||||||
|
RGB9E5 = GL_RGB9_E5, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* sRGB, normalized unsigned, size implementation-dependent. |
||||||
|
* @todo is this allowed in core? |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8". |
||||||
|
* @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES |
||||||
|
* 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8" in |
||||||
|
* OpenGL ES 3.0 instead. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
SRGB = GL_SRGB, |
||||||
|
#else |
||||||
|
SRGB = GL_SRGB_EXT, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* sRGB, each component normalized unsigned byte. |
||||||
|
* @requires_gles30 Use @ref Magnum::TextureFormat "TextureFormat::SRGB" in |
||||||
|
* OpenGL ES 2.0 instead. |
||||||
|
*/ |
||||||
|
SRGB8 = GL_SRGB8, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* sRGBA, normalized unsigned, size implementation-dependent. |
||||||
|
* @todo is this allowed in core? |
||||||
|
* @deprecated Prefer to use the exactly specified version of this format, |
||||||
|
* i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8". |
||||||
|
* @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES |
||||||
|
* 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8" in |
||||||
|
* OpenGL ES 3.0 instead. |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
SRGBAlpha = GL_SRGB_ALPHA, |
||||||
|
#else |
||||||
|
SRGBAlpha = GL_SRGB_ALPHA_EXT, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* sRGBA, each component normalized unsigned byte. |
||||||
|
* @requires_gles30 Use @ref Magnum::TextureFormat "TextureFormat::SRGBAlpha" |
||||||
|
* in OpenGL ES 2.0 instead. |
||||||
|
*/ |
||||||
|
SRGB8Alpha8 = GL_SRGB8_ALPHA8, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES |
||||||
|
/**
|
||||||
|
* Compressed red channel, normalized unsigned. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Generic texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRed = GL_COMPRESSED_RED, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Compressed red and green channel, normalized unsigned. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,texture_rg} |
||||||
|
* @requires_gl Generic texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRG = GL_COMPRESSED_RG, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Compressed RGB, normalized unsigned. |
||||||
|
* @requires_gl Generic texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRGB = GL_COMPRESSED_RGB, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Compressed RGBA, normalized unsigned. |
||||||
|
* @requires_gl Generic texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRGBA = GL_COMPRESSED_RGBA, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RTGC compressed red channel, normalized unsigned. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_compression_rgtc} |
||||||
|
* @requires_gl RGTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRedRtgc1 = GL_COMPRESSED_RED_RGTC1, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RTGC compressed red and green channel, normalized unsigned. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_compression_rgtc} |
||||||
|
* @requires_gl RGTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRGRgtc2 = GL_COMPRESSED_RG_RGTC2, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RTGC compressed red channel, normalized signed. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_compression_rgtc} |
||||||
|
* @requires_gl RGTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedSignedRedRgtc1 = GL_COMPRESSED_SIGNED_RED_RGTC1, |
||||||
|
|
||||||
|
/**
|
||||||
|
* RTGC compressed red and green channel, normalized signed. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,texture_compression_rgtc} |
||||||
|
* @requires_gl RGTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedSignedRGRgtc2 = GL_COMPRESSED_SIGNED_RG_RGTC2, |
||||||
|
|
||||||
|
/* These are named with _ARB suffix, because glcorearb.h doesn't
|
||||||
|
have suffixless version (?!) and GLEW has it without suffix as |
||||||
|
late as of 1.8.0 { */ |
||||||
|
|
||||||
|
/**
|
||||||
|
* BPTC compressed RGBA, normalized unsigned. |
||||||
|
* @requires_gl42 %Extension @extension{ARB,texture_compression_bptc} |
||||||
|
* @requires_gl BPTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRGBABtpcUnorm = GL_COMPRESSED_RGBA_BPTC_UNORM_ARB, |
||||||
|
|
||||||
|
/**
|
||||||
|
* BPTC compressed sRGBA, normalized unsigned. |
||||||
|
* @requires_gl42 %Extension @extension{ARB,texture_compression_bptc} |
||||||
|
* @requires_gl BPTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedSRGBAlphaBtpcUnorm = GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB, |
||||||
|
|
||||||
|
/**
|
||||||
|
* BPTC compressed RGB, unsigned float. |
||||||
|
* @requires_gl42 %Extension @extension{ARB,texture_compression_bptc} |
||||||
|
* @requires_gl BPTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRGBBptcUnsignedFloat = GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB, |
||||||
|
|
||||||
|
/**
|
||||||
|
* BPTC compressed RGB, signed float. |
||||||
|
* @requires_gl42 %Extension @extension{ARB,texture_compression_bptc} |
||||||
|
* @requires_gl BPTC texture compression is not available in OpenGL ES. |
||||||
|
*/ |
||||||
|
CompressedRGBBptcSignedFloat = GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB, |
||||||
|
|
||||||
|
/*}*/ |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth component, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use exactly specified version of this format, e.g. |
||||||
|
* @ref Magnum::TextureFormat "TextureFormat::DepthComponent16". |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,depth_texture} or |
||||||
|
* @es_extension{ANGLE,depth_texture} |
||||||
|
*/ |
||||||
|
DepthComponent = GL_DEPTH_COMPONENT, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth and stencil component, size implementation-dependent. |
||||||
|
* @deprecated Prefer to use exactly specified version of this format, e.g. |
||||||
|
* @ref Magnum::TextureFormat "TextureFormat::Depth24Stencil8". |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
DepthStencil = GL_DEPTH_STENCIL, |
||||||
|
#else |
||||||
|
DepthStencil = GL_DEPTH_STENCIL_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth component, 16bit. |
||||||
|
* @requires_gles30 %Extension (@es_extension{OES,required_internalformat} |
||||||
|
* and @es_extension{OES,depth_texture}) or (@es_extension{EXT,texture_storage} |
||||||
|
* and @es_extension{ANGLE,depth_texture}) |
||||||
|
*/ |
||||||
|
DepthComponent16 = GL_DEPTH_COMPONENT16, |
||||||
|
|
||||||
|
/**
|
||||||
|
* Depth component, 24bit. |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,required_internalformat}, |
||||||
|
* @es_extension{OES,depth_texture} and @es_extension{OES,depth24} |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
DepthComponent24 = GL_DEPTH_COMPONENT24, |
||||||
|
#else |
||||||
|
DepthComponent24 = GL_DEPTH_COMPONENT24_OES, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES3 |
||||||
|
/**
|
||||||
|
* Depth component, 32bit. |
||||||
|
* @requires_es_extension %Extension (@es_extension{OES,required_internalformat}, |
||||||
|
* @es_extension{OES,depth_texture} and @es_extension{OES,depth32}) or |
||||||
|
* (@es_extension{EXT,texture_storage} and @es_extension{ANGLE,depth_texture}) |
||||||
|
*/ |
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
DepthComponent32 = GL_DEPTH_COMPONENT32, |
||||||
|
#else |
||||||
|
DepthComponent32 = GL_DEPTH_COMPONENT32_OES, |
||||||
|
#endif |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* Depth component, 32bit float. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,depth_buffer_float} |
||||||
|
* @requires_gles30 Only integral depth textures are available in OpenGL ES |
||||||
|
* 2.0. |
||||||
|
*/ |
||||||
|
DepthComponent32F = GL_DEPTH_COMPONENT32F, |
||||||
|
#endif |
||||||
|
|
||||||
|
/**
|
||||||
|
* 24bit depth and 8bit stencil component. |
||||||
|
* @requires_gl30 %Extension @extension{EXT,packed_depth_stencil} |
||||||
|
* @requires_gles30 %Extension @es_extension{OES,packed_depth_stencil} and |
||||||
|
* (@es_extension{OES,required_internalformat} or |
||||||
|
* (@es_extension{EXT,texture_storage} and @es_extension{ANGLE,depth_texture})) |
||||||
|
*/ |
||||||
|
#ifdef MAGNUM_TARGET_GLES2 |
||||||
|
Depth24Stencil8 = GL_DEPTH24_STENCIL8_OES |
||||||
|
#else |
||||||
|
Depth24Stencil8 = GL_DEPTH24_STENCIL8, |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef MAGNUM_TARGET_GLES2 |
||||||
|
/**
|
||||||
|
* 32bit float depth component and 8bit stencil component. |
||||||
|
* @requires_gl30 %Extension @extension{ARB,depth_buffer_float} |
||||||
|
* @requires_gles30 Only integral depth textures are available in OpenGL ES |
||||||
|
* 2.0. |
||||||
|
*/ |
||||||
|
Depth32FStencil8 = GL_DEPTH32F_STENCIL8 |
||||||
|
#endif |
||||||
|
}; |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
#endif |
||||||
Loading…
Reference in new issue