Browse Source

Blind fix for some image formats not present in ES3.

I want ES3 in Mesa now so I can test that already.
pull/7/head
Vladimír Vondruš 13 years ago
parent
commit
ddb8cd5052
  1. 2
      src/AbstractImage.cpp
  2. 24
      src/AbstractImage.h

2
src/AbstractImage.cpp

@ -103,7 +103,7 @@ std::size_t AbstractImage::pixelSize(Format format, Type type) {
case Format::RGBAInteger:
#endif
case Format::BGRA:
#ifndef MAGNUM_TARGET_GLES2
#ifndef MAGNUM_TARGET_GLES
case Format::BGRAInteger:
#endif
return 4*size;

24
src/AbstractImage.h

@ -130,21 +130,25 @@ class MAGNUM_EXPORT AbstractImage {
*/
RedInteger = GL_RED_INTEGER,
#ifndef MAGNUM_TARGET_GLES
/**
* Integer green channel.
* @requires_gl30 %Extension @extension{EXT,texture_integer}
* @requires_gles30 Only floating-point image data are available
* in OpenGL ES 2.0.
* @requires_gl Only @ref Format "Format::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_gles30 Only floating-point image data are available
* in OpenGL ES 2.0.
* @requires_gl Only @ref Format "Format::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.
@ -171,22 +175,26 @@ class MAGNUM_EXPORT AbstractImage {
*/
RGBAInteger = GL_RGBA_INTEGER,
#ifndef MAGNUM_TARGET_GLES
/**
* Integer BGR.
* @requires_gl30 %Extension @extension{EXT,texture_integer}
* @requires_gles30 Only floating-point image data are available
* in OpenGL ES 2.0.
* @requires_gl Only @ref Format "Format::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_gles30 Only floating-point image data are available
* in OpenGL ES 2.0.
* @requires_gl Only @ref Format "Format::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. For framebuffer reading only.

Loading…
Cancel
Save