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>
15 COLOR_INDEX = GL_COLOR_INDEX,
16 STENCIL_INDEX = GL_STENCIL_INDEX,
17 DEPTH_COMPONENT = GL_DEPTH_COMPONENT,
25 RGB16F = GL_RGB16F_ARB,
26 RGB32F = GL_RGB32F_ARB,
28 RGBA16F = GL_RGBA16F_ARB,
29 RGBA32F = GL_RGBA32F_ARB,
32 LUMINANCE = GL_LUMINANCE,
33 LUMINANCE8 = GL_LUMINANCE8,
34 LUMINANCE16F = GL_LUMINANCE16F_ARB,
35 LUMINANCE32F = GL_LUMINANCE32F_ARB,
36 LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA,
37 LUMINANCE_ALPHA8 = GL_LUMINANCE8_ALPHA8,
38 LUMINANCE_ALPHA16F = GL_LUMINANCE_ALPHA16F_ARB,
39 LUMINANCE_ALPHA32F = GL_LUMINANCE_ALPHA32F_ARB
42 void operator>>(const LexicalConverter &, PixelFormat &);
44 PixelFormat pixelformat_from_graphics(Graphics::PixelFormat);
45 PixelFormat storage_pixelformat_from_graphics(Graphics::PixelFormat);
47 PixelFormat get_base_pixelformat(PixelFormat);
48 unsigned get_component_count(PixelFormat);
50 void require_pixelformat(PixelFormat);