HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_UniformNames.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RE_Uniform.h (Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __RE_UNIFORMNAMES_H__
12 #define __RE_UNIFORMNAMES_H__
13 
14 #include "RE_API.h"
15 
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringMap.h>
18 
19 #define RE_DECL_UNIFORM_NAME(X) static const UT_StringHolder X;
20 
21 #define RE_UNIFORM_NAME_LIST(X) \
22 X(GeometryHasColor) \
23 X(Normalize) \
24 X(OsdGregoryQuadOffsetBase) \
25 X(OsdPrimitiveIdBase) \
26 X(OsdPrimitiveMultiplier) \
27 X(TessLevel) \
28 X(ZoneMatrix) \
29 X(absorptionRatio) \
30 X(albedoPerLength) \
31 X(all_vertices_valid) \
32 X(alpha) \
33 X(alphaLayer) \
34 X(area_width) \
35 X(astep) \
36 X(avoid_edges) \
37 X(axisAgg) \
38 X(axisRulerOnly) \
39 X(backBottomColor) \
40 X(backColor) \
41 X(backFacing) \
42 X(bboxmat) \
43 X(beauty) \
44 X(blackPass) \
45 X(bloom) \
46 X(boldInc) \
47 X(bottomColor) \
48 X(boxDims) \
49 X(checkDepth) \
50 X(check_size) \
51 X(clampedRange) \
52 X(color) \
53 X(colscale) \
54 X(colshift) \
55 X(compselect) \
56 X(const_alpha) \
57 X(coordScale) \
58 X(colorTex) \
59 X(countTex) \
60 X(crop_offset) \
61 X(cscale) \
62 X(cshift) \
63 X(cutoff) \
64 X(decorationScale) \
65 X(densityScale) \
66 X(densityTex) \
67 X(depthTexture) \
68 X(depth_offset) \
69 X(destVoxels) \
70 X(destVoxels08) \
71 X(destVoxels16) \
72 X(destVoxels32) \
73 X(destVoxelIdx) \
74 X(diff_depth_resolution) \
75 X(discTex) \
76 X(discard_filter) \
77 X(doMatteCheck) \
78 X(do_matte) \
79 X(drawComponents) \
80 X(dst) \
81 X(emissionScale) \
82 X(emitgnomons) \
83 X(emittails) \
84 X(end) \
85 X(envMap) \
86 X(envMapEnable) \
87 X(envMapRotate) \
88 X(envMapTint) \
89 X(envSamples) \
90 X(env_color) \
91 X(env_orient) \
92 X(eyePos) \
93 X(fade_color) \
94 X(firstPassVolume) \
95 X(fixedVoxelSize) \
96 X(floorAlpha) \
97 X(fontColors) \
98 X(fontMap) \
99 X(fontParms) \
100 X(gamma) \
101 X(glowColor) \
102 X(glowMatteTex) \
103 X(gridAlpha) \
104 X(gridArea) \
105 X(gridColor) \
106 X(gridLevelBlend) \
107 X(gridLineWidth) \
108 X(gridNextLevelWideStep) \
109 X(gridNormal) \
110 X(gridOffset) \
111 X(gridStep) \
112 X(gridWideStep) \
113 X(gridmax) \
114 X(gridmin) \
115 X(hasPickMask) \
116 X(hasRamp) \
117 X(has_alpha_pass) \
118 X(height) \
119 X(hide_selected) \
120 X(hq_transparency) \
121 X(iViewHeight) \
122 X(iViewSize) \
123 X(iboldinc) \
124 X(iboldnextinc) \
125 X(iconTexture) \
126 X(igamma) \
127 X(imageIndex) \
128 X(imageTex) \
129 X(imageTexture) \
130 X(image_texture) \
131 X(increaseSteps) \
132 X(invertMask) \
133 X(invert_opacitymap) \
134 X(invert_roughmap) \
135 X(invRange) \
136 X(invVoxelSizeSq) \
137 X(isVerticalPass) \
138 X(is_factory_material) \
139 X(is_vertical_pass) \
140 X(iscale) \
141 X(ishift) \
142 X(kernel) \
143 X(kernel_parm_0) \
144 X(kernel_parm_1) \
145 X(kernel_size) \
146 X(ksize) \
147 X(labelHeight) \
148 X(layered) \
149 X(layers) \
150 X(length) \
151 X(levelBlend) \
152 X(levelMultiplier) \
153 X(levels) \
154 X(lightAttenuation) \
155 X(lightColor) \
156 X(lightConeFalloff) \
157 X(lightDir) \
158 X(lightDirection) \
159 X(lightLocation) \
160 X(lightMask) \
161 X(lightPos) \
162 X(lightType) \
163 X(line_scale) \
164 X(lmask) \
165 X(lod_parms) \
166 X(lscale) \
167 X(lshift) \
168 X(lutidx) \
169 X(lutsize) \
170 X(maskTex) \
171 X(maxFixedDecimalDigits) \
172 X(minVal) \
173 X(msSampling) \
174 X(msTex) \
175 X(nextLabelHeight) \
176 X(nontrTransform) \
177 X(nontrTransformDif) \
178 X(nontrTransformEmit) \
179 X(nontrTransformEmitColor) \
180 X(normalizing_scale) \
181 X(noScattering) \
182 X(numSamples) \
183 X(num_bones) \
184 X(num_rings) \
185 X(object_selected) \
186 X(objselection) \
187 X(occlusionMap) \
188 X(off) \
189 X(offset) \
190 X(omegaSOR) \
191 X(orient_discs) \
192 X(output_res) \
193 X(output_size) \
194 X(overlapFillColor) \
195 X(overlapTex) \
196 X(patternTexture) \
197 X(pickHighTex) \
198 X(pickHighTexture) \
199 X(pickLowTex) \
200 X(pickLowTexture) \
201 X(pickMask) \
202 X(pick_back_face) \
203 X(pick_front_face) \
204 X(pick_outside) \
205 X(pointSize) \
206 X(pos) \
207 X(postBlurScale) \
208 X(prelut) \
209 X(preshift) \
210 X(qualityMult) \
211 X(radius) \
212 X(randTex) \
213 X(rayAdjustment) \
214 X(resAdjustments) \
215 X(resM1) \
216 X(roffset) \
217 X(scalarDiffuse) \
218 X(scalarEmitColor) \
219 X(scale) \
220 X(selectcomp) \
221 X(selectvec) \
222 X(show_interior) \
223 X(skin_alpha) \
224 X(skin_post_tint) \
225 X(skin_pre_tint) \
226 X(sliceNum) \
227 X(src) \
228 X(srcVoxels08) \
229 X(srcVoxels16) \
230 X(srcVoxels32) \
231 X(start) \
232 X(stencil) \
233 X(stencil_parms) \
234 X(stereoLine) \
235 X(strideY) \
236 X(strideZ) \
237 X(target8) \
238 X(texsize) \
239 X(textureidx) \
240 X(thinAlpha) \
241 X(topColor) \
242 X(total_layers) \
243 X(transparency) \
244 X(transparent) \
245 X(uValues) \
246 X(uniform_scale) \
247 X(useMask) \
248 X(use_cd) \
249 X(use_depth_diff_resolution) \
250 X(use_discard_filter) \
251 X(use_discs) \
252 X(use_fade_color) \
253 X(use_material) \
254 X(use_ms_buffers) \
255 X(use_ramp) \
256 X(use_square_kernel) \
257 X(use_varying_id) \
258 X(user_string_count) \
259 X(user_string_index) \
260 X(vValues) \
261 X(vector_size) \
262 X(vertex_offset) \
263 X(view_lod) \
264 X(viewarea) \
265 X(volumeSelected) \
266 X(volumeSize) \
267 X(volumeTaper) \
268 X(volume_color_scale) \
269 X(volume_dir) \
270 X(volume_map) \
271 X(volume_res) \
272 X(volume_selected) \
273 X(volume_taper) \
274 X(volume_xform) \
275 X(voxelLength) \
276 X(voxelSize) \
277 X(voxel_size) \
278 X(wideAlpha) \
279 X(width) \
280 X(wire_alpha) \
281 X(wiredraw) \
282 X(wireframe_check) \
283 X(xAxis) \
284 X(xValues) \
285 X(xraySampleMask) \
286 X(xrayStrength) \
287 X(yAxis) \
288 X(yValues) \
289 X(zStart) \
290 X(zValues) \
291 X(zrange) \
292 X(zstep) \
293 X(diffuseTex) \
294 X(emitColorTex) \
295 X(emitTex) \
296 X(transformRamp) \
297 X(transformRampDif) \
298 X(transformRampEmitColor) \
299 X(glH_FloorRulerParms) \
300 X(glH_InfiniteFloorRefineParms) \
301 X(glH_OrthoFloorRefineParms) \
302 X(glH_ProjectMatrix) \
303 X(glH_ViewMatrix) \
304 /**/
305 
306 
307 // This holds UT_StringHolder string constants for faster lookups into symbol maps.
308 // To add a new uniform name you simply need to add a new line in RE_UNIFORM_NAME_LIST
309 // The variable name and the string content use the same token.
311 {
312 public:
314 
315  static void initializeNames();
316 
317  // call to translate an allocated uniform name into one that's sharable
318  // and fast to compare with the above constants.
319  static const UT_StringHolder &sharedString(const UT_StringHolder &name);
320 private:
321  UT_StringMap<int> myNameMap;
322 };
323 
324 #endif
325 
#define RE_API
Definition: RE_API.h:10
GLuint const GLchar * name
Definition: glcorearb.h:786
#define RE_UNIFORM_NAME_LIST(X)
#define RE_DECL_UNIFORM_NAME(X)