]> git.tdb.fi Git - libs/gl.git/blob - source/blend.h
Add blending and clipping support
[libs/gl.git] / source / blend.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2008  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_BLEND_H_
9 #define MSP_GL_BLEND_H_
10
11 #include "gl.h"
12
13 namespace Msp {
14 namespace GL {
15
16 enum BlendEquation
17 {
18         ADD              = GL_FUNC_ADD,
19         SUBTRACT         = GL_FUNC_SUBTRACT,
20         REVERSE_SUBTRACT = GL_FUNC_REVERSE_SUBTRACT,
21         MIN              = GL_MIN,
22         MAX              = GL_MAX
23 };
24
25 enum BlendFactor
26 {
27         ZERO = GL_ZERO,
28         ONE = GL_ONE,
29         SRC_COLOR = GL_SRC_COLOR,
30         ONE_MINUS_SRC_COLOR = GL_ONE_MINUS_SRC_COLOR,
31         SRC_ALPHA = GL_SRC_ALPHA,
32         ONE_MINUS_SRC_ALPHA = GL_ONE_MINUS_SRC_ALPHA,
33         DST_COLOR = GL_DST_COLOR,
34         ONE_MINUS_DST_COLOR = GL_ONE_MINUS_DST_COLOR,
35         DST_ALPHA = GL_DST_ALPHA,
36         ONE_MINUS_DST_ALPHA = GL_ONE_MINUS_DST_ALPHA,
37         CONSTANT_COLOR = GL_CONSTANT_COLOR,
38         ONE_MINUS_CONSTANT_COLOR = GL_ONE_MINUS_CONSTANT_COLOR,
39         CONSTANT_ALPHA = GL_CONSTANT_ALPHA,
40         ONE_MINUS_CONSTANT_ALPHA = GL_ONE_MINUS_CONSTANT_ALPHA
41 };
42
43 void blend_equation(BlendEquation eq);
44 void blend_func(BlendFactor src, BlendFactor dst);
45
46 } // namespace GL
47 } // namespace Msp
48
49 #endif