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