1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreGpuProgram.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
4 | <link type="text/css" rel="stylesheet" href="style.css"> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | <!-- Generated by Doxygen 1.3.6 --> |
---|
9 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreGpuProgram.h</h1><a href="OgreGpuProgram_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://ogre.sourceforge.net/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="preprocessor">#ifndef __GpuProgram_H_</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __GpuProgram_H_</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="comment">// Precompiler options</span> |
---|
38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreResource_8h.html">OgreResource.h</a>"</span> |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreSharedPtr_8h.html">OgreSharedPtr.h</a>"</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreIteratorWrappers_8h.html">OgreIteratorWrappers.h</a>"</span> |
---|
42 | 00033 |
---|
43 | 00034 <span class="keyword">namespace </span>Ogre { |
---|
44 | 00035 |
---|
45 | <a name="l00037"></a><a class="code" href="namespaceOgre.html#a658">00037</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a658">GpuProgramType</a> |
---|
46 | 00038 { |
---|
47 | 00039 <a class="code" href="namespaceOgre.html#a658a165">GPT_VERTEX_PROGRAM</a>, |
---|
48 | 00040 <a class="code" href="namespaceOgre.html#a658a166">GPT_FRAGMENT_PROGRAM</a> |
---|
49 | 00041 }; |
---|
50 | 00042 |
---|
51 | 00043 |
---|
52 | <a name="l00055"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html">00055</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> GpuProgramParameters |
---|
53 | 00056 { |
---|
54 | 00057 <span class="keyword">public</span>: |
---|
55 | <a name="l00061"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersw86">00061</a> <span class="keyword">enum</span> AutoConstantType |
---|
56 | 00062 { |
---|
57 | 00064 ACT_WORLD_MATRIX, |
---|
58 | 00066 ACT_INVERSE_WORLD_MATRIX, |
---|
59 | 00070 ACT_TRANSPOSE_WORLD_MATRIX, |
---|
60 | 00072 ACT_INVERSE_TRANSPOSE_WORLD_MATRIX, |
---|
61 | 00073 |
---|
62 | 00074 |
---|
63 | 00076 ACT_WORLD_MATRIX_ARRAY_3x4, |
---|
64 | 00078 ACT_WORLD_MATRIX_ARRAY, |
---|
65 | 00079 |
---|
66 | 00080 |
---|
67 | 00082 ACT_VIEW_MATRIX, |
---|
68 | 00084 ACT_INVERSE_VIEW_MATRIX, |
---|
69 | 00088 ACT_TRANSPOSE_VIEW_MATRIX, |
---|
70 | 00092 ACT_INVERSE_TRANSPOSE_VIEW_MATRIX, |
---|
71 | 00093 |
---|
72 | 00094 |
---|
73 | 00096 ACT_PROJECTION_MATRIX, |
---|
74 | 00100 ACT_INVERSE_PROJECTION_MATRIX, |
---|
75 | 00104 ACT_TRANSPOSE_PROJECTION_MATRIX, |
---|
76 | 00108 ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX, |
---|
77 | 00109 |
---|
78 | 00110 |
---|
79 | 00112 ACT_VIEWPROJ_MATRIX, |
---|
80 | 00116 ACT_INVERSE_VIEWPROJ_MATRIX, |
---|
81 | 00120 ACT_TRANSPOSE_VIEWPROJ_MATRIX, |
---|
82 | 00124 ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX, |
---|
83 | 00125 |
---|
84 | 00126 |
---|
85 | 00128 ACT_WORLDVIEW_MATRIX, |
---|
86 | 00130 ACT_INVERSE_WORLDVIEW_MATRIX, |
---|
87 | 00134 ACT_TRANSPOSE_WORLDVIEW_MATRIX, |
---|
88 | 00136 ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX, |
---|
89 | 00138 |
---|
90 | 00139 |
---|
91 | 00141 ACT_WORLDVIEWPROJ_MATRIX, |
---|
92 | 00145 ACT_INVERSE_WORLDVIEWPROJ_MATRIX, |
---|
93 | 00149 ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX, |
---|
94 | 00153 ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX, |
---|
95 | 00154 |
---|
96 | 00155 |
---|
97 | 00157 |
---|
98 | 00160 ACT_RENDER_TARGET_FLIPPING, |
---|
99 | 00161 |
---|
100 | 00162 |
---|
101 | 00164 ACT_FOG_COLOUR, |
---|
102 | 00166 ACT_FOG_PARAMS, |
---|
103 | 00167 |
---|
104 | 00168 |
---|
105 | 00170 ACT_AMBIENT_LIGHT_COLOUR, |
---|
106 | 00171 |
---|
107 | 00173 ACT_LIGHT_DIFFUSE_COLOUR, |
---|
108 | 00175 ACT_LIGHT_SPECULAR_COLOUR, |
---|
109 | 00177 ACT_LIGHT_ATTENUATION, |
---|
110 | 00179 ACT_LIGHT_POSITION, |
---|
111 | 00181 ACT_LIGHT_POSITION_OBJECT_SPACE, |
---|
112 | 00183 ACT_LIGHT_POSITION_VIEW_SPACE, |
---|
113 | 00185 ACT_LIGHT_DIRECTION, |
---|
114 | 00187 ACT_LIGHT_DIRECTION_OBJECT_SPACE, |
---|
115 | 00189 ACT_LIGHT_DIRECTION_VIEW_SPACE, |
---|
116 | 00194 ACT_LIGHT_DISTANCE_OBJECT_SPACE, |
---|
117 | 00196 ACT_LIGHT_POWER_SCALE, |
---|
118 | 00200 ACT_SHADOW_EXTRUSION_DISTANCE, |
---|
119 | 00202 ACT_CAMERA_POSITION, |
---|
120 | 00204 ACT_CAMERA_POSITION_OBJECT_SPACE, |
---|
121 | 00206 ACT_TEXTURE_VIEWPROJ_MATRIX, |
---|
122 | 00208 ACT_CUSTOM, |
---|
123 | 00211 ACT_TIME, |
---|
124 | 00215 ACT_TIME_0_X, |
---|
125 | 00217 ACT_COSTIME_0_X, |
---|
126 | 00219 ACT_SINTIME_0_X, |
---|
127 | 00221 ACT_TANTIME_0_X, |
---|
128 | 00225 ACT_TIME_0_X_PACKED, |
---|
129 | 00230 ACT_TIME_0_1, |
---|
130 | 00232 ACT_COSTIME_0_1, |
---|
131 | 00234 ACT_SINTIME_0_1, |
---|
132 | 00236 ACT_TANTIME_0_1, |
---|
133 | 00240 ACT_TIME_0_1_PACKED, |
---|
134 | 00245 ACT_TIME_0_2PI, |
---|
135 | 00247 ACT_COSTIME_0_2PI, |
---|
136 | 00249 ACT_SINTIME_0_2PI, |
---|
137 | 00251 ACT_TANTIME_0_2PI, |
---|
138 | 00255 ACT_TIME_0_2PI_PACKED, |
---|
139 | 00257 ACT_FRAME_TIME, |
---|
140 | 00259 ACT_FPS, |
---|
141 | 00261 |
---|
142 | 00264 ACT_VIEWPORT_WIDTH, |
---|
143 | 00268 ACT_VIEWPORT_HEIGHT, |
---|
144 | 00272 ACT_INVERSE_VIEWPORT_WIDTH, |
---|
145 | 00276 ACT_INVERSE_VIEWPORT_HEIGHT, |
---|
146 | 00280 ACT_VIEWPORT_SIZE, |
---|
147 | 00281 |
---|
148 | 00283 |
---|
149 | 00286 ACT_VIEW_DIRECTION, |
---|
150 | 00290 ACT_VIEW_SIDE_VECTOR, |
---|
151 | 00294 ACT_VIEW_UP_VECTOR, |
---|
152 | 00298 ACT_FOV, |
---|
153 | 00302 ACT_NEAR_CLIP_DISTANCE, |
---|
154 | 00306 ACT_FAR_CLIP_DISTANCE, |
---|
155 | 00307 |
---|
156 | 00311 ACT_PASS_NUMBER, |
---|
157 | 00312 |
---|
158 | 00317 ACT_PASS_ITERATION_NUMBER, |
---|
159 | 00318 |
---|
160 | 00319 |
---|
161 | 00323 ACT_ANIMATION_PARAMETRIC, |
---|
162 | 00324 |
---|
163 | 00325 }; |
---|
164 | 00326 |
---|
165 | <a name="l00330"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersw87">00330</a> <span class="keyword">enum</span> ACDataType { |
---|
166 | 00332 ACDT_NONE, |
---|
167 | 00334 ACDT_INT, |
---|
168 | 00336 ACDT_REAL |
---|
169 | 00337 }; |
---|
170 | 00338 |
---|
171 | <a name="l00341"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersw88">00341</a> <span class="keyword">enum</span> ElementType { |
---|
172 | 00342 ET_INT, |
---|
173 | 00343 ET_REAL |
---|
174 | 00344 }; |
---|
175 | 00345 |
---|
176 | <a name="l00346"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html">00346</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html">AutoConstantDefinition</a> |
---|
177 | 00347 { |
---|
178 | <a name="l00348"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantDefinitiono0">00348</a> AutoConstantType acType; |
---|
179 | <a name="l00349"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantDefinitiono1">00349</a> <a class="code" href="namespaceOgre.html#a471">String</a> name; |
---|
180 | <a name="l00350"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantDefinitiono2">00350</a> size_t elementCount; |
---|
181 | <a name="l00352"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantDefinitiono3">00352</a> ElementType elementType; |
---|
182 | <a name="l00354"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantDefinitiono4">00354</a> ACDataType dataType; |
---|
183 | 00355 |
---|
184 | <a name="l00356"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantDefinitiona0">00356</a> <a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html">AutoConstantDefinition</a>(AutoConstantType _acType, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& _name, |
---|
185 | 00357 size_t _elementCount, ElementType _elementType, |
---|
186 | 00358 ACDataType _dataType) |
---|
187 | 00359 :acType(_acType), name(_name), elementCount(_elementCount), |
---|
188 | 00360 elementType(_elementType), dataType(_dataType) |
---|
189 | 00361 { |
---|
190 | 00362 |
---|
191 | 00363 } |
---|
192 | 00364 }; |
---|
193 | 00365 |
---|
194 | <a name="l00367"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html">00367</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a17">_OgrePrivate</a> AutoConstantEntry |
---|
195 | 00368 { |
---|
196 | 00369 <span class="keyword">public</span>: |
---|
197 | <a name="l00371"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantEntryo0">00371</a> AutoConstantType paramType; |
---|
198 | <a name="l00373"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantEntryo1">00373</a> size_t index; |
---|
199 | 00375 <span class="keyword">union</span>{ |
---|
200 | <a name="l00376"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantEntryo2">00376</a> size_t data; |
---|
201 | <a name="l00377"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantEntryo3">00377</a> <a class="code" href="namespaceOgre.html#a465">Real</a> fData; |
---|
202 | 00378 }; |
---|
203 | 00379 |
---|
204 | <a name="l00380"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantEntrya0">00380</a> AutoConstantEntry(AutoConstantType theType, size_t theIndex, size_t theData) |
---|
205 | 00381 : paramType(theType), index(theIndex), data(theData) {} |
---|
206 | 00382 |
---|
207 | <a name="l00383"></a><a class="code" href="classOgre_1_1GpuProgramParameters_1_1AutoConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1AutoConstantEntrya1">00383</a> AutoConstantEntry(AutoConstantType theType, size_t theIndex, <a class="code" href="namespaceOgre.html#a465">Real</a> theData) |
---|
208 | 00384 : paramType(theType), index(theIndex), fData(theData) {} |
---|
209 | 00385 |
---|
210 | 00386 }; |
---|
211 | <a name="l00391"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html">00391</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html">RealConstantEntry</a> |
---|
212 | 00392 { |
---|
213 | <a name="l00393"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1RealConstantEntryo0">00393</a> <span class="keywordtype">float</span> val[4]; |
---|
214 | <a name="l00394"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1RealConstantEntryo1">00394</a> <span class="keywordtype">bool</span> isSet; |
---|
215 | <a name="l00395"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1RealConstantEntrya0">00395</a> <a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html">RealConstantEntry</a>() : isSet(false) {} |
---|
216 | 00396 }; |
---|
217 | <a name="l00401"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html">00401</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html">IntConstantEntry</a> |
---|
218 | 00402 { |
---|
219 | <a name="l00403"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1IntConstantEntryo0">00403</a> <span class="keywordtype">int</span> val[4]; |
---|
220 | <a name="l00404"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1IntConstantEntryo1">00404</a> <span class="keywordtype">bool</span> isSet; |
---|
221 | <a name="l00405"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html#Ogre_1_1GpuProgramParameters_1_1IntConstantEntrya0">00405</a> <a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html">IntConstantEntry</a>() : isSet(false) {} |
---|
222 | 00406 }; |
---|
223 | 00407 |
---|
224 | 00408 <span class="comment">// nfz</span> |
---|
225 | <a name="l00413"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html">00413</a> <span class="comment"></span> <span class="keyword">struct </span><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html">ConstantDefinition</a> |
---|
226 | 00414 { |
---|
227 | <a name="l00415"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono0">00415</a> <a class="code" href="namespaceOgre.html#a471">String</a> name; |
---|
228 | <a name="l00416"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono1">00416</a> size_t entryIndex; |
---|
229 | <a name="l00417"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono2">00417</a> size_t elementCount; |
---|
230 | <a name="l00418"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono3">00418</a> size_t arraySize; |
---|
231 | <a name="l00419"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono4">00419</a> ElementType elementType; |
---|
232 | <a name="l00420"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono5">00420</a> size_t autoIndex; |
---|
233 | <a name="l00421"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono6">00421</a> <span class="keywordtype">bool</span> isAllocated; |
---|
234 | <a name="l00422"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiono7">00422</a> <span class="keywordtype">bool</span> isAuto; |
---|
235 | 00423 |
---|
236 | <a name="l00424"></a><a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html#Ogre_1_1GpuProgramParameters_1_1ConstantDefinitiona0">00424</a> <a class="code" href="structOgre_1_1GpuProgramParameters_1_1ConstantDefinition.html">ConstantDefinition</a>() |
---|
237 | 00425 : entryIndex(0) |
---|
238 | 00426 , elementCount(0) |
---|
239 | 00427 , arraySize(1) |
---|
240 | 00428 , elementType(ET_INT) |
---|
241 | 00429 , autoIndex(0) |
---|
242 | 00430 , isAllocated(false) |
---|
243 | 00431 , isAuto(false) |
---|
244 | 00432 {} |
---|
245 | 00433 |
---|
246 | 00434 }; |
---|
247 | 00435 |
---|
248 | 00436 <span class="keyword">protected</span>: |
---|
249 | <a name="l00437"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParameterst0">00437</a> <span class="keyword">static</span> <a class="code" href="structOgre_1_1GpuProgramParameters_1_1AutoConstantDefinition.html">AutoConstantDefinition</a> AutoConstantDictionary[]; |
---|
250 | 00438 <span class="comment">// Constant lists</span> |
---|
251 | <a name="l00439"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx0">00439</a> <span class="keyword">typedef</span> std::vector<RealConstantEntry> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx0">RealConstantList</a>; |
---|
252 | <a name="l00440"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx1">00440</a> <span class="keyword">typedef</span> std::vector<IntConstantEntry> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx1">IntConstantList</a>; |
---|
253 | 00441 <span class="comment">// Auto parameter storage</span> |
---|
254 | <a name="l00442"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx2">00442</a> <span class="keyword">typedef</span> std::vector<AutoConstantEntry> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx2">AutoConstantList</a>; |
---|
255 | 00443 <span class="comment">// parameter dictionary container</span> |
---|
256 | <a name="l00444"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx3">00444</a> <span class="keyword">typedef</span> std::vector<ConstantDefinition> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx3">ConstantDefinitionContainer</a>; |
---|
257 | <a name="l00446"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp0">00446</a> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx0">RealConstantList</a> mRealConstants; |
---|
258 | <a name="l00448"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp1">00448</a> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx1">IntConstantList</a> mIntConstants; |
---|
259 | <a name="l00450"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp2">00450</a> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx2">AutoConstantList</a> mAutoConstants; |
---|
260 | <a name="l00452"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp3">00452</a> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx3">ConstantDefinitionContainer</a> mConstantDefinitions; |
---|
261 | <a name="l00454"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx4">00454</a> <span class="keyword">typedef</span> std::map<String, size_t> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx4">ParamNameMap</a>; |
---|
262 | <a name="l00455"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp4">00455</a> <a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersx4">ParamNameMap</a> mParamNameMap; |
---|
263 | <a name="l00457"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp5">00457</a> <span class="keywordtype">bool</span> mTransposeMatrices; |
---|
264 | <a name="l00459"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp6">00459</a> <span class="keywordtype">bool</span> mAutoAddParamName; |
---|
265 | <a name="l00461"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp7">00461</a> <a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html">RealConstantEntry</a>* mActivePassIterationEntry; |
---|
266 | <a name="l00463"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersp8">00463</a> size_t mActivePassIterationEntryIndex; |
---|
267 | 00464 |
---|
268 | 00465 |
---|
269 | 00466 <span class="keyword">public</span>: |
---|
270 | 00467 GpuProgramParameters(); |
---|
271 | <a name="l00468"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa1">00468</a> ~GpuProgramParameters() {} |
---|
272 | 00469 |
---|
273 | 00471 GpuProgramParameters(<span class="keyword">const</span> GpuProgramParameters& oth); |
---|
274 | 00473 GpuProgramParameters& operator=(<span class="keyword">const</span> GpuProgramParameters& oth); |
---|
275 | 00474 |
---|
276 | 00475 |
---|
277 | 00481 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector4.html">Vector4</a>& vec); |
---|
278 | 00489 <span class="keywordtype">void</span> setConstant(size_t index, <a class="code" href="namespaceOgre.html#a465">Real</a> val); |
---|
279 | 00497 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& vec); |
---|
280 | 00504 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a>& m); |
---|
281 | 00512 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a>* m, size_t numEntries); |
---|
282 | 00519 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <span class="keywordtype">float</span> *val, size_t count); |
---|
283 | 00526 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <span class="keywordtype">double</span> *val, size_t count); |
---|
284 | 00532 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour); |
---|
285 | 00533 |
---|
286 | 00548 <span class="keywordtype">void</span> setConstant(size_t index, <span class="keyword">const</span> <span class="keywordtype">int</span> *val, size_t count); |
---|
287 | 00549 |
---|
288 | <a name="l00551"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa13">00551</a> <span class="keywordtype">void</span> resetRealConstants(<span class="keywordtype">void</span>) { mRealConstants.clear(); } |
---|
289 | <a name="l00553"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa14">00553</a> <span class="keywordtype">void</span> resetIntConstants(<span class="keywordtype">void</span>) { mIntConstants.clear(); } |
---|
290 | 00554 |
---|
291 | <a name="l00555"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersw0">00555</a> <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1ConstVectorIterator.html">ConstVectorIterator<RealConstantList></a> <a class="code" href="classOgre_1_1ConstVectorIterator.html">RealConstantIterator</a>; |
---|
292 | <a name="l00556"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersw1">00556</a> <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1ConstVectorIterator.html">ConstVectorIterator<IntConstantList></a> <a class="code" href="classOgre_1_1ConstVectorIterator.html">IntConstantIterator</a>; |
---|
293 | 00558 <a class="code" href="classOgre_1_1ConstVectorIterator.html">RealConstantIterator</a> getRealConstantIterator(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
294 | 00560 <a class="code" href="classOgre_1_1ConstVectorIterator.html">IntConstantIterator</a> getIntConstantIterator(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
295 | 00561 |
---|
296 | 00566 <a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html">RealConstantEntry</a>* getRealConstantEntry(<span class="keyword">const</span> size_t index); |
---|
297 | 00571 <a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html">IntConstantEntry</a>* getIntConstantEntry(<span class="keyword">const</span> size_t index); |
---|
298 | 00572 |
---|
299 | 00576 <a class="code" href="structOgre_1_1GpuProgramParameters_1_1RealConstantEntry.html">RealConstantEntry</a>* getNamedRealConstantEntry(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name); |
---|
300 | 00580 <a class="code" href="structOgre_1_1GpuProgramParameters_1_1IntConstantEntry.html">IntConstantEntry</a>* getNamedIntConstantEntry(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name); |
---|
301 | <a name="l00582"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa21">00582</a> size_t getRealConstantCount(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mRealConstants.size(); } |
---|
302 | <a name="l00584"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa22">00584</a> size_t getIntConstantCount(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mIntConstants.size(); } |
---|
303 | <a name="l00586"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa23">00586</a> <span class="keywordtype">bool</span> hasRealConstantParams(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(mRealConstants.empty()); } |
---|
304 | <a name="l00588"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa24">00588</a> <span class="keywordtype">bool</span> hasIntConstantParams(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(mIntConstants.empty()); } |
---|
305 | 00589 |
---|
306 | 00603 <span class="keywordtype">void</span> setAutoConstant(size_t index, AutoConstantType acType, size_t extraInfo = 0); |
---|
307 | 00604 <span class="keywordtype">void</span> setAutoConstantReal(size_t index, AutoConstantType acType, <a class="code" href="namespaceOgre.html#a465">Real</a> rData); |
---|
308 | 00609 <span class="keywordtype">void</span> setConstantFromTime(size_t index, <a class="code" href="namespaceOgre.html#a465">Real</a> factor); |
---|
309 | 00610 |
---|
310 | 00612 <span class="keywordtype">void</span> clearAutoConstants(<span class="keywordtype">void</span>); |
---|
311 | <a name="l00613"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersw2">00613</a> <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1ConstVectorIterator.html">ConstVectorIterator<AutoConstantList></a> <a class="code" href="classOgre_1_1ConstVectorIterator.html">AutoConstantIterator</a>; |
---|
312 | 00615 <a class="code" href="classOgre_1_1ConstVectorIterator.html">AutoConstantIterator</a> getAutoConstantIterator(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
313 | <a name="l00617"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa30">00617</a> size_t getAutoConstantCount(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mAutoConstants.size(); } |
---|
314 | 00622 AutoConstantEntry* getAutoConstantEntry(<span class="keyword">const</span> size_t index); |
---|
315 | <a name="l00624"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa32">00624</a> <span class="keywordtype">bool</span> hasAutoConstants(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(mAutoConstants.empty()); } |
---|
316 | 00626 <span class="keywordtype">void</span> _updateAutoParamsNoLights(<span class="keyword">const</span> <a class="code" href="classOgre_1_1AutoParamDataSource.html">AutoParamDataSource</a>& source); |
---|
317 | 00628 <span class="keywordtype">void</span> _updateAutoParamsLightsOnly(<span class="keyword">const</span> <a class="code" href="classOgre_1_1AutoParamDataSource.html">AutoParamDataSource</a>& source); |
---|
318 | 00629 |
---|
319 | <a name="l00641"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa35">00641</a> <span class="keywordtype">void</span> setAutoAddParamName(<span class="keywordtype">bool</span> state) { mAutoAddParamName = state; } |
---|
320 | 00642 |
---|
321 | 00662 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <a class="code" href="namespaceOgre.html#a465">Real</a> val); |
---|
322 | 00682 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keywordtype">int</span> val); |
---|
323 | 00687 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector4.html">Vector4</a>& vec); |
---|
324 | 00700 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& vec); |
---|
325 | 00705 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a>& m); |
---|
326 | 00713 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a>* m, size_t numEntries); |
---|
327 | 00734 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <span class="keywordtype">float</span> *val, size_t count); |
---|
328 | 00755 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <span class="keywordtype">double</span> *val, size_t count); |
---|
329 | 00760 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>& colour); |
---|
330 | 00761 |
---|
331 | 00782 <span class="keywordtype">void</span> setNamedConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> <span class="keywordtype">int</span> *val, size_t count); |
---|
332 | 00783 |
---|
333 | 00798 <span class="keywordtype">void</span> setNamedAutoConstant(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, AutoConstantType acType, size_t extraInfo = 0); |
---|
334 | 00799 |
---|
335 | 00807 <span class="keywordtype">void</span> setNamedConstantFromTime(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <a class="code" href="namespaceOgre.html#a465">Real</a> factor); |
---|
336 | 00809 <span class="keywordtype">void</span> _mapParameterNameToIndex(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> size_t index ); |
---|
337 | 00810 |
---|
338 | 00812 size_t getParamIndex(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name); |
---|
339 | 00813 |
---|
340 | 00814 |
---|
341 | <a name="l00822"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa50">00822</a> <span class="keywordtype">void</span> setTransposeMatrices(<span class="keywordtype">bool</span> val) { mTransposeMatrices = val; } |
---|
342 | <a name="l00824"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa51">00824</a> <span class="keywordtype">bool</span> getTransposeMatrices(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mTransposeMatrices; } |
---|
343 | 00825 |
---|
344 | 00829 <span class="keywordtype">void</span> copyConstantsFrom(<span class="keyword">const</span> GpuProgramParameters& source); |
---|
345 | 00830 |
---|
346 | 00843 size_t addConstantDefinition(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <span class="keyword">const</span> size_t index, |
---|
347 | 00844 <span class="keyword">const</span> size_t elementCount, <span class="keyword">const</span> ElementType elementType); |
---|
348 | 00845 |
---|
349 | 00849 <span class="keyword">const</span> ConstantDefinition* getConstantDefinition(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name) <span class="keyword">const</span>; |
---|
350 | 00854 <span class="keyword">const</span> ConstantDefinition* getConstantDefinition(<span class="keyword">const</span> size_t idx) <span class="keyword">const</span>; |
---|
351 | 00858 <span class="keyword">const</span> ConstantDefinition* findMatchingConstantDefinition(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, |
---|
352 | 00859 <span class="keyword">const</span> size_t entryIndex, <span class="keyword">const</span> ElementType elementType) <span class="keyword">const</span>; |
---|
353 | 00860 |
---|
354 | <a name="l00863"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa57">00863</a> size_t getNumConstantDefinitions(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mConstantDefinitions.size(); } |
---|
355 | 00869 <span class="keywordtype">void</span> setConstantDefinitionAutoState( <span class="keyword">const</span> size_t index, |
---|
356 | 00870 <span class="keyword">const</span> <span class="keywordtype">bool</span> isAuto, <span class="keyword">const</span> size_t autoIndex ); |
---|
357 | 00874 <span class="keyword">static</span> <span class="keyword">const</span> AutoConstantDefinition* getAutoConstantDefinition(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name); |
---|
358 | 00879 <span class="keyword">static</span> <span class="keyword">const</span> AutoConstantDefinition* getAutoConstantDefinition(<span class="keyword">const</span> size_t idx); |
---|
359 | 00882 <span class="keyword">static</span> size_t getNumAutoConstantDefinitions(<span class="keywordtype">void</span>); |
---|
360 | 00885 <span class="keywordtype">void</span> incPassIterationNumber(<span class="keywordtype">void</span>); |
---|
361 | 00889 RealConstantEntry* getPassIterationEntry(<span class="keywordtype">void</span>); |
---|
362 | <a name="l00893"></a><a class="code" href="classOgre_1_1GpuProgramParameters.html#Ogre_1_1GpuProgramParametersa61">00893</a> size_t getPassIterationEntryIndex(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mActivePassIterationEntryIndex; } |
---|
363 | 00894 }; |
---|
364 | <a name="l00895"></a><a class="code" href="namespaceOgre.html#a164">00895</a> |
---|
365 | 00897 <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr<GpuProgramParameters></a> <a class="code" href="classOgre_1_1SharedPtr.html">GpuProgramParametersSharedPtr</a>; |
---|
366 | 00898 |
---|
367 | 00899 <span class="comment">// Forward declaration </span> |
---|
368 | 00900 <span class="keyword">class </span><a class="code" href="classOgre_1_1GpuProgramPtr.html">GpuProgramPtr</a>; |
---|
369 | 00901 |
---|
370 | 00911 <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> GpuProgram : <span class="keyword">public</span> <a class="code" href="classOgre_1_1Resource.html">Resource</a> |
---|
371 | 00912 { |
---|
372 | <a name="l00913"></a><a class="code" href="classOgre_1_1GpuProgram_1_1CmdType.html">00913</a> <span class="keyword">protected</span>: |
---|
373 | 00915 <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdType : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
374 | 00916 { |
---|
375 | 00917 <span class="keyword">public</span>: |
---|
376 | 00918 <a class="code" href="namespaceOgre.html#a471">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
377 | <a name="l00919"></a><a class="code" href="classOgre_1_1GpuProgram_1_1CmdSyntax.html">00919</a> <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& val); |
---|
378 | 00920 }; |
---|
379 | 00921 <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdSyntax : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
380 | 00922 { |
---|
381 | 00923 <span class="keyword">public</span>: |
---|
382 | 00924 <a class="code" href="namespaceOgre.html#a471">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
383 | <a name="l00925"></a><a class="code" href="classOgre_1_1GpuProgram_1_1CmdSkeletal.html">00925</a> <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& val); |
---|
384 | 00926 }; |
---|
385 | 00927 <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> CmdSkeletal : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ParamCommand.html">ParamCommand</a> |
---|
386 | 00928 { |
---|
387 | 00929 <span class="keyword">public</span>: |
---|
388 | 00930 <a class="code" href="namespaceOgre.html#a471">String</a> doGet(<span class="keyword">const</span> <span class="keywordtype">void</span>* target) <span class="keyword">const</span>; |
---|
389 | 00931 <span class="keywordtype">void</span> doSet(<span class="keywordtype">void</span>* target, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& val); |
---|
390 | <a name="l00932"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramt0">00932</a> }; |
---|
391 | <a name="l00933"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramt1">00933</a> <span class="comment">// Command object for setting / getting parameters</span> |
---|
392 | <a name="l00934"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramt2">00934</a> <span class="keyword">static</span> CmdType msTypeCmd; |
---|
393 | 00935 <span class="keyword">static</span> CmdSyntax msSyntaxCmd; |
---|
394 | 00936 <span class="keyword">static</span> CmdSkeletal msSkeletalCmd; |
---|
395 | <a name="l00937"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp2">00937</a> |
---|
396 | <a name="l00939"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp3">00939</a> <a class="code" href="namespaceOgre.html#a658">GpuProgramType</a> mType; |
---|
397 | <a name="l00941"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp4">00941</a> <a class="code" href="namespaceOgre.html#a471">String</a> mFilename; |
---|
398 | <a name="l00943"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp5">00943</a> <a class="code" href="namespaceOgre.html#a471">String</a> mSource; |
---|
399 | <a name="l00945"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp6">00945</a> <span class="keywordtype">bool</span> mLoadFromFile; |
---|
400 | <a name="l00947"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp7">00947</a> <a class="code" href="namespaceOgre.html#a471">String</a> mSyntaxCode; |
---|
401 | <a name="l00949"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp8">00949</a> <span class="keywordtype">bool</span> mSkeletalAnimation; |
---|
402 | <a name="l00951"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp9">00951</a> <span class="keywordtype">bool</span> mMorphAnimation; |
---|
403 | <a name="l00953"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp10">00953</a> <a class="code" href="namespaceOgre.html#a467">ushort</a> mPoseAnimation; |
---|
404 | <a name="l00955"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramp11">00955</a> <a class="code" href="classOgre_1_1SharedPtr.html">GpuProgramParametersSharedPtr</a> mDefaultParams; |
---|
405 | 00957 <span class="keywordtype">bool</span> mPassSurfaceAndLightStates; |
---|
406 | 00958 |
---|
407 | 00967 <span class="keywordtype">void</span> setupBaseParamDictionary(<span class="keywordtype">void</span>); |
---|
408 | <a name="l00968"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuProgramb9">00968</a> |
---|
409 | 00970 size_t calculateSize(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; } <span class="comment">// TODO </span> |
---|
410 | 00971 |
---|
411 | 00973 <span class="keywordtype">void</span> loadImpl(<span class="keywordtype">void</span>); |
---|
412 | 00974 <span class="keyword">public</span>: |
---|
413 | 00975 |
---|
414 | 00976 GpuProgram(<a class="code" href="classOgre_1_1ResourceManager.html">ResourceManager</a>* creator, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name, <a class="code" href="namespaceOgre.html#a529">ResourceHandle</a> handle, |
---|
415 | <a name="l00977"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1GpuPrograma1">00977</a> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& group, <span class="keywordtype">bool</span> isManual = <span class="keyword">false</span>, <a class="code" href="classOgre_1_1ManualResourceLoader.html">ManualResourceLoader</a>* loader = 0); |
---|
416 | 00978 |
---|
417 | 00979 <span class="keyword">virtual</span> ~GpuProgram() {} |
---|
418 | 00980 |
---|
419 | 00985 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSourceFile(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& filename); |
---|
420 | 00986 |
---|
421 | 00991 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSource(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& source); |
---|
422 | <a name="l00992"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuPrograma6">00992</a> |
---|
423 | 00994 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& getSyntaxCode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSyntaxCode; } |
---|
424 | 00995 |
---|
425 | 00997 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSyntaxCode(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& syntax); |
---|
426 | <a name="l00998"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuPrograma8">00998</a> |
---|
427 | <a name="l01000"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuPrograma9">01000</a> <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& getSourceFile(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mFilename; } |
---|
428 | 01002 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& getSource(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSource; } |
---|
429 | <a name="l01004"></a><a class="code" href="classOgre_1_1GpuProgram.html#Ogre_1_1HighLevelGpuPrograma11">01004</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> setType(GpuProgramType t); |
---|
430 | 01006 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a658">GpuProgramType</a> getType(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mType; } |
---|
431 | 01007 |
---|
432 | 01012 <span class="keyword">virtual</span> GpuProgram* _getBindingDelegate(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> <span class="keyword">this</span>; } |
---|
433 | 01013 |
---|
434 | 01015 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isSupported(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
435 | 01016 |
---|
436 | 01024 <span class="keyword">virtual</span> GpuProgramParametersSharedPtr createParameters(<span class="keywordtype">void</span>); |
---|
437 | 01025 |
---|
438 | 01032 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSkeletalAnimationIncluded(<span class="keywordtype">bool</span> included) |
---|
439 | 01033 { mSkeletalAnimation = included; } |
---|
440 | 01034 |
---|
441 | 01041 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isSkeletalAnimationIncluded(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSkeletalAnimation; } |
---|
442 | 01042 |
---|
443 | 01049 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setMorphAnimationIncluded(<span class="keywordtype">bool</span> included) |
---|
444 | 01050 { mMorphAnimation = included; } |
---|
445 | 01051 |
---|
446 | 01059 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPoseAnimationIncluded(ushort poseCount) |
---|
447 | 01060 { mPoseAnimation = poseCount; } |
---|
448 | 01061 |
---|
449 | 01068 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isMorphAnimationIncluded(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mMorphAnimation; } |
---|
450 | 01069 |
---|
451 | 01076 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isPoseAnimationIncluded(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mPoseAnimation > 0; } |
---|
452 | 01080 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a467">ushort</a> getNumberOfPosesIncluded(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mPoseAnimation; } |
---|
453 | 01081 |
---|
454 | 01092 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a164">GpuProgramParametersSharedPtr</a> getDefaultParameters(<span class="keywordtype">void</span>); |
---|
455 | 01093 |
---|
456 | 01096 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> hasDefaultParameters(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !mDefaultParams.isNull(); } |
---|
457 | 01097 |
---|
458 | 01106 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSurfaceAndPassLightStates(<span class="keywordtype">bool</span> state) |
---|
459 | 01107 { mPassSurfaceAndLightStates = state; } |
---|
460 | 01108 |
---|
461 | 01112 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getPassSurfaceAndLightStates(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mPassSurfaceAndLightStates; } |
---|
462 | 01113 |
---|
463 | 01117 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& getLanguage(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
464 | 01118 |
---|
465 | 01119 <span class="keyword">protected</span>: |
---|
466 | 01121 <span class="keyword">virtual</span> <span class="keywordtype">void</span> loadFromSource(<span class="keywordtype">void</span>) = 0; |
---|
467 | 01122 |
---|
468 | 01123 }; |
---|
469 | 01124 |
---|
470 | 01125 |
---|
471 | 01132 <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> GpuProgramPtr : <span class="keyword">public</span> SharedPtr<GpuProgram> |
---|
472 | <a name="l01133"></a><a class="code" href="classOgre_1_1GpuProgramPtr.html#Ogre_1_1GpuProgramPtra0">01133</a> { |
---|
473 | <a name="l01134"></a><a class="code" href="classOgre_1_1GpuProgramPtr.html#Ogre_1_1GpuProgramPtra1">01134</a> <span class="keyword">public</span>: |
---|
474 | <a name="l01135"></a><a class="code" href="classOgre_1_1GpuProgramPtr.html#Ogre_1_1GpuProgramPtra2">01135</a> GpuProgramPtr() : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a><GpuProgram>() {} |
---|
475 | <a name="l01136"></a><a class="code" href="classOgre_1_1GpuProgramPtr.html#Ogre_1_1GpuProgramPtra3">01136</a> <span class="keyword">explicit</span> GpuProgramPtr(GpuProgram* rep) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a><GpuProgram>(rep) {} |
---|
476 | 01137 GpuProgramPtr(<span class="keyword">const</span> GpuProgramPtr& r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a><GpuProgram>(r) {} |
---|
477 | 01138 GpuProgramPtr(<span class="keyword">const</span> ResourcePtr& r) : SharedPtr<GpuProgram>() |
---|
478 | 01139 { |
---|
479 | 01140 <span class="comment">// lock & copy other mutex pointer</span> |
---|
480 | 01141 <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME) |
---|
481 | 01142 <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME) |
---|
482 | 01143 pRep = static_cast<GpuProgram*>(r.getPointer()); |
---|
483 | 01144 pUseCount = r.useCountPointer(); |
---|
484 | 01145 <span class="keywordflow">if</span> (pUseCount) |
---|
485 | 01146 { |
---|
486 | 01147 ++(*pUseCount); |
---|
487 | 01148 } |
---|
488 | 01149 } |
---|
489 | <a name="l01150"></a><a class="code" href="classOgre_1_1GpuProgramPtr.html#Ogre_1_1GpuProgramPtra4">01150</a> |
---|
490 | 01152 GpuProgramPtr& operator=(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>& r) |
---|
491 | 01153 { |
---|
492 | 01154 <span class="keywordflow">if</span> (pRep == static_cast<GpuProgram*>(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>())) |
---|
493 | 01155 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
---|
494 | 01156 release(); |
---|
495 | 01157 <span class="comment">// lock & copy other mutex pointer</span> |
---|
496 | 01158 <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME) |
---|
497 | 01159 <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME) |
---|
498 | 01160 pRep = static_cast<GpuProgram*>(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>()); |
---|
499 | 01161 pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>(); |
---|
500 | 01162 <span class="keywordflow">if</span> (pUseCount) |
---|
501 | 01163 { |
---|
502 | 01164 ++(*pUseCount); |
---|
503 | 01165 } |
---|
504 | 01166 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
---|
505 | 01167 } |
---|
506 | 01169 GpuProgramPtr& operator=(<span class="keyword">const</span> <a class="code" href="classOgre_1_1HighLevelGpuProgramPtr.html">HighLevelGpuProgramPtr</a>& r); |
---|
507 | 01170 }; |
---|
508 | 01171 } |
---|
509 | 01172 |
---|
510 | 01173 <span class="preprocessor">#endif</span> |
---|
511 | </pre></div><hr> |
---|
512 | <p> |
---|
513 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
514 | <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/> |
---|
515 | This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/> |
---|
516 | <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> |
---|
517 | <Work rdf:about=""> |
---|
518 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
519 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
520 | </Work> |
---|
521 | <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> --> |
---|
522 | |
---|
523 | Last modified Sun Mar 12 14:37:42 2006 |
---|
524 | </p> |
---|
525 | </body> |
---|
526 | </html> |
---|