]> git.tdb.fi Git - libs/gl.git/blob - source/pixelformat.h
Check range when attaching Lights to a Lighting
[libs/gl.git] / source / pixelformat.h
1 #ifndef MSP_GL_PIXELFORMAT_H_
2 #define MSP_GL_PIXELFORMAT_H_
3
4 #include <msp/graphics/pixelformat.h>
5 #include <msp/strings/lexicalcast.h>
6 #include "gl.h"
7 #include <msp/gl/extensions/arb_texture_float.h>
8 #include <msp/gl/extensions/ext_bgra.h>
9
10 namespace Msp {
11 namespace GL {
12
13 enum PixelFormat
14 {
15         COLOR_INDEX     = GL_COLOR_INDEX,
16         STENCIL_INDEX   = GL_STENCIL_INDEX,
17         DEPTH_COMPONENT = GL_DEPTH_COMPONENT,
18         RED             = GL_RED,
19         GREEN           = GL_GREEN,
20         BLUE            = GL_BLUE,
21         ALPHA           = GL_ALPHA,
22         RGB             = GL_RGB,
23         RGBA            = GL_RGBA,
24         RGB8            = GL_RGB8,
25         RGB16F          = GL_RGB16F_ARB,
26         RGB32F          = GL_RGB32F_ARB,
27         RGBA8           = GL_RGBA8,
28         RGBA16F         = GL_RGBA16F_ARB,
29         RGBA32F         = GL_RGBA32F_ARB,
30         BGR             = GL_BGR,
31         BGRA            = GL_BGRA,
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
40 };
41
42 void operator>>(const LexicalConverter &, PixelFormat &);
43
44 PixelFormat pixelformat_from_graphics(Graphics::PixelFormat);
45 PixelFormat storage_pixelformat_from_graphics(Graphics::PixelFormat);
46
47 PixelFormat get_base_pixelformat(PixelFormat);
48 unsigned get_component_count(PixelFormat);
49
50 void require_pixelformat(PixelFormat);
51
52 } // namespace GL
53 } // namespace Msp
54
55 #endif