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 
470  {
474  CURRENT_SHADING_BBOX // follow the current shading mode
475  };
476  void shadedBoundingBoxes(gr_BBoxMode m) { myBBoxMode = m; }
477  gr_BBoxMode shadedBoundingBoxes() const { return myBBoxMode; }
478 
479  // "Get" methods:
480  const UT_String &
481  visibleObjects() const { return myVisibleObjects; }
482  GA_PrimCompat::TypeMask primMask() const { return myPrimMask; }
483  unsigned pickMask() const { return myPickMask; }
484  float normalScale() const { return myNormalScale; }
485  float getNormalScale() const { return myNormalScale; }
486  fpreal vectorScale() const { return myVectorScale; }
487  fpreal getVectorScale() const { return myVectorScale; }
488  float LOD() const { return myLOD; }
489  float hlOffsetVariable() const { return myHLOffsetVariable; }
490  float hlOffsetConstant() const { return myHLOffsetConstant; }
491  float wireWidth() const { return SYSmax(0.1,
492  myWireWidth*myDPIScale); }
493  float selectionWireWidth()const { return (wireWidth() > 1.0)
494  ? wireWidth() + 1.0
495  : wireWidth() * 2.0; }
496  float getWireWidth() const { return myWireWidth; }
497  float wireBlend() const { return SYSclamp(myWireBlend,
498  0.0, 1.0); }
499  float interiorWireAlpha() const { return myInteriorWireAlpha; }
500  float pointSize() const { return myPointSize*myDPIScale; }
501  float getPointSize() const { return myPointSize; }
502  float discSize() const { return myDiscSize; }
503  float shadowOffsetVariable() const { return myShadowOffsetVariable; }
504  float shadowOffsetConstant() const { return myShadowOffsetConstant; }
505  int shadowAA() const { return myShadowAA; }
506  bool useLightShadowSize() const { return myUseLightShadowSize; }
507  int getShadowMapSize() const { return myShadowMapSize; }
508  int selectionListInst() const { return mySelectionListInst; }
509 
510  const char *colorAttrib() const { return myColorAttrib; }
511  int colorType() const { return myColorType; }
512  void getColorDomain(fpreal &s, fpreal &e) const
513  { s = myColorDomain[0];
514  e = myColorDomain[1]; }
515 
516  int getSceneAntialias() const { return mySceneAntialias; }
517  bool getHDRRendering() const { return mySaveFlags.hdrRender; }
518  float getViewGamma() const { return myViewGamma; }
519  bool useViewLUT() const { return myUseLUT; }
520  const char *getViewLUT() const { return myViewLUT; }
521  bool useOCIO() const { return myUseOCIO; }
522  const char *getOCIOColorspace() const { return myOCIOColorspace; }
523  float getViewBlack() const { return myViewBlack; }
524  float getViewWhite() const { return myViewWhite; }
525  int getViewComponents() const { return myViewComponents; }
526 
527  int getAmbOcclusionLevel() const { return myAmbOcclusionLevel; }
528 
529  fpreal getInstancingFraction() const { return myInstancingFraction; }
530  int getInstancingLimit() const { return myInstancingLimit; }
532  { return myInstancingLimitAction; }
533 
534  fpreal getMinHomeZoom() const { return myMinHomeZoom; }
535 
536  // In millions of polygons (eg, 10 for 10M).
537  int getSubdivisionPolyLimit() const { return mySubdPolyLimit; }
538 
539  // "Set" methods:
540  void visibleObjects(const char *mask)
541  { myVisibleObjects.harden(mask); }
543  { myPrimMask = mask; }
544  void pickMask(unsigned mask) { myPickMask = mask; }
545  void setNormalScale(float s);
546  void setVectorScale(float s);
547 
548  void useRegularAuxColor() { myCrtAuxColor=GR_AUX_GEO_COLOR; }
550 
551  void setCurrentWireColor(const UT_Color &color);
552  void setCurrentWireColor(GR_DisplayColor color);
553  const UT_Color &getCurrentWireColor() const { return myCurrentWireColor[0]; }
554 
555  void LOD(float l);
556  void hlOffsetVariable(float f) { myHLOffsetVariable = (f>=0.0f)
557  ? f :0.0f;}
558  void hlOffsetConstant(float f) { myHLOffsetConstant = (f>=0.0f)
559  ? f :0.0f;}
560  void setWireWidth(float width) { myWireWidth = width;}
561  void wireBlend(float blend) { myWireBlend = blend;}
562  void interiorWireAlpha(float a) { myInteriorWireAlpha
563  = SYSclamp(a, 0.0f, 1.0f); }
564  void setPointSize(float size) { myPointSize = size; }
565  void discSize(float size) { myDiscSize = size; }
567  { myShadowOffsetVariable = (f>=0.0f) ? f : 0.0f;}
569  { myShadowOffsetConstant = (f>=0.0f) ? f : 0.0f;}
570  void shadowAA(int aa) { myShadowAA = SYSclamp(aa, 1,4); }
571  void selectionListInst(int inst) { mySelectionListInst = inst; }
572  void setUseLightShadowSize(bool e) { myUseLightShadowSize = e; }
573  void setShadowMapSize(int s) { myShadowMapSize = s;
574  myUpdates.shadowSize = true; }
575 
576  void setColorAttrib(const char *a);
577  void setColorType(int t);
578  void setColorDomain(fpreal s, fpreal e);
579 
580  void setSceneAntialias(int a) { mySceneAntialias = SYSmax(a,0);
581  myUpdates.sceneAA = true; }
582 
583  void setHDRRendering(bool hdr) { mySaveFlags.hdrRender = hdr;
584  myUpdates.hdrRender = true; }
585 
586  void setViewGamma(float gamma);
587  void setUseViewLUT(bool b) { myUseLUT = b; }
588  void setViewLUT(const char *lut) { myViewLUT.harden(lut); }
589  void useOCIO(bool use) { myUseOCIO = use; }
590  void setOCIOColorspace(const char *cs)
591  { myOCIOColorspace.harden(cs); }
592  void setViewBlack(float b) { myViewBlack = b; }
593  void setViewWhite(float w) { myViewWhite = w; }
594  void setViewComponents(int c) { myViewComponents = c; }
595  void setAmbOcclusionLevel(int lvl)
596  { myAmbOcclusionLevel = SYSclamp(lvl, 1, 4); }
597 
599  { if(!SYSisEqual(s, myInstancingFraction))
600  mySerialNum++;
601  myInstancingFraction = s; }
602  void setInstancingLimit(int limit)
603  { limit = SYSmax(0, limit);
604  if(!SYSisEqual(limit, myInstancingLimit))
605  mySerialNum++;
606  myInstancingLimit = limit;
607  }
608  void setInstancingLimitAction(int action)
609  { myInstancingLimitAction = SYSclamp(action, 0,2); }
610 
612  { myMinHomeZoom = SYSmax(val, 0.01); }
613 
614  // In millions of polygons (eg, 10 for 10M).
615  void setSubdivisionPolyLimit(int limit)
616  {
617  limit = SYSmax(0, limit);
618  if(limit != mySubdPolyLimit)
619  mySerialNum++;
620  mySubdPolyLimit = limit;
621  }
622 
624  {
625  if(myUVAttrib != attrib)
626  {
627  mySerialNum++;
628  myUVAttrib = attrib;
629  }
630  }
631  const UT_StringHolder &getUVDisplayAttrib() const { return myUVAttrib; }
632 
633  // Onion skinning
634  bool isOnionSkinEnabled() const
635  { return mySaveFlags.onionSkinEnable; }
637  { return myOnionSkinFrameInc; }
639  { return myOnionSkinPreFrameCount; }
641  { return myOnionSkinPostFrameCount; }
643  { return myOnionSkinPreFrameColor; }
645  { return myOnionSkinPostFrameColor; }
646  fpreal getOnionSkinAlpha() const { return myOnionSkinAlpha; }
647 
648  void setOnionSkinEnable(bool enable)
649  { mySaveFlags.onionSkinEnable = enable; }
650 
651  void setOnionSkinParms(int frame_inc,
652  int pre_count,
653  int post_count,
654  UT_Color pre_color,
655  UT_Color post_color,
656  fpreal alpha);
657 
658  // These are used to determine if geometry-related parms have changed on a
659  // very coarse level.
660  int getUniqueID() const { return myUniqueID; }
661  int getSerialNum() const { return mySerialNum; }
662 
663  // changes when the view is changed. ID changes if the rendered viewport
664  // is different.
665  int getViewSerialNum() const { return mySerialView; }
666  int getViewSerialID() const { return mySerialID; }
667  void setViewSerialNum(int s, int id)
668  {
669  mySerialView = s;
670  mySerialID = id;
671  }
672 
673  bool defaultTextureSize() const { return !myUpdates.texSize; }
674  bool default3DTextureSize() const{ return !myUpdates.tex3DSize; }
675  bool defaultShadowSize() const { return !myUpdates.shadowSize; }
676  bool defaultReflectSize() const { return !myUpdates.reflectSize; }
677  bool defaultHDRTexture() const { return !myUpdates.hdrTexture; }
678  bool defaultHDRRender() const { return !myUpdates.hdrRender; }
679  bool defaultHDRReflect() const { return !myUpdates.hdrReflect; }
680  bool defaultSmoothLines() const { return !myUpdates.smoothLines; }
681  bool defaultSceneAA() const { return !myUpdates.sceneAA; }
682  bool defaultTextureMem() const { return !myUpdates.textureMem; }
683  bool defaultGuideFont() const { return !myUpdates.guideFont; }
684  bool defaultDPIScale() const { return !myUpdates.dpiScale; }
685 
686  // Turns on the closure selection on hull-based or all geometry
687  int closureSelection() const { return myClosureSelection; }
688  void closureSelection(int s) { myClosureSelection=SYSclamp(s,0,2); }
689 
690  int getVisContext() const { return myVisContext; }
691  void setVisContext(int ctxt) { myVisContext = ctxt; }
692 
693  // dummy callbacks for obsolete options.
694  bool obsoleteOption() const { return false; }
695  void obsoleteOption(bool onoff) {}
696 
697 private:
698  void loadDefaultColors();
699  void getColorsByName();
700 
701  // data
702  UT_Color myColors[GR_NUM_DISPLAY_COLORS][2];
703  fpreal myAlphas[GR_NUM_DISPLAY_ALPHAS];
704  UT_Color myCurrentWireColor[2];
705 
706  UT_String myVisibleObjects; // Visibility mask
707  GA_PrimCompat::TypeMask myPrimMask; // What types of prims to draw
708  unsigned myPickMask; // What geo entities to pick
709 
710  fpreal myMarkerSize; // point,vertex,breakpoint marker diam
711  float myNormalScale; // A size to scale the normal by
712  fpreal myVectorScale; // Scale custom vectors
713  float myLOD; // level of detail
714  float myHLOffsetVariable; // hidden line constant offset
715  float myHLOffsetConstant; // hidden line variable offset
716  float myWireWidth;
717  fpreal32 myWireBlend;
718  fpreal32 myInteriorWireAlpha;
719  GR_ParticleType myParticleDisplayType;
720  fpreal myDPIScale; // DPI scale factor
721  float myPointSize; // point size in pixels
722  float myDiscSize; // disc size
723  int myParticleTextureWidth; // in pixels
724  int myParticleTextureHeight; // in pixels
725  float myShadowOffsetVariable;// shadow constant offset
726  float myShadowOffsetConstant;// sadow line variable offset
727  int myShadowAA; // Antialiasing of shadow edges.
728  bool myUseLightShadowSize; // Shadowmap size source from light
729  int myShadowMapSize; // Shadowmap size or max size
730  int myReflectMapSize; // Reflect map resolution
731  fpreal myReflectMinLevel; // No reflect map below min level
732  int mySelectionListInst; // which selection instance to draw
733  int mySceneAntialias; // scene antialiasing (2^a samples).
734  int myTextureAnisotropy; // Texture anisotropic sampling
735  int myAmbOcclusionLevel; // 1-4, for more occlusion
736  int myLightSamples; // 1-64, for area/env light sampling
737  float myViewGamma;
738  bool myUseLUT;
739  UT_String myViewLUT;
740  bool myUseOCIO;
741  UT_String myOCIOColorspace;
742  float myViewBlack;
743  float myViewWhite;
744  int myViewComponents;
745  int myTransparentQuality; // Transparent object layering quality
746  fpreal myDisplacementQuality; // Bias displacement auto-LOD
747  int myVolumeQuality; // Volume slice quality
748  int myClosureSelection; // 0=hide, 1=hull geo only, 2=show
749 
750  fpreal myNormalCuspAngle;
751  int myVertNormalLimit;
752 
753  // 2D Textures
754  float myTextureScale; // 0.0-1.0
755  float myDynamicScale; // when dynamic cache adjust is on
756  int myMaxTextureWidth; // in pixels
757  int myMaxTextureHeight; // in pixels
758  int myHDRTextureFormat; // 2=full,1=16FP,0=8b,-1=compressed
759  int myDynamicFormat;
760 
761  // 3D Textures. If mySaveFlags.use2DTextureLimits is true, these are ignored
762  float myTexture3DScale; // 0.0-1.0
763  float myDynamic3DScale; // when dynamic cache adjust is on
764  int myMaxTexture3DWidth; // in pixels
765  int myMaxTexture3DHeight; // in pixels
766  int myMaxTexture3DDepth; // in pixels
767  int myHDRTexture3DFormat; // 2=full,1=16FP,0=8b,-1=compressed
768  int myDynamic3DFormat;
769 
770  int myTextureMemLimitMB; // max single texture size, in MB
771 
772  fpreal myInstancingFraction; // portion of instances to draw, 0..1
773  int myInstancingLimit; // #tris
774  int myInstancingLimitAction; // How to handle over-limit instances
775 
776  fpreal myMinHomeZoom; // minimum area to zoom to when homing
777 
778  GR_DisplayColor myCrtAuxColor; // current auxiliary color
779 
780  char myGotDefaults;
781  UT_String myColorScheme;
782 
783  UT_String myColorAttrib; // Color override parameters
784  int myColorType;
785  fpreal myColorDomain[2];
786 
787  GR_AlphaPass myAlphaPass; // Type of alpha pass
788  GR_DecorFontSize myDecorFontSize;
789 
790  fpreal myAgentLODBias;
791  int myAgentMinPoints;
792  int myAgentBaseLOD;
793  int myAgentMaxLOD;
794  int myAgentBoneDeform;
795  int myAgentWireMode;
796 
797  int myOnionSkinPreFrameCount;
798  int myOnionSkinPostFrameCount;
799  int myOnionSkinFrameInc;
800  UT_Color myOnionSkinPreFrameColor;
801  UT_Color myOnionSkinPostFrameColor;
802  fpreal myOnionSkinAlpha;
803 
804  gr_BBoxMode myBBoxMode;
805  int mySubdPolyLimit;
806 
807  UT_StringHolder myUVAttrib;
808 
809  static UT_SymbolMap<GR_SchemeColors *> *ourSchemeDefaults;
810  static UT_Array<GR_CommonDispOption *> ourInstancesArray;
811 
812  GR_HandleParts myHandleParts;
813 
814  struct grSaveFlags
815  {
816  unsigned drawTexture :1,
817  drawTransparent :1,
818  drawDisplacement :1,
819  drawTexturedSpots :1,
820  highQualityLighting:1,
821  ambientOcclusion :1,
822  limitTextureSize :1,
823  limitTexture3DSize :1,
824  mipMapTextures :1,
825  hdrRender :1,
826  drawShadows :1,
827  drawTransparentMaps:1,
828  removeBackface :1,
829  correctBG :1,
830  frameTime :1,
831  fillSelection :1,
832  solidOnly :1, // Only draw solid geometry.
833  // Don't bother with shading
834  // information (normals, etc).
835  drawPartSprite :1, // draw particles as sprites
836  orientDiscs :1, // draw particles as sprites
837 
838  drawPartOrigin :1, // draw particle origin
839  drawHandles :1, // draw handles
840  drawHullsOnly :1,
841  showObjectSelection:1, // object selection highlight
842 
843  shadeOpenCurves :1, // shade open curve in shaded
844  displayAsSubdiv :1, // display as subdiv
845  overrideColorAttrib:1, // override Cd attribute
846  use2DTexLimits :1, // 3D tex use 2D tex settings
847  dynamicTexControl :1, // dynamic texture cache
848  reduceTex2D :1, // controls - auto reduction of
849  reduceTex3D :1, // quality when resources are
850  reduceMipMap :1, // low.
851  reduceBitDepth :1, //
852  drawDiffuse :1,
853  drawAmbient :1,
854  drawEmission :1,
855  useLighting :1,
856  pointInstancing :1,
857  polygonConvexQuality:1,
858  autoDPIScale :1, // auto-set DPI scale
859  volumeWireAsPoints :1,
860  pickWireAsSolid :1, // pick wire prims as solid
861  agentLODEnable :1,
862  onionSkinEnable :1, // global onion skinning flag
863  cuspNormals :1,
864  enableReflectionMaps :1, // cubemap gen for refl obj
865  hdrReflectionMaps :1, // 8b or fp16 refl cubmaps
866  showGeoColor :1, // show or ignore Cd on geometry
867  interactiveEnable :1, // interactive mode is on
868  optPackedGeo :1; // optimize packed geo for GL
869  };
870  grSaveFlags mySaveFlags; // flags that get saved
871 
872  struct grNoSaveFlags
873  {
874  unsigned snapToSelected :1, // snap to selection
875  showComponentSelections :1, // draw geometry component
876  showTempSelections :1, // draw temporary or cooked
877  // selections?
878  pickFrontFaces :1, // pick front-facing polygons
879  pickBackFaces :1, // pick back-facing polygons
880  drawAuxColors :1, // draw auxilary colors for
881  // things like prim axes
882  forceWireColor :1, // use wire color for wire
883  shadingOpenCurves :1, // shade open curves
884  drawMultiTexture :1, // mat layers in GUI_DispOpts
885  dynamicMipSetting :1,
886  interactive :1, // interactively moving
887  applyVisualizers :1; // master visualization toggle
888  };
889 
890  // These option can be auto-set by Houdini, so it is important to keep
891  // track of whether they have been manually set or loaded from defaults/hip
892  // so that they are not overwritten by the auto-set.
893  struct gr_UpdatedOptions
894  {
895  bool texSize;
896  bool tex3DSize;
897  bool shadowSize;
898  bool reflectSize;
899  bool hdrRender;
900  bool hdrTexture;
901  bool hdrReflect;
902  bool smoothLines;
903  bool sceneAA;
904  bool textureMem;
905  bool guideFont;
906  bool dpiScale;
907  } myUpdates;
908 
909  grNoSaveFlags myNoSaveFlags; // flags that don't get saved
910 
911  int myVisContext; // vis context (viewport index)
912  // assigned by vis manager.
913 
914  int myUniqueID;
915  int mySerialNum;
916  int mySerialView;
917  int mySerialID;
918  int *myGammaPassPtr; // ptr to gamma pass flag which
919  // can be changed during render
920 };
921 
922 inline void
924 {
925  float lod = (l>0.0) ? l : 0.001;
926  if(myLOD != lod)
927  {
928  myLOD = lod;
929  mySerialNum++;
930  }
931 }
932 
933 inline void
935 {
936  if(myColorAttrib != a)
937  {
938  myColorAttrib.harden(a);
939  mySerialNum++;
940  }
941 }
942 
943 inline void
945 {
946  if(myColorType != t)
947  {
948  myColorType = t;
949  mySerialNum ++;
950  }
951 }
952 
953 inline void
955 {
956  if(!SYSisEqual(myColorDomain[0], s) ||
957  !SYSisEqual(myColorDomain[1], e))
958  {
959  myColorDomain[0] = s;
960  myColorDomain[1] = e;
961  mySerialNum ++;
962  }
963 }
964 
965 
966 #undef FLAG_ACCESSORS
967 
968 #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 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
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)