1 #ifndef MSP_GL_PIXELFORMAT_H_
2 #define MSP_GL_PIXELFORMAT_H_
4 #include <msp/graphics/pixelformat.h>
5 #include <msp/strings/lexicalcast.h>
7 #include <msp/gl/extensions/arb_texture_float.h>
8 #include <msp/gl/extensions/ext_bgra.h>
9 #include <msp/gl/extensions/ext_texture_srgb.h>
16 COLOR_INDEX = GL_COLOR_INDEX,
17 STENCIL_INDEX = GL_STENCIL_INDEX,
18 DEPTH_COMPONENT = GL_DEPTH_COMPONENT,
26 RGB16F = GL_RGB16F_ARB,
27 RGB32F = GL_RGB32F_ARB,
29 RGBA16F = GL_RGBA16F_ARB,
30 RGBA32F = GL_RGBA32F_ARB,
32 SRGB_ALPHA = GL_SRGB_ALPHA_EXT,
34 SRGB8_ALPHA8 = GL_SRGB8_ALPHA8_EXT,
37 LUMINANCE = GL_LUMINANCE,
38 LUMINANCE8 = GL_LUMINANCE8,
39 LUMINANCE16F = GL_LUMINANCE16F_ARB,
40 LUMINANCE32F = GL_LUMINANCE32F_ARB,
41 LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA,
42 LUMINANCE_ALPHA8 = GL_LUMINANCE8_ALPHA8,
43 LUMINANCE_ALPHA16F = GL_LUMINANCE_ALPHA16F_ARB,
44 LUMINANCE_ALPHA32F = GL_LUMINANCE_ALPHA32F_ARB,
45 SLUMINANCE = GL_SLUMINANCE_EXT,
46 SLUMINANCE8 = GL_SLUMINANCE8_EXT,
47 SLUMINANCE_ALPHA = GL_SLUMINANCE_ALPHA_EXT,
48 SLUMINANCE8_ALPHA8 = GL_SLUMINANCE8_ALPHA8_EXT
51 void operator>>(const LexicalConverter &, PixelFormat &);
53 PixelFormat pixelformat_from_graphics(Graphics::PixelFormat);
54 PixelFormat storage_pixelformat_from_graphics(Graphics::PixelFormat);
56 PixelFormat get_base_pixelformat(PixelFormat);
57 PixelFormat get_srgb_pixelformat(PixelFormat);
58 unsigned get_component_count(PixelFormat);
60 void require_pixelformat(PixelFormat);