mirror of https://github.com/mosra/magnum.git
Tree:
46781bb195
apple-crashy-msaa-default-framebuffer
audio-import
catastrophic-cross
chainsaw-surgery
dpi-change-events
euler-xxx
findsdl-include-root
gltestlib-symbol-duplication
gpu-preference
inverted-ranges
ktx1-detection
master
meshdata-cereal-killer
mousecapture
multiwindow
next
sceneconverter
scenedata-optimizations
simd
vectorfields
zerocopy
snapshot-2013-08
snapshot-2013-10
snapshot-2014-01
snapshot-2014-01-compatibility
snapshot-2014-06
snapshot-2014-06-compatibility
snapshot-2015-05
snapshot-2015-05-compatibility
v2013.08
v2013.10
v2014.01
v2014.06
v2015.05
v2018.02
v2018.04
v2018.10
v2019.01
v2019.10
v2020.06
${ noResults }
2 Commits (46781bb19524ca96740cd4293384563e5ce05df1)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
31b7a39e9d |
GL: use CORRADE_IGNORE_DEPRECATED macros where applicable.
|
8 years ago |
|
|
6d41597d1d |
Split the OpenGL layer out, pt 9: generic pixel formats.
This is quite big, so: * There are new Magnum::PixelFormat and Magnum::CompressedPixelFormat enums, which contain generic API-independent formats. In particular, PixelFormat replaces GL::PixelFormat and GL::PixelType with a single value. * There's GL::pixelFormat(), GL::pixelType(), GL::compressedPixelFormat() to convert the generic enums to GL-specific. The mapping is only in one direction, done with a lookup table (generic enums are indices to that table). * GL classes taking the formats directly (such as GL::BufferImage) have overloads that take both the GL-specific and generic format. * The generic Image, CompressedImage, ImageView, CompressedImageView, and Trade::ImageData classes now accept the generic formats first-class. However, it's also possible to store an implementation-specific value to cover cases where a generic format enum doesn't have support for a particular format. This is done by wrapping the value using pixelFormatWrap() or compressedPixelFormatWrap(). Particular GPU APIs then assume it's their implementation-specific value and extract the value back using pixelFormatUnwrap() or compressedPixelFormatUnwrap(). There's also an isPixelFormatImplementationSpecific() and isCompressedPixelFormatImplementationSpecific() that distinguishes these values. * Many operations need pixel size and in order to have it even for implementation-specific formats, a corresponding pixelSize() overload is found via ADL on construction and the calculated size stored along the format. Previously the pixel size was only calculated on demand, but that's not possible now. In case such overload is not available, it's possible to pass pixel size manually as well. * In order to support the GL format+type pair, Image, ImageView and Trade::ImageData, there's now an additional untyped formatExtra() field that holds the second value. * The CompressedPixelStorage class is now unconditionally available on all targets, including OpenGL ES and WebGL. However, on OpenGL ES the GL APIs expect that it's all at default values. I attempted to preserve backwards compatibility as much as possible: * The PixelFormat and CompressedPixelFormat enum now contains generic API-independent values. The GL-specific formats are present there, but marked as deprecated. Use either the generic values or GL::PixelFormat (togehter with GL::PixelType) and GL::CompressedPixelFormat instead. There's a lot of ugliness caused by this, but seems to work well. * *Image::type() functions are deprecated as they were too GL-specific. Use formatExtra() and cast it to GL::PixelType instead. * Image constructors take templated format or format+extra arguments, so passing GL-specific values to them should still work. |
8 years ago |