ClanLib
2.3.7
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Sources
API
GL1
texture_unit.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
** Magnus Norddahl
27
*/
28
31
32
#pragma once
33
34
#include "
api_gl1.h
"
35
#include "../Core/System/sharedptr.h"
36
37
class
CL_TextureUnit_GL1_Impl;
38
class
CL_Colorf
;
39
43
enum
CL_TextureUnitMode
44
{
45
cl_unitmode_replace
,
46
cl_unitmode_modulate
,
47
cl_unitmode_decal
,
48
cl_unitmode_blend
,
49
cl_unitmode_add
,
50
cl_unitmode_combine
51
};
52
56
enum
CL_TextureUnitRGBMode
57
{
58
cl_combinemode_rgb_replace
,
59
cl_combinemode_rgb_modulate
,
60
cl_combinemode_rgb_add
,
61
cl_combinemode_rgb_add_signed
,
62
cl_combinemode_rgb_interpolate
,
63
cl_combinemode_rgb_subtract
,
64
cl_combinemode_rgb_dot3_rgb
,
65
cl_combinemode_rgb_dot3_rgba
66
};
67
71
enum
CL_TextureUnitAlphaMode
72
{
73
cl_combinemode_alpha_replace
,
74
cl_combinemode_alpha_modulate
,
75
cl_combinemode_alpha_add
,
76
cl_combinemode_alpha_add_signed
,
77
cl_combinemode_alpha_interpolate
,
78
cl_combinemode_alpha_subtract
79
};
80
84
enum
CL_TextureUnitSource
85
{
86
cl_source_texture
,
87
cl_source_texture0
,
88
cl_source_texture1
,
89
cl_source_texture2
,
90
cl_source_texture3
,
91
cl_source_texture4
,
92
cl_source_texture5
,
93
cl_source_texture6
,
94
cl_source_texture7
,
95
cl_source_texture8
,
96
cl_source_texture9
,
97
cl_source_texture10
,
98
cl_source_texture11
,
99
cl_source_texture12
,
100
cl_source_texture13
,
101
cl_source_texture14
,
102
cl_source_texture15
,
103
cl_source_constant
,
104
cl_source_primary_color
,
105
cl_source_previous
106
};
107
111
enum
CL_TextureUnitRGBOperand
112
{
113
cl_rgb_operand_src_color
,
114
cl_rgb_operand_one_minus_src_color
,
115
cl_rgb_operand_src_alpha
,
116
cl_rgb_operand_one_minus_src_alpha
117
};
118
122
enum
CL_TextureUnitAlphaOperand
123
{
124
cl_alpha_operand_src_alpha
,
125
cl_alpha_operand_one_minus_src_alpha
126
};
127
128
class
CL_Color
;
129
133
class
CL_API_GL1
CL_TextureUnit_GL1
134
{
136
public
:
138
CL_TextureUnit_GL1
();
139
140
~
CL_TextureUnit_GL1
();
141
143
public
:
145
double
get_lod_bias()
const
;
146
148
CL_Colorf
get_color()
const
;
149
151
CL_TextureUnitMode
get_mode()
const
;
152
155
CL_TextureUnitRGBMode
get_combine_rgb_mode()
const
;
156
159
CL_TextureUnitAlphaMode
get_combine_alpha_mode()
const
;
160
162
CL_TextureUnitSource
get_combine_arg_src_rgb(
int
arg)
const
;
163
165
CL_TextureUnitRGBOperand
get_combine_arg_operand_rgb(
int
arg)
const
;
166
168
CL_TextureUnitSource
get_combine_arg_src_alpha(
int
arg)
const
;
169
171
CL_TextureUnitAlphaOperand
get_combine_arg_operand_alpha(
int
arg)
const
;
172
174
bool
get_point_coord_replace()
const
;
175
177
public
:
179
void
set_lod_bias(
double
bias);
180
182
void
set_color(
const
CL_Colorf
&color);
183
185
void
set_mode(
CL_TextureUnitMode
mode);
186
189
void
set_combine_mode(
CL_TextureUnitRGBMode
rgb_mode,
CL_TextureUnitAlphaMode
alpha_mode);
190
192
void
set_combine_arg(
193
int
arg,
194
CL_TextureUnitSource
src_rgb,
195
CL_TextureUnitRGBOperand
operand_rgb,
196
CL_TextureUnitSource
src_alpha,
197
CL_TextureUnitAlphaOperand
operand_alpha);
198
200
void
set_combine_rgb_arg(
int
arg,
CL_TextureUnitSource
src_rgb,
CL_TextureUnitRGBOperand
operand_rgb);
201
203
void
set_combine_alpha_arg(
int
arg,
CL_TextureUnitSource
src_alpha,
CL_TextureUnitAlphaOperand
operand_alpha);
204
206
void
set_point_coord_replace(
bool
enable);
207
209
private
:
210
CL_SharedPtr<CL_TextureUnit_GL1_Impl> impl;
211
};
212
Generated on Fri Jun 14 2013 13:05:47 for ClanLib by
1.8.4