ClanLib
2.3.7
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Sources
API
Display
TargetProviders
program_object_provider.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 <vector>
35
class
CL_ProgramAttribute
;
36
class
CL_ProgramUniform
;
37
class
CL_ShaderObject
;
38
42
class
CL_ProgramObjectProvider
43
{
46
47
public
:
48
virtual
~CL_ProgramObjectProvider
()
49
{
50
}
51
53
virtual
void
destroy
()=0;
54
58
59
public
:
61
virtual
unsigned
int
get_handle
()
const
=0;
62
64
virtual
bool
get_link_status
()
const
=0;
65
67
virtual
bool
get_validate_status
()
const
=0;
68
70
virtual
CL_String
get_info_log
()
const
=0;
71
73
virtual
int
get_attribute_count
()
const
=0;
74
76
virtual
std::vector<CL_ShaderObject>
get_shaders
()
const
=0;
77
79
virtual
std::vector<CL_ProgramAttribute>
get_attributes
()
const
=0;
80
82
virtual
int
get_attribute_location
(
const
CL_StringRef
&name)
const
=0;
83
85
virtual
int
get_uniform_count
()
const
=0;
86
88
virtual
std::vector<CL_ProgramUniform>
get_uniforms
()
const
=0;
89
91
virtual
int
get_uniform_location
(
const
CL_StringRef
&name)
const
=0;
92
96
97
public
:
99
virtual
void
attach
(
const
CL_ShaderObject
&obj)=0;
100
102
virtual
void
detach
(
const
CL_ShaderObject
&obj)=0;
103
105
106
virtual
void
bind_attribute_location
(
int
index,
const
CL_StringRef
&name)=0;
107
109
110
virtual
void
bind_frag_data_location
(
int
color_number,
const
CL_StringRef
&name)=0;
111
113
115
virtual
void
link
()=0;
116
118
120
virtual
void
validate
()=0;
121
123
virtual
void
set_uniform1i
(
const
CL_StringRef
&name,
int
)=0;
124
129
virtual
void
set_uniform2i
(
const
CL_StringRef
&name,
int
,
int
)=0;
130
virtual
void
set_uniform3i
(
const
CL_StringRef
&name,
int
,
int
,
int
)=0;
131
137
virtual
void
set_uniform4i
(
const
CL_StringRef
&name,
int
,
int
,
int
,
int
)=0;
138
145
virtual
void
set_uniformiv
(
const
CL_StringRef
&name,
int
size,
int
count,
int
*data)=0;
146
virtual
void
set_uniform1f
(
const
CL_StringRef
&name,
float
)=0;
147
152
virtual
void
set_uniform2f
(
const
CL_StringRef
&name,
float
,
float
)=0;
153
virtual
void
set_uniform3f
(
const
CL_StringRef
&name,
float
,
float
,
float
)=0;
154
160
virtual
void
set_uniform4f
(
const
CL_StringRef
&name,
float
,
float
,
float
,
float
)=0;
161
168
virtual
void
set_uniformfv
(
const
CL_StringRef
&name,
int
size,
int
count,
float
*data)=0;
169
171
virtual
void
set_uniform_matrix
(
const
CL_StringRef
&name,
int
size,
int
count,
bool
transpose,
float
*data)=0;
172
176
177
private
:
178
180
};
181
Generated on Fri Jun 14 2013 13:05:46 for ClanLib by
1.8.4