ClanLib  2.3.7
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 
44 {
51 };
52 
57 {
66 };
67 
72 {
79 };
80 
85 {
106 };
107 
112 {
117 };
118 
123 {
126 };
127 
128 class CL_Color;
129 
134 {
136 public:
139 
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