ClanLib
2.3.7
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Sources
API
Display
Render
blend_mode.h
Go to the documentation of this file.
1
/*
2
** ClanLib SDK
3
** Copyright (c) 1997-2011 The ClanLib Team
4
**
5
** This software is provided 'as-is', without any express or implied
6
** warranty. In no event will the authors be held liable for any damages
7
** arising from the use of this software.
8
**
9
** Permission is granted to anyone to use this software for any purpose,
10
** including commercial applications, and to alter it and redistribute it
11
** freely, subject to the following restrictions:
12
**
13
** 1. The origin of this software must not be misrepresented; you must not
14
** claim that you wrote the original software. If you use this software
15
** in a product, an acknowledgment in the product documentation would be
16
** appreciated but is not required.
17
** 2. Altered source versions must be plainly marked as such, and must not be
18
** misrepresented as being the original software.
19
** 3. This notice may not be removed or altered from any source distribution.
20
**
21
** Note: Some of the libraries ClanLib may link to may have additional
22
** requirements or restrictions.
23
**
24
** File Author(s):
25
**
26
** Harry Storbacka
27
*/
28
31
32
#pragma once
33
34
#include "../api_display.h"
35
#include "../../Core/System/sharedptr.h"
36
37
class
CL_Colorf
;
38
class
CL_BlendMode_Impl;
39
43
enum
CL_BlendFunc
44
{
46
cl_blend_zero
,
47
49
cl_blend_one
,
50
52
cl_blend_dest_color
,
53
55
cl_blend_src_color
,
56
58
cl_blend_one_minus_dest_color
,
59
61
cl_blend_one_minus_src_color
,
62
64
cl_blend_src_alpha
,
65
67
cl_blend_one_minus_src_alpha
,
68
70
cl_blend_dest_alpha
,
71
73
cl_blend_one_minus_dest_alpha
,
74
76
cl_blend_src_alpha_saturate
,
77
79
cl_blend_constant_color
,
80
82
cl_blend_one_minus_constant_color
,
83
85
cl_blend_constant_alpha
,
86
88
cl_blend_one_minus_constant_alpha
89
};
90
94
enum
CL_BlendEquation
95
{
96
cl_blend_equation_add
,
97
cl_blend_equation_subtract
,
98
cl_blend_equation_reverse_subtract
,
99
cl_blend_equation_min
,
100
cl_blend_equation_max
101
};
102
106
class
CL_API_DISPLAY
CL_BlendMode
107
{
110
111
public
:
112
CL_BlendMode
();
113
114
~
CL_BlendMode
();
115
119
120
public
:
122
const
CL_Colorf
&get_blend_color()
const
;
123
125
CL_BlendEquation
get_blend_equation()
const
;
126
128
CL_BlendEquation
get_blend_equation_alpha()
const
;
129
131
CL_BlendFunc
get_blend_function_src()
const
;
132
134
CL_BlendFunc
get_blend_function_dest()
const
;
135
137
CL_BlendFunc
get_blend_function_src_alpha()
const
;
138
140
CL_BlendFunc
get_blend_function_dest_alpha()
const
;
141
143
bool
is_blend_enabled()
const
;
144
148
149
public
:
151
bool
operator ==
(
const
CL_BlendMode
&other)
const
;
152
154
void
enable_blending(
bool
value);
155
157
void
set_blend_color(
const
CL_Colorf
&color);
158
160
void
set_blend_equation(
CL_BlendEquation
color,
CL_BlendEquation
alpha);
161
163
void
set_blend_function(
CL_BlendFunc
src,
CL_BlendFunc
dest,
CL_BlendFunc
src_alpha,
CL_BlendFunc
dest_alpha);
164
168
169
private
:
170
CL_SharedPtr<CL_BlendMode_Impl> impl;
172
};
173
Generated on Fri Jun 14 2013 13:05:44 for ClanLib by
1.8.4