HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GR_CommonDispOption.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: GR_CommonDispOption.h
7  *
8  * COMMENTS: The display options that are common regardless of the geometry
9  * type (display, template, etc.).
10  */
11 
12 #ifndef __GR_CommonDispOption_h__
13 #define __GR_CommonDispOption_h__
14 
15 #include "GR_API.h"
16 #include <SYS/SYS_Math.h>
17 #include <UT/UT_Color.h>
18 #include <UT/UT_String.h>
19 #include <RE/RE_TextureTypes.h>
20 #include <GEO/GEO_PrimTypeCompat.h>
21 #include <GU/GU_SelectType.h>
22 #include "GR_HandleParts.h"
23 #include "GR_DisplayColors.h"
24 #include "GR_Defines.h"
25 
26 class RE_Render;
27 class GR_SchemeColors;
28 
29 #define FLAG_ACCESSORS(FLAGS, METHOD, FLAG) \
30  bool METHOD() const { return FLAGS.FLAG; } \
31  void METHOD(bool onoff) { FLAGS.FLAG = onoff; }
32 
33 #define FLAG_ACCESSORS_BUMP_OPTS(FLAGS, METHOD, FLAG) \
34  bool METHOD() const { return FLAGS.FLAG; } \
35  void METHOD(bool onoff) { if(FLAGS.FLAG != onoff) mySerialNum++; \
36  FLAGS.FLAG = onoff; }
37 
39 {
40 public:
44 
45  // Return true if the load/save was successful, and false otherwise.
46  bool save(std::ostream &, int indent=0) const;
47  bool load(UT_IStream &);
48 
49  GR_CommonDispOption &operator=(const GR_CommonDispOption &opt);
50 
51  // The color scheme names are simply the suffixes applied to the
52  // default color scheme file 3DSceneColors. The dot '.' should
53  // not be included in the scheme name.
54  void setColorScheme(const char *scheme_name);
55  const UT_String &getColorScheme(void) const { return myColorScheme; }
56  static void reloadAllColorSchemes();
57 
58  // Grab the colors and the color scheme from opt:
59  void setColors(const GR_CommonDispOption &opt);
60 
61  bool compatibleWith(const GR_CommonDispOption &opt) const;
62 
63  // Grab the color from the current pass
64  const UT_Color &color(GR_DisplayColor c) const
65  { return myColors[c][myGammaPassPtr?*myGammaPassPtr:0]; }
66 
67  void setGammaPassPtr(int *p) { myGammaPassPtr = p; }
68 
69  void setColor(GR_DisplayColor color_name,
70  const UT_Color &c);
71  void setColor(GR_DisplayColor target_color,
72  GR_DisplayColor source_color);
73  const UT_Color &getColor(GR_DisplayColor color_name,
74  bool gamma = false) const
75  { return myColors[color_name][gamma?1:0]; }
76 
77  // Color methods (soon to be deprecated; use color(GR_..._COLOR)
78 #define GET_COL(func, val) \
79  const UT_Color &func() const \
80  { return myColors[val][myGammaPassPtr?*myGammaPassPtr:0]; }
81 
82  GET_COL(backgndColor, GR_BACKGROUND_COLOR)
83  GET_COL(backgndBottomColor, GR_BACKGROUND_BOTTOM_COLOR)
84  GET_COL(defaultWireColor, GR_WIREFRAME_COLOR)
85  GET_COL(wireOverColor, GR_WIRE_OVER_COLOR)
86  GET_COL(ghostFillColor, GR_GHOST_FILL_COLOR)
87  GET_COL(selPrimColor, GR_SELECTED_PRIM_COLOR)
88  GET_COL(auxSelPrimColor1, GR_AUX_SELECTED_PRIM1_COLOR)
89  GET_COL(auxSelPrimColor2, GR_AUX_SELECTED_PRIM2_COLOR)
90  GET_COL(cookSelectionColor, GR_COOK_SELECTION_COLOR)
91  GET_COL(primClosureColor, GR_PRIM_CLOSURE_COLOR)
92  GET_COL(regAuxColor, GR_AUX_GEO_COLOR)
94  GET_COL(profileColor, GR_PROFILE_WIRE_COLOR)
95  GET_COL(axesColor, GR_AXES_COLOR)
96  GET_COL(xAxisColor, GR_X_AXIS_COLOR)
97  GET_COL(yAxisColor, GR_Y_AXIS_COLOR)
98  GET_COL(zAxisColor, GR_Z_AXIS_COLOR)
99  GET_COL(selAxesColor, GR_SELECTED_AXES_COLOR)
100  GET_COL(primInfoColor, GR_PRIM_INFO_COLOR)
101  GET_COL(selPrimInfoColor, GR_SELECTED_PRIM_INFO_COLOR)
102  GET_COL(pointColor, GR_POINT_COLOR)
103  GET_COL(selPointColor, GR_SELECTED_POINT_COLOR)
104  GET_COL(guide1Color, GR_GUIDE1_COLOR)
105  GET_COL(guide2Color, GR_GUIDE2_COLOR)
106  GET_COL(guideSelColor, GR_OBJECT_SELECT_COLOR)
107  GET_COL(cplaneColor, GR_CPLANE_COLOR)
108  GET_COL(activeCplaneColor, GR_ACTIVE_CPLANE_COLOR)
109  GET_COL(selCplaneColor, GR_SELECTED_CPLANE_COLOR)
110  GET_COL(gridColor, GR_GRID_COLOR)
111  GET_COL(heightVectorColor, GR_HEIGHT_VECTOR_COLOR)
112  GET_COL(gridXRulerColor, GR_GRID_X_RULER_COLOR)
113  GET_COL(gridYRulerColor, GR_GRID_Y_RULER_COLOR)
114  GET_COL(gridZRulerColor, GR_GRID_Z_RULER_COLOR)
115  GET_COL(handleColor, GR_HANDLE_COLOR)
116  GET_COL(selHandleColor, GR_SELECTED_HANDLE_COLOR)
117  GET_COL(peanutColor, GR_PEANUT_COLOR)
118  GET_COL(labelColor, GR_LABEL_COLOR)
119  GET_COL(pillTextColor, GR_PILL_TEXT_COLOR)
120  GET_COL(pillBGColor, GR_PILL_BG_COLOR)
121  GET_COL(pillOutlineColor, GR_PILL_OUTLINE_COLOR)
122  GET_COL(snapshotColor, GR_SNAPSHOT_COLOR)
123  GET_COL(selLabelColor, GR_SELECTED_LABEL_COLOR)
124  GET_COL(selPillTextColor, GR_SELECTED_PILL_TEXT_COLOR)
125  GET_COL(selPillBGColor, GR_SELECTED_PILL_BG_COLOR)
126  GET_COL(selPillOutlineColor, GR_SELECTED_PILL_OUTLINE_COLOR)
127  GET_COL(overlayLabelColor, GR_OVERLAY_LABEL_COLOR)
128  GET_COL(auxOverlayLabelColor, GR_AUX_OVERLAY_LABEL_COLOR)
129  GET_COL(handlePivotColor, GR_HANDLE_PIVOT_COLOR)
130  GET_COL(handleAxisColor, GR_HANDLE_AXIS_COLOR)
131  GET_COL(handlePlaneAxisColor, GR_HANDLE_PLANE_AXIS_COLOR)
132  GET_COL(cplaneHandleXlateColor, GR_CPLANE_HANDLE_XLATE_COLOR)
133  GET_COL(cplaneHandleRotateColor, GR_CPLANE_HANDLE_ROTATE_COLOR)
134  GET_COL(cplaneHandleBorderColor, GR_CPLANE_HANDLE_BORDER_COLOR)
135  GET_COL(orthoGridColor, GR_ORTHO_GRID_COLOR)
136  GET_COL(orthoGridOriginColor, GR_ORTHO_GRID_ORIGIN_COLOR)
137  GET_COL(uvGridColor, GR_UV_GRID_COLOR)
138  GET_COL(uvGridOriginColor, GR_UV_GRID_ORIGIN_COLOR)
139  GET_COL(uvGridBoundaryColor, GR_UV_GRID_BOUNDARY_COLOR)
140  GET_COL(objSelectColor, GR_OBJECT_SELECT_COLOR)
141  GET_COL(objCurrentColor, GR_OBJECT_CURRENT_COLOR)
142  GET_COL(objSelectHintColor, GR_OBJECT_SELECT_HINT_COLOR)
143  GET_COL(objGhostColor, GR_OBJECT_GHOST_COLOR)
144  GET_COL(uvBackFaceFillColor, GR_UV_BACKFACE_FILL_COLOR)
145  GET_COL(uvOverlapFillColor, GR_UV_OVERLAP_FILL_COLOR)
146  GET_COL(uvSelBackFaceFillColor, GR_SELECTED_UV_BACKFACE_FILL_COLOR)
147  GET_COL(ikCriticalZoneColor, GR_IK_CRITICAL_ZONE_COLOR)
148  GET_COL(viewMaskOverlayColor, GR_VIEW_MASK_OVERLAY_COLOR)
149  GET_COL(textColor, GR_TEXT_COLOR)
150  GET_COL(textShadowColor, GR_TEXT_SHADOW_COLOR)
151  GET_COL(geoWarningColor, GR_GEO_WARNING_COLOR)
152  GET_COL(selectBoxOuterLineColor, GR_SELECTBOX_OUTER_LINE_COLOR)
153  GET_COL(selectBoxInnerLineColor, GR_SELECTBOX_INNER_LINE_COLOR)
154  GET_COL(selectBoxFillColor, GR_SELECTBOX_FILL_COLOR)
155  GET_COL(handleLocateColor, GR_HANDLE_LOCATE_COLOR)
156  GET_COL(handleLocatePassiveColor, GR_HANDLE_LOCATE_PASSIVE_COLOR)
157  GET_COL(objectNameColor, GR_OBJECT_NAME_COLOR)
158  GET_COL(pointTrailColor, GR_POINT_TRAIL_COLOR)
159  GET_COL(selPointTrailColor, GR_POINT_TRAIL_SELECTED_COLOR)
160  GET_COL(renderBorderColor, GR_RENDER_BORDER_COLOR)
161  GET_COL(renderInactiveBorderColor, GR_RENDER_INACTIVE_BORDER_COLOR)
162  GET_COL(renderTextColor, GR_RENDER_TEXT_COLOR)
163  GET_COL(renderLocateColor, GR_RENDER_LOCATE_COLOR)
164  GET_COL(renderBarColor, GR_RENDER_BAR_COLOR)
165  GET_COL(flattenPinColor, GR_FLATTEN_PIN_COLOR)
166  GET_COL(flattenPinSelColor, GR_FLATTEN_PIN_SELECTED_COLOR)
167  GET_COL(flattenInitialPinColor, GR_FLATTEN_INITIAL_PIN_COLOR)
168  GET_COL(messageColor, GR_MESSAGE_COLOR)
169  GET_COL(promptColor, GR_PROMPT_COLOR)
170  GET_COL(warningColor, GR_WARNING_COLOR)
171  GET_COL(errorColor, GR_ERROR_COLOR)
172  GET_COL(successColor, GR_SUCCESS_COLOR)
173  GET_COL(overlayBackgroundColor, GR_OVERLAY_BACKGROUND_COLOR)
174  GET_COL(boundaryColor, GR_BOUNDARY_COLOR)
175  GET_COL(edgeTipColor, GR_EDGE_TIP_COLOR)
176  GET_COL(viewPivotFGColor, GR_VIEW_PIVOT_FG_COLOR)
177  GET_COL(viewPivotBGColor, GR_VIEW_PIVOT_BG_COLOR)
178  GET_COL(bboxOutlineColor, GR_BBOX_OUTLINE_COLOR)
179  GET_COL(bboxSolidColor, GR_BBOX_SOLID_COLOR)
180 
181  const UT_Color &wireColor() const
182  { return myCurrentWireColor[myGammaPassPtr?*myGammaPassPtr:0]; }
183  const UT_Color &crtAuxColor() const
184  { return myColors[myCrtAuxColor][myGammaPassPtr?*myGammaPassPtr:0]; }
185 
187  {
188  alpha = myAlphas[GR_LOCATE_ALPHA];
189  return myColors[GR_LOCATE_COLOR][myGammaPassPtr?*myGammaPassPtr:0];
190  }
191  void componentLocateColor(int component_type,
192  GU_SelectionRule sel_rule,
193  UT_Color &clr, fpreal &alpha) const;
194  void componentLocateNearColor(UT_Color &clr, fpreal &alpha) const;
195 
196 #undef GET_COL
197 #define GET_ALPHA(func, val) fpreal func() const { return myAlphas[val]; }
198  GET_ALPHA(objGhostAlpha, GR_OBJECT_GHOST_ALPHA)
199  GET_ALPHA(selectBoxFillAlpha, GR_SELECTBOX_ALPHA)
200  GET_ALPHA(cplaneAlpha, GR_CPLANE_ALPHA)
201  GET_ALPHA(cplaneLineAlpha, GR_CPLANE_LINE_ALPHA)
202  GET_ALPHA(cplaneLineFadedAlpha, GR_CPLANE_LINE_FADED_ALPHA)
203  GET_ALPHA(gridLineAlpha, GR_GRID_LINE_ALPHA)
204  GET_ALPHA(gridLineFadedAlpha, GR_GRID_LINE_FADED_ALPHA)
205  GET_ALPHA(handleLocateAlpha, GR_HANDLE_LOCATE_ALPHA)
206  GET_ALPHA(handleAxisLocateAlpha, GR_HANDLE_AXIS_LOCATE_ALPHA)
207  GET_ALPHA(handleTracerFillAlpha, GR_HANDLE_TRACER_FILL_ALPHA);
208  GET_ALPHA(fillSelectionAlpha, GR_FILL_SELECTION_ALPHA)
209  GET_ALPHA(fillSelectionWireOverAlpha, GR_FILL_SELECTION_WIRE_OVER_ALPHA)
210  GET_ALPHA(uvFillAlpha, GR_UV_FILL_ALPHA)
211  GET_ALPHA(uvOverlapFillAlpha, GR_UV_OVERLAP_FILL_ALPHA)
212  GET_ALPHA(overlayBackgroundAlpha, GR_OVERLAY_BACKGROUND_ALPHA)
213  GET_ALPHA(pillMenuBGAlpha, GR_PILL_MENU_BG_ALPHA)
214  GET_ALPHA(selPillMenuBGAlpha, GR_SELECTED_PILL_MENU_BG_ALPHA)
215  GET_ALPHA(bboxOutlineAlpha, GR_BBOX_OUTLINE_ALPHA)
216  GET_ALPHA(bboxSolidAlpha, GR_BBOX_SOLID_ALPHA)
217 #undef GET_ALPHA
218 
219  const GR_HandleParts &handleParts() const { return myHandleParts; }
220  GR_HandleParts &handleParts() { return myHandleParts; }
221 
222  GR_DecorFontSize getDecorFontSize() const { return myDecorFontSize; }
223  void setDecorFontSize(GR_DecorFontSize s){myDecorFontSize=s;}
224 
225  fpreal markerSize() const { return myMarkerSize*myDPIScale; }
227  { return myMarkerSize; }
229  { myMarkerSize = SYSmax(size, 0.1); }
230 
231  // Methods for accessing (setting/getting) the various flags.
232  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, drawTexture, drawTexture)
233  FLAG_ACCESSORS_BUMP_OPTS(myNoSaveFlags, drawMultiTexture, drawMultiTexture)
234  FLAG_ACCESSORS(mySaveFlags, drawTransparent, drawTransparent)
235  FLAG_ACCESSORS(mySaveFlags, drawDisplacement, drawDisplacement)
236  FLAG_ACCESSORS(mySaveFlags, drawTexturedSpots, drawTexturedSpots)
237  FLAG_ACCESSORS(mySaveFlags, drawShadows, drawShadows)
238  FLAG_ACCESSORS(mySaveFlags, drawTransparentMaps, drawTransparentMaps)
239  FLAG_ACCESSORS(mySaveFlags, highQualityLighting, highQualityLighting)
240  FLAG_ACCESSORS(mySaveFlags, drawDiffuse, drawDiffuse)
241  FLAG_ACCESSORS(mySaveFlags, drawAmbient, drawAmbient)
242  FLAG_ACCESSORS(mySaveFlags, drawEmission, drawEmission)
243  FLAG_ACCESSORS(mySaveFlags, useLighting, useLighting)
244  FLAG_ACCESSORS(mySaveFlags, ambientOcclusion, ambientOcclusion)
245  FLAG_ACCESSORS(mySaveFlags, removeBackface, removeBackface)
246  FLAG_ACCESSORS(mySaveFlags, fillSelection, fillSelection)
247  FLAG_ACCESSORS(mySaveFlags, solidOnly, solidOnly)
248  FLAG_ACCESSORS(mySaveFlags, correctBG, correctBG)
249  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, polygonConvexQuality,
250  polygonConvexQuality)
251  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, drawPartSprite, drawPartSprite)
252  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, orientDiscs, orientDiscs)
253 
254  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, shadeOpenCurves, shadeOpenCurves)
255  FLAG_ACCESSORS(mySaveFlags, displayAsSubdiv, displayAsSubdiv)
256 
257  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, drawHullsOnly, drawHullsOnly)
258  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, drawPartOrigin, drawPartOrigin)
259  FLAG_ACCESSORS(mySaveFlags, drawHandles, drawHandles)
260  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, showObjectSelection,
261  showObjectSelection)
262 
263  FLAG_ACCESSORS(mySaveFlags, use2DLimitsFor3D, use2DTexLimits)
264  FLAG_ACCESSORS(mySaveFlags, dynamicTexControl, dynamicTexControl)
265  FLAG_ACCESSORS(mySaveFlags, dynamicReduceTex2D, reduceTex2D )
266  FLAG_ACCESSORS(mySaveFlags, dynamicReduceTex3D, reduceTex3D )
267  FLAG_ACCESSORS(mySaveFlags, dynamicReduceMipMap, reduceMipMap )
268  FLAG_ACCESSORS(mySaveFlags, dynamicReduceBitDepth, reduceBitDepth )
269 
270  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, overrideColorAttrib,
271  overrideColorAttrib);
272  FLAG_ACCESSORS(mySaveFlags, pickWireAsSolid, pickWireAsSolid)
273  FLAG_ACCESSORS(mySaveFlags, showGeoColor, showGeoColor )
274 
275  FLAG_ACCESSORS(myNoSaveFlags, applyVisualizers, applyVisualizers)
276  FLAG_ACCESSORS(myNoSaveFlags, snapToSelected, snapToSelected)
277  FLAG_ACCESSORS(myNoSaveFlags, showComponentSelections, showComponentSelections)
278 
279  // NB: This flag is somewhat overloaded. At SOPs it determines whether
280  // we're showing the temporary or cook selections. At DOPs it also
281  // indicates whether we're drawing temporary DETAIL selections.
282  FLAG_ACCESSORS(myNoSaveFlags, showTempSelections, showTempSelections)
283 
284  FLAG_ACCESSORS(myNoSaveFlags, pickFrontFaces, pickFrontFaces)
285  FLAG_ACCESSORS(myNoSaveFlags, pickBackFaces, pickBackFaces)
286  FLAG_ACCESSORS_BUMP_OPTS(myNoSaveFlags, drawAuxColors, drawAuxColors)
287  FLAG_ACCESSORS_BUMP_OPTS(myNoSaveFlags, forceWireColor, forceWireColor)
288  FLAG_ACCESSORS(myNoSaveFlags, shadingOpenCurves, shadingOpenCurves)
289 
290  // This returns true if the interactive mode display option is on
291  FLAG_ACCESSORS(mySaveFlags, interactiveEnable, interactiveEnable)
292 
293  // This returns true if the user is interactively moving a handle or
294  // tumbling, independent of the interative enable flag.
295  FLAG_ACCESSORS(myNoSaveFlags, interactiveMove, interactive)
296 
297  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, pointInstancing, pointInstancing)
298 
299  FLAG_ACCESSORS(mySaveFlags, cuspNormals, cuspNormals)
300  fpreal getNormalCuspAngle() const
301  { return myNormalCuspAngle; }
303  { myNormalCuspAngle = SYSclamp(a, 0.0, 180.0); }
305  { return myVertNormalLimit; }
306  void setVertexNormalLimit(int poly_limit)
307  { myVertNormalLimit = SYSmax(0, poly_limit); }
308 
309 
310  bool limitTextureSize() const { return mySaveFlags.limitTextureSize; }
311  void limitTextureSize(bool ls){ mySaveFlags.limitTextureSize = ls;
312  myUpdates.texSize = true; }
313 
314  bool limitTexture3DSize() const { return mySaveFlags.limitTextureSize; }
315  void limitTexture3DSize(bool ls){ mySaveFlags.limitTextureSize = ls;
316  myUpdates.tex3DSize = true; }
317 
318  int textureMemLimitMB() const { return myTextureMemLimitMB; }
319  void textureMemLimitMB(int max_size)
320  { myTextureMemLimitMB = SYSmax(32, max_size);
321  myUpdates.textureMem = true; }
322 
323  // Specifies the anisotropic sampling for textures. getTextureAnisotropy()
324  // must be called when rendering, to check for the GL extension.
325  int getTextureAnisotropy(RE_Render *r) const;
326  int textureAnisotropy() const;
327  void textureAnisotropy(int ta);
328 
329  // Always use the version of getHDRTextureFormat() with RE_Render * when
330  // rendering, to ensure hardware compatibility with the format.
331  RE_TextureCompress getHDRTextureFormat(RE_Render *r) const;
332  int getHDRTextureFormat() const;
333  void setHDRTextureFormat(int hdrformat); // 2 = full HDR, 1=16b HDR, 0=8b
334  void setDynamicFormat(int format); // -1 = compressed 8b
335  int getDynamicFormat() const { return myDynamicFormat; }
336 
337 
338  RE_TextureCompress getHDRTexture3DFormat(RE_Render *r) const;
339  int getHDRTexture3DFormat() const;
340  void setHDRTexture3DFormat(int hdrformat); // 2 = full HDR, 1=16b HDR, 0=8b
341  void setDynamic3DFormat(int format);
342  int getDynamic3DFormat() const { return myDynamic3DFormat; }
343 
344  // Scale all textures down
345  void setTextureScale(float sc); // 0.0 (min size) to 1.0 (full size)
346  float getTextureScale() const; // texture scale is applied before limit
347  float getUserTextureScale() const; // texture scale w/o dynamics applied
348  void setDynamicScale(float sc); // For dynamic cache control
349  float getDynamicScale() const;
350 
351  void setTexture3DScale(float sc); // 0.0 (min size) to 1.0 (full size)
352  float getTexture3DScale() const; // texture scale is applied before limit
353  float getUserTexture3DScale() const;// texture scale w/o dynamics applied
354  void setDynamic3DScale(float sc); // For dynamic cache control
355  float getDynamic3DScale() const;
356 
357  // Maximum particle array texture size
358  void setParticleTextureSize(int max_w, int max_h);
359  void getParticleTextureSize(int &max_w, int &max_h) const;
360 
361  void setParticleDisplayType(GR_ParticleType t);
362  GR_ParticleType particleDisplayType() const;
363 
364  // Limit texture resolution
365  void setMaxTextureSize(bool limit, int max_w=0, int max_h=0);
366  void getMaxTextureSize(int &max_w, int &max_h) const;
367  void getMaxTextureSize(RE_Render *r, int &max_w, int &max_h) const;
368 
369  void setMaxTexture3DSize(bool limit, int max_w=0, int max_h=0, int max_d=0);
370  void getMaxTexture3DSize(int &max_w, int &max_h, int &max_d) const;
371  void getMaxTexture3DSize(RE_Render *r, int &max_w, int &max_h,
372  int &max_d) const;
373 
374  bool mipMapTextures() const;
375  void mipMapTextures(bool onoff);
376  void setDynamicMipMap(bool onoff);
377  bool getDynamicMipMap() const { return myNoSaveFlags.dynamicMipSetting; }
378 
379  void resetDynamicParms();
380 
381  bool getHighQualityLighting(RE_Render *r) const;
382 
383  void alphaPass(GR_AlphaPass pass) { myAlphaPass = pass; }
384  GR_AlphaPass alphaPass() const { return myAlphaPass; }
385 
386  int getTransparentQuality() const { return myTransparentQuality; }
387  void setTransparentQuality(int q) { myTransparentQuality=SYSclamp(q,-1,2); }
388 
389  fpreal getDisplacementQuality() const { return myDisplacementQuality; }
391  { myDisplacementQuality=SYSclamp(q,0.0,10.0); }
392 
393  int getLightSampling() const { return myLightSamples; }
394  void setLightSampling(int s) { myLightSamples = SYSclamp(s,1,100); }
395 
396  int getVolumeQuality() const { return myVolumeQuality; }
397  void setVolumeQuality(int q) { myVolumeQuality = SYSclamp(q,0,3); }
398 
399  bool volumeWireAsPoints() const { return mySaveFlags.volumeWireAsPoints;}
400  void volumeWireAsPoints(bool vw){ mySaveFlags.volumeWireAsPoints = vw; }
401 
402  // DPI support.
403  void DPIScale(fpreal f) { myDPIScale = f; }
404  fpreal DPIScale() const { return myDPIScale; }
405 
406  void autoDPIScale(bool dpi);
407  bool autoDPIScale() const { return mySaveFlags.autoDPIScale; }
408 
409  // Reflection cube maps
410  bool useReflectionMaps() const
411  { return mySaveFlags.enableReflectionMaps; }
412  void useReflectionMaps(bool e)
413  { mySaveFlags.enableReflectionMaps = e; }
414  bool hdrReflectionMaps() const
415  { return mySaveFlags.hdrReflectionMaps; }
416  void hdrReflectionMaps(bool e)
417  { myUpdates.hdrReflect = true;
418  mySaveFlags.hdrReflectionMaps = e; }
419  int reflectionMapSize() const { return myReflectMapSize; }
420  void reflectionMapSize(int wh)
421  { myUpdates.reflectSize = true;
422  myReflectMapSize = SYSclamp(wh, 16, 16384); }
423  fpreal reflectionMinLevel() const { return myReflectMinLevel; }
425  { myReflectMinLevel = SYSclamp(lvl, 0.0, 1.0); }
426 
427  // Agents
428  FLAG_ACCESSORS_BUMP_OPTS(mySaveFlags, agentLODEnable, agentLODEnable)
429 
430  void setAgentLODBias(fpreal b)
431  {
432  if(!SYSisEqual(b, myAgentLODBias))
433  mySerialNum++;
434  myAgentLODBias = b;
435  }
436  fpreal getAgentLODBias() const { return myAgentLODBias; }
437 
438  void setAgentMinPoints(int minp) { myAgentMinPoints = SYSmax(1, minp); }
439  int getAgentMinPoints() const { return myAgentMinPoints; }
440 
441  void setAgentNumLODLevels(int lvls) { myAgentMaxLOD=SYSclamp(lvls,1,16);}
442  int getAgentNumLODLevels() const { return myAgentMaxLOD; }
443 
444  void setAgentBaseLODLevel(int lvl)
445  {
446  if(lvl != myAgentBaseLOD)
447  mySerialNum++;
448  myAgentBaseLOD=SYSclamp(lvl,0,16);
449  }
450  int getAgentBaseLODLevel() const { return myAgentBaseLOD; }
451 
452  void setAgentBoneDeform(int d) { myAgentBoneDeform = SYSclamp(d,0,2); }
453  int getAgentBoneDeform() const { return myAgentBoneDeform; }
454 
455  int getAgentWireMode() const { return myAgentWireMode; }
457  {
458  mode = SYSclamp(mode,0,1);
459  if(mode != myAgentWireMode)
460  {
461  mySerialNum++;
462  myAgentWireMode = mode;
463  }
464  }
465 
466  void optimizePackedGeometry(bool opt){ mySaveFlags.optPackedGeo = opt; }
467  bool optimizePackedGeometry() const { return mySaveFlags.optPackedGeo; }
468 
469  void offsetVertexDecor(bool use_offset)
470  { mySaveFlags.offsetVertexDecor = use_offset; }
471  bool offsetVertexDecor() const
472  { return mySaveFlags.offsetVertexDecor; }
473 
475  {
479  CURRENT_SHADING_BBOX // follow the current shading mode
480  };
481  void shadedBoundingBoxes(gr_BBoxMode m) { myBBoxMode = m; }
482  gr_BBoxMode shadedBoundingBoxes() const { return myBBoxMode; }
483 
484  // "Get" methods:
485  const UT_String &
486  visibleObjects() const { return myVisibleObjects; }
487  GA_PrimCompat::TypeMask primMask() const { return myPrimMask; }
488  unsigned pickMask() const { return myPickMask; }
489  float normalScale() const { return myNormalScale; }
490  float getNormalScale() const { return myNormalScale; }
491  fpreal vectorScale() const { return myVectorScale; }
492  fpreal getVectorScale() const { return myVectorScale; }
493  float LOD() const { return myLOD; }
494  float hlOffsetVariable() const { return myHLOffsetVariable; }
495  float hlOffsetConstant() const { return myHLOffsetConstant; }
496  float wireWidth() const { return SYSmax(0.1,
497  myWireWidth*myDPIScale); }
498  float selectionWireWidth()const { return (wireWidth() > 1.0)
499  ? wireWidth() + 1.0
500  : wireWidth() * 2.0; }
501  float getWireWidth() const { return myWireWidth; }
502  float wireBlend() const { return SYSclamp(myWireBlend,
503  0.0, 1.0); }
504  float interiorWireAlpha() const { return myInteriorWireAlpha; }
505  float pointSize() const { return myPointSize*myDPIScale; }
506  float getPointSize() const { return myPointSize; }
507  float discSize() const { return myDiscSize; }
508  float shadowOffsetVariable() const { return myShadowOffsetVariable; }
509  float shadowOffsetConstant() const { return myShadowOffsetConstant; }
510  int shadowAA() const { return myShadowAA; }
511  bool useLightShadowSize() const { return myUseLightShadowSize; }
512  int getShadowMapSize() const { return myShadowMapSize; }
513  int selectionListInst() const { return mySelectionListInst; }
514 
515  const char *colorAttrib() const { return myColorAttrib; }
516  int colorType() const { return myColorType; }
517  void getColorDomain(fpreal &s, fpreal &e) const
518  { s = myColorDomain[0];
519  e = myColorDomain[1]; }
520 
521  int getSceneAntialias() const { return mySceneAntialias; }
522  bool getHDRRendering() const { return mySaveFlags.hdrRender; }
523  float getViewGamma() const { return myViewGamma; }
524  bool useViewLUT() const { return myUseLUT; }
525  const char *getViewLUT() const { return myViewLUT; }
526  bool useOCIO() const { return myUseOCIO; }
527  const char *getOCIOColorspace() const { return myOCIOColorspace; }
528  float getViewBlack() const { return myViewBlack; }
529  float getViewWhite() const { return myViewWhite; }
530  int getViewComponents() const { return myViewComponents; }
531 
532  int getAmbOcclusionLevel() const { return myAmbOcclusionLevel; }
533 
534  fpreal getInstancingFraction() const { return myInstancingFraction; }
535  int getInstancingLimit() const { return myInstancingLimit; }
537  { return myInstancingLimitAction; }
538 
539  fpreal getMinHomeZoom() const { return myMinHomeZoom; }
540 
541  // In millions of polygons (eg, 10 for 10M).
542  int getSubdivisionPolyLimit() const { return mySubdPolyLimit; }
543 
544  // "Set" methods:
545  void visibleObjects(const char *mask)
546  { myVisibleObjects.harden(mask); }
548  { myPrimMask = mask; }
549  void pickMask(unsigned mask) { myPickMask = mask; }
550  void setNormalScale(float s);
551  void setVectorScale(float s);
552 
553  void useRegularAuxColor() { myCrtAuxColor=GR_AUX_GEO_COLOR; }
555 
556  void setCurrentWireColor(const UT_Color &color);
557  void setCurrentWireColor(GR_DisplayColor color);
558  const UT_Color &getCurrentWireColor() const { return myCurrentWireColor[0]; }
559 
560  void LOD(float l);
561  void hlOffsetVariable(float f) { myHLOffsetVariable = (f>=0.0f)
562  ? f :0.0f;}
563  void hlOffsetConstant(float f) { myHLOffsetConstant = (f>=0.0f)
564  ? f :0.0f;}
565  void setWireWidth(float width) { myWireWidth = width;}
566  void wireBlend(float blend) { myWireBlend = blend;}
567  void interiorWireAlpha(float a) { myInteriorWireAlpha
568  = SYSclamp(a, 0.0f, 1.0f); }
569  void setPointSize(float size) { myPointSize = size; }
570  void discSize(float size) { myDiscSize = size; }
572  { myShadowOffsetVariable = (f>=0.0f) ? f : 0.0f;}
574  { myShadowOffsetConstant = (f>=0.0f) ? f : 0.0f;}
575  void shadowAA(int aa) { myShadowAA = SYSclamp(aa, 1,4); }
576  void selectionListInst(int inst) { mySelectionListInst = inst; }
577  void setUseLightShadowSize(bool e) { myUseLightShadowSize = e; }
578  void setShadowMapSize(int s) { myShadowMapSize = s;
579  myUpdates.shadowSize = true; }
580 
581  void setColorAttrib(const char *a);
582  void setColorType(int t);
583  void setColorDomain(fpreal s, fpreal e);
584 
585  void setSceneAntialias(int a) { mySceneAntialias = SYSmax(a,0);
586  myUpdates.sceneAA = true; }
587 
588  void setHDRRendering(bool hdr) { mySaveFlags.hdrRender = hdr;
589  myUpdates.hdrRender = true; }
590 
591  void setViewGamma(float gamma);
592  void setUseViewLUT(bool b) { myUseLUT = b; }
593  void setViewLUT(const char *lut) { myViewLUT.harden(lut); }
594  void useOCIO(bool use) { myUseOCIO = use; }
595  void setOCIOColorspace(const char *cs)
596  { myOCIOColorspace.harden(cs); }
597  void setViewBlack(float b) { myViewBlack = b; }
598  void setViewWhite(float w) { myViewWhite = w; }
599  void setViewComponents(int c) { myViewComponents = c; }
600  void setAmbOcclusionLevel(int lvl)
601  { myAmbOcclusionLevel = SYSclamp(lvl, 1, 4); }
602 
604  { if(!SYSisEqual(s, myInstancingFraction))
605  mySerialNum++;
606  myInstancingFraction = s; }
607  void setInstancingLimit(int limit)
608  { limit = SYSmax(0, limit);
609  if(!SYSisEqual(limit, myInstancingLimit))
610  mySerialNum++;
611  myInstancingLimit = limit;
612  }
613  void setInstancingLimitAction(int action)
614  { myInstancingLimitAction = SYSclamp(action, 0,2); }
615 
617  { myMinHomeZoom = SYSmax(val, 0.01); }
618 
619  // In millions of polygons (eg, 10 for 10M).
620  void setSubdivisionPolyLimit(int limit)
621  {
622  limit = SYSmax(0, limit);
623  if(limit != mySubdPolyLimit)
624  mySerialNum++;
625  mySubdPolyLimit = limit;
626  }
627 
629  {
630  if(myUVAttrib != attrib)
631  {
632  mySerialNum++;
633  myUVAttrib = attrib;
634  }
635  }
636  const UT_StringHolder &getUVDisplayAttrib() const { return myUVAttrib; }
637 
638  // Onion skinning
639  bool isOnionSkinEnabled() const
640  { return mySaveFlags.onionSkinEnable; }
642  { return myOnionSkinFrameInc; }
644  { return myOnionSkinPreFrameCount; }
646  { return myOnionSkinPostFrameCount; }
648  { return myOnionSkinPreFrameColor; }
650  { return myOnionSkinPostFrameColor; }
651  fpreal getOnionSkinAlpha() const { return myOnionSkinAlpha; }
652 
653  void setOnionSkinEnable(bool enable)
654  { mySaveFlags.onionSkinEnable = enable; }
655 
656  void setOnionSkinParms(int frame_inc,
657  int pre_count,
658  int post_count,
659  UT_Color pre_color,
660  UT_Color post_color,
661  fpreal alpha);
662 
663  // These are used to determine if geometry-related parms have changed on a
664  // very coarse level.
665  int getUniqueID() const { return myUniqueID; }
666  int getSerialNum() const { return mySerialNum; }
667 
668  // changes when the view is changed. ID changes if the rendered viewport
669  // is different.
670  int getViewSerialNum() const { return mySerialView; }
671  int getViewSerialID() const { return mySerialID; }
672  void setViewSerialNum(int s, int id)
673  {
674  mySerialView = s;
675  mySerialID = id;
676  }
677 
678  bool defaultTextureSize() const { return !myUpdates.texSize; }
679  bool default3DTextureSize() const{ return !myUpdates.tex3DSize; }
680  bool defaultShadowSize() const { return !myUpdates.shadowSize; }
681  bool defaultReflectSize() const { return !myUpdates.reflectSize; }
682  bool defaultHDRTexture() const { return !myUpdates.hdrTexture; }
683  bool defaultHDRRender() const { return !myUpdates.hdrRender; }
684  bool defaultHDRReflect() const { return !myUpdates.hdrReflect; }
685  bool defaultSmoothLines() const { return !myUpdates.smoothLines; }
686  bool defaultSceneAA() const { return !myUpdates.sceneAA; }
687  bool defaultTextureMem() const { return !myUpdates.textureMem; }
688  bool defaultGuideFont() const { return !myUpdates.guideFont; }
689  bool defaultDPIScale() const { return !myUpdates.dpiScale; }
690 
691  // Turns on the closure selection on hull-based or all geometry
692  int closureSelection() const { return myClosureSelection; }
693  void closureSelection(int s) { myClosureSelection=SYSclamp(s,0,2); }
694 
695  int getVisContext() const { return myVisContext; }
696  void setVisContext(int ctxt) { myVisContext = ctxt; }
697 
698  // dummy callbacks for obsolete options.
699  bool obsoleteOption() const { return false; }
700  void obsoleteOption(bool onoff) {}
701 
702 private:
703  void loadDefaultColors();
704  void getColorsByName();
705 
706  // data
707  UT_Color myColors[GR_NUM_DISPLAY_COLORS][2];
708  fpreal myAlphas[GR_NUM_DISPLAY_ALPHAS];
709  UT_Color myCurrentWireColor[2];
710 
711  UT_String myVisibleObjects; // Visibility mask
712  GA_PrimCompat::TypeMask myPrimMask; // What types of prims to draw
713  unsigned myPickMask; // What geo entities to pick
714 
715  fpreal myMarkerSize; // point,vertex,breakpoint marker diam
716  float myNormalScale; // A size to scale the normal by
717  fpreal myVectorScale; // Scale custom vectors
718  float myLOD; // level of detail
719  float myHLOffsetVariable; // hidden line constant offset
720  float myHLOffsetConstant; // hidden line variable offset
721  float myWireWidth;
722  fpreal32 myWireBlend;
723  fpreal32 myInteriorWireAlpha;
724  GR_ParticleType myParticleDisplayType;
725  fpreal myDPIScale; // DPI scale factor
726  float myPointSize; // point size in pixels
727  float myDiscSize; // disc size
728  int myParticleTextureWidth; // in pixels
729  int myParticleTextureHeight; // in pixels
730  float myShadowOffsetVariable;// shadow constant offset
731  float myShadowOffsetConstant;// sadow line variable offset
732  int myShadowAA; // Antialiasing of shadow edges.
733  bool myUseLightShadowSize; // Shadowmap size source from light
734  int myShadowMapSize; // Shadowmap size or max size
735  int myReflectMapSize; // Reflect map resolution
736  fpreal myReflectMinLevel; // No reflect map below min level
737  int mySelectionListInst; // which selection instance to draw
738  int mySceneAntialias; // scene antialiasing (2^a samples).
739  int myTextureAnisotropy; // Texture anisotropic sampling
740  int myAmbOcclusionLevel; // 1-4, for more occlusion
741  int myLightSamples; // 1-64, for area/env light sampling
742  float myViewGamma;
743  bool myUseLUT;
744  UT_String myViewLUT;
745  bool myUseOCIO;
746  UT_String myOCIOColorspace;
747  float myViewBlack;
748  float myViewWhite;
749  int myViewComponents;
750  int myTransparentQuality; // Transparent object layering quality
751  fpreal myDisplacementQuality; // Bias displacement auto-LOD
752  int myVolumeQuality; // Volume slice quality
753  int myClosureSelection; // 0=hide, 1=hull geo only, 2=show
754 
755  fpreal myNormalCuspAngle;
756  int myVertNormalLimit;
757 
758  // 2D Textures
759  float myTextureScale; // 0.0-1.0
760  float myDynamicScale; // when dynamic cache adjust is on
761  int myMaxTextureWidth; // in pixels
762  int myMaxTextureHeight; // in pixels
763  int myHDRTextureFormat; // 2=full,1=16FP,0=8b,-1=compressed
764  int myDynamicFormat;
765 
766  // 3D Textures. If mySaveFlags.use2DTextureLimits is true, these are ignored
767  float myTexture3DScale; // 0.0-1.0
768  float myDynamic3DScale; // when dynamic cache adjust is on
769  int myMaxTexture3DWidth; // in pixels
770  int myMaxTexture3DHeight; // in pixels
771  int myMaxTexture3DDepth; // in pixels
772  int myHDRTexture3DFormat; // 2=full,1=16FP,0=8b,-1=compressed
773  int myDynamic3DFormat;
774 
775  int myTextureMemLimitMB; // max single texture size, in MB
776 
777  fpreal myInstancingFraction; // portion of instances to draw, 0..1
778  int myInstancingLimit; // #tris
779  int myInstancingLimitAction; // How to handle over-limit instances
780 
781  fpreal myMinHomeZoom; // minimum area to zoom to when homing
782 
783  GR_DisplayColor myCrtAuxColor; // current auxiliary color
784 
785  char myGotDefaults;
786  UT_String myColorScheme;
787 
788  UT_String myColorAttrib; // Color override parameters
789  int myColorType;
790  fpreal myColorDomain[2];
791 
792  GR_AlphaPass myAlphaPass; // Type of alpha pass
793  GR_DecorFontSize myDecorFontSize;
794 
795  fpreal myAgentLODBias;
796  int myAgentMinPoints;
797  int myAgentBaseLOD;
798  int myAgentMaxLOD;
799  int myAgentBoneDeform;
800  int myAgentWireMode;
801 
802  int myOnionSkinPreFrameCount;
803  int myOnionSkinPostFrameCount;
804  int myOnionSkinFrameInc;
805  UT_Color myOnionSkinPreFrameColor;
806  UT_Color myOnionSkinPostFrameColor;
807  fpreal myOnionSkinAlpha;
808 
809  gr_BBoxMode myBBoxMode;
810  int mySubdPolyLimit;
811 
812  UT_StringHolder myUVAttrib;
813 
814  static UT_SymbolMap<GR_SchemeColors *> *ourSchemeDefaults;
815  static UT_Array<GR_CommonDispOption *> ourInstancesArray;
816 
817  GR_HandleParts myHandleParts;
818 
819  struct grSaveFlags
820  {
821  unsigned drawTexture :1,
822  drawTransparent :1,
823  drawDisplacement :1,
824  drawTexturedSpots :1,
825  highQualityLighting:1,
826  ambientOcclusion :1,
827  limitTextureSize :1,
828  limitTexture3DSize :1,
829  mipMapTextures :1,
830  hdrRender :1,
831  drawShadows :1,
832  drawTransparentMaps:1,
833  removeBackface :1,
834  correctBG :1,
835  frameTime :1,
836  fillSelection :1,
837  solidOnly :1, // Only draw solid geometry.
838  // Don't bother with shading
839  // information (normals, etc).
840  drawPartSprite :1, // draw particles as sprites
841  orientDiscs :1, // draw particles as sprites
842 
843  drawPartOrigin :1, // draw particle origin
844  drawHandles :1, // draw handles
845  drawHullsOnly :1,
846  showObjectSelection:1, // object selection highlight
847 
848  shadeOpenCurves :1, // shade open curve in shaded
849  displayAsSubdiv :1, // display as subdiv
850  overrideColorAttrib:1, // override Cd attribute
851  use2DTexLimits :1, // 3D tex use 2D tex settings
852  dynamicTexControl :1, // dynamic texture cache
853  reduceTex2D :1, // controls - auto reduction of
854  reduceTex3D :1, // quality when resources are
855  reduceMipMap :1, // low.
856  reduceBitDepth :1, //
857  drawDiffuse :1,
858  drawAmbient :1,
859  drawEmission :1,
860  useLighting :1,
861  pointInstancing :1,
862  polygonConvexQuality:1,
863  autoDPIScale :1, // auto-set DPI scale
864  volumeWireAsPoints :1,
865  pickWireAsSolid :1, // pick wire prims as solid
866  agentLODEnable :1,
867  onionSkinEnable :1, // global onion skinning flag
868  cuspNormals :1,
869  enableReflectionMaps :1, // cubemap gen for refl obj
870  hdrReflectionMaps :1, // 8b or fp16 refl cubmaps
871  showGeoColor :1, // show or ignore Cd on geometry
872  interactiveEnable :1, // interactive mode is on
873  optPackedGeo :1, // optimize packed geo for GL
874  offsetVertexDecor :1;
875  };
876  grSaveFlags mySaveFlags; // flags that get saved
877 
878  struct grNoSaveFlags
879  {
880  unsigned snapToSelected :1, // snap to selection
881  showComponentSelections :1, // draw geometry component
882  showTempSelections :1, // draw temporary or cooked
883  // selections?
884  pickFrontFaces :1, // pick front-facing polygons
885  pickBackFaces :1, // pick back-facing polygons
886  drawAuxColors :1, // draw auxilary colors for
887  // things like prim axes
888  forceWireColor :1, // use wire color for wire
889  shadingOpenCurves :1, // shade open curves
890  drawMultiTexture :1, // mat layers in GUI_DispOpts
891  dynamicMipSetting :1,
892  interactive :1, // interactively moving
893  applyVisualizers :1; // master visualization toggle
894  };
895 
896  // These option can be auto-set by Houdini, so it is important to keep
897  // track of whether they have been manually set or loaded from defaults/hip
898  // so that they are not overwritten by the auto-set.
899  struct gr_UpdatedOptions
900  {
901  bool texSize;
902  bool tex3DSize;
903  bool shadowSize;
904  bool reflectSize;
905  bool hdrRender;
906  bool hdrTexture;
907  bool hdrReflect;
908  bool smoothLines;
909  bool sceneAA;
910  bool textureMem;
911  bool guideFont;
912  bool dpiScale;
913  } myUpdates;
914 
915  grNoSaveFlags myNoSaveFlags; // flags that don't get saved
916 
917  int myVisContext; // vis context (viewport index)
918  // assigned by vis manager.
919 
920  int myUniqueID;
921  int mySerialNum;
922  int mySerialView;
923  int mySerialID;
924  int *myGammaPassPtr; // ptr to gamma pass flag which
925  // can be changed during render
926 };
927 
928 inline void
930 {
931  float lod = (l>0.0) ? l : 0.001;
932  if(myLOD != lod)
933  {
934  myLOD = lod;
935  mySerialNum++;
936  }
937 }
938 
939 inline void
941 {
942  if(myColorAttrib != a)
943  {
944  myColorAttrib.harden(a);
945  mySerialNum++;
946  }
947 }
948 
949 inline void
951 {
952  if(myColorType != t)
953  {
954  myColorType = t;
955  mySerialNum ++;
956  }
957 }
958 
959 inline void
961 {
962  if(!SYSisEqual(myColorDomain[0], s) ||
963  !SYSisEqual(myColorDomain[1], e))
964  {
965  myColorDomain[0] = s;
966  myColorDomain[1] = e;
967  mySerialNum ++;
968  }
969 }
970 
971 
972 #undef FLAG_ACCESSORS
973 
974 #endif
void setPointSize(float size)
fpreal getAgentLODBias() const
void shadowOffsetVariable(float f)
int textureMemLimitMB() const
void setVisContext(int ctxt)
#define SYSmax(a, b)
Definition: SYS_Math.h:1365
void shadowOffsetConstant(float f)
int getOnionSkinPostFrameCount() const
bool defaultGuideFont() const
fpreal DPIScale() const
void offsetVertexDecor(bool use_offset)
void setMinHomeZoom(fpreal val)
fpreal reflectionMinLevel() const
void setHDRRendering(bool hdr)
const char * getViewLUT() const
fpreal getMarkerSize() const
int getSubdivisionPolyLimit() const
#define GET_ALPHA(func, val)
void interiorWireAlpha(float a)
float getPointSize() const
const UT_StringHolder & getUVDisplayAttrib() const
void setAgentMinPoints(int minp)
bool isOnionSkinEnabled() const
GR_ParticleType
Definition: GR_Defines.h:129
const UT_Color & getCurrentWireColor() const
void limitTexture3DSize(bool ls)
int getInstancingLimit() const
bool defaultDPIScale() const
GLuint color
Definition: glcorearb.h:1260
float shadowOffsetVariable() const
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
float interiorWireAlpha() const
float getViewGamma() const
GR_DisplayColor
void setMarkerSize(fpreal size)
void reflectionMinLevel(fpreal lvl)
bool defaultHDRTexture() const
bool offsetVertexDecor() const
void obsoleteOption(bool onoff)
bool hdrReflectionMaps() const
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1221
GLint GLuint mask
Definition: glcorearb.h:123
int getTransparentQuality() const
bool obsoleteOption() const
float hlOffsetConstant() const
void getColorDomain(fpreal &s, fpreal &e) const
int getViewComponents() const
fpreal getDisplacementQuality() const
bool useReflectionMaps() const
bool defaultSmoothLines() const
float hlOffsetVariable() const
fpreal getInstancingFraction() const
GR_AlphaPass
Definition: GR_Defines.h:107
void wireBlend(float blend)
GLsizeiptr size
Definition: glcorearb.h:663
void setInstancingLimitAction(int action)
int getVertexNormalLimit() const
GLint GLsizei width
Definition: glcorearb.h:102
void shadedBoundingBoxes(gr_BBoxMode m)
const UT_Color & getOnionSkinPostFrameColor() const
GLuint id
Definition: glcorearb.h:654
void reflectionMapSize(int wh)
bool defaultShadowSize() const
bool defaultHDRRender() const
GR_AlphaPass alphaPass() const
void textureMemLimitMB(int max_size)
float shadowOffsetConstant() const
void hlOffsetVariable(float f)
void setColorAttrib(const char *a)
fpreal vectorScale() const
void setViewSerialNum(int s, int id)
GLfloat f
Definition: glcorearb.h:1925
void setGammaPassPtr(int *p)
void setSubdivisionPolyLimit(int limit)
fpreal markerSize() const
int getAmbOcclusionLevel() const
#define FLAG_ACCESSORS_BUMP_OPTS(FLAGS, METHOD, FLAG)
int getAgentMinPoints() const
GR_HandleParts & handleParts()
void setDecorFontSize(GR_DecorFontSize s)
int getOnionSkinPreFrameCount() const
float getViewBlack() const
#define FLAG_ACCESSORS(FLAGS, METHOD, FLAG)
GU_SelectionRule
Definition: GU_SelectType.h:40
void setWireWidth(float width)
const GR_HandleParts & handleParts() const
void volumeWireAsPoints(bool vw)
const char * getOCIOColorspace() const
bool defaultSceneAA() const
const UT_Color & getColor(GR_DisplayColor color_name, bool gamma=false) const
int getAgentBaseLODLevel() const
void harden()
Take shallow copy and make it deep.
Definition: UT_String.h:213
float getViewWhite() const
GR_DecorFontSize
Definition: GR_Defines.h:175
#define GR_API
Definition: GR_API.h:10
bool limitTextureSize() const
bool volumeWireAsPoints() const
void alphaPass(GR_AlphaPass pass)
void hlOffsetConstant(float f)
bool defaultTextureSize() const
GLfloat GLfloat GLfloat alpha
Definition: glcorearb.h:111
int getAgentBoneDeform() const
void setNormalCuspAngle(fpreal a)
bool defaultHDRReflect() const
unsigned pickMask() const
bool optimizePackedGeometry() const
float getWireWidth() const
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1221
void setUVDisplayAttrib(const UT_StringHolder &attrib)
void setOnionSkinEnable(bool enable)
void setAmbOcclusionLevel(int lvl)
const UT_Color & crtAuxColor() const
GA_PrimCompat::TypeMask primMask() const
void setDisplacementQuality(fpreal q)
int getDynamic3DFormat() const
GLenum mode
Definition: glcorearb.h:98
void setInstancingLimit(int limit)
void setInstancingFraction(fpreal s)
int getAgentNumLODLevels() const
int selectionListInst() const
bool getDynamicMipMap() const
Contains transitional objects to provide some backward compatibility for code that references old GEO...
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:107
void discSize(float size)
const UT_String & visibleObjects() const
bool default3DTextureSize() const
double fpreal
Definition: SYS_Types.h:263
void hdrReflectionMaps(bool e)
void setUseLightShadowSize(bool e)
bool getHDRRendering() const
const char * colorAttrib() const
int getOnionSkinFrameIncrement() const
float selectionWireWidth() const
#define GET_COL(func, val)
void setOCIOColorspace(const char *cs)
void selectionListInst(int inst)
void setVertexNormalLimit(int poly_limit)
void useReflectionMaps(bool e)
float normalScale() const
int getInstancingLimitAction() const
void setAgentWireMode(int mode)
const UT_Color & locateColor(fpreal &alpha) const
int getSceneAntialias() const
void primMask(GA_PrimCompat::TypeMask mask)
bool useLightShadowSize() const
void pickMask(unsigned mask)
GLuint GLfloat * val
Definition: glcorearb.h:1607
float getNormalScale() const
fpreal getMinHomeZoom() const
void limitTextureSize(bool ls)
const UT_String & getColorScheme(void) const
void setTransparentQuality(int q)
const UT_Color & getOnionSkinPreFrameColor() const
void setColorDomain(fpreal s, fpreal e)
void setAgentBaseLODLevel(int lvl)
gr_BBoxMode shadedBoundingBoxes() const
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
void optimizePackedGeometry(bool opt)
GLboolean r
Definition: glcorearb.h:1221
#define const
Definition: zconf.h:214
void setViewLUT(const char *lut)
fpreal getOnionSkinAlpha() const
int reflectionMapSize() const
bool defaultReflectSize() const
const UT_Color & color(GR_DisplayColor c) const
RE_TextureCompress
void visibleObjects(const char *mask)
bool limitTexture3DSize() const
GR_DecorFontSize getDecorFontSize() const
float fpreal32
Definition: SYS_Types.h:184
GLint lod
Definition: glcorearb.h:2764
bool defaultTextureMem() const
fpreal getVectorScale() const
void setAgentNumLODLevels(int lvls)