HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUI_GeoRender.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: GUI_GeoRender.h ( GUI Library, C++)
7  *
8  * COMMENTS:
9  * General rendering class for a GU_Detail.
10  */
11 #ifndef GUI_GeoRender_h
12 #define GUI_GeoRender_h
13 
14 #include <UT/UT_BoundingBox.h>
15 #include <UT/UT_Lock.h>
16 #include <UT/UT_Optional.h>
17 #include <UT/UT_Rect.h>
18 #include <UT/UT_Set.h>
19 #include <UT/UT_String.h>
20 #include <UT/UT_StringMap.h>
21 #include <UT/UT_StopWatch.h>
22 #include <UT/UT_Matrix4.h>
23 #include <UT/UT_ValArray.h>
24 #include <UT/UT_UniquePtr.h>
25 #include <UT/UT_Array.h>
26 #include <DEP/DEP_MicroNode.h>
27 #include <RE/RE_Types.h>
28 #include <RE/RE_Texture.h>
29 #include <RE/RE_TimerQuery.h>
31 #include <RE/RE_RenderContext.h>
32 #include <GA/GA_Attribute.h>
33 #include <GR/GR_Defines.h>
34 #include <GR/GR_Material.h>
35 #include <GR/GR_RenderInfo.h>
36 #include <GT/GT_Primitive.h>
37 #include <GU/GU_DetailHandle.h>
38 #include <GU/GU_SelectType.h>
39 #include "GUI_GroupData.h"
40 #include "GUI_RenderCommon.h"
41 #include "GUI_DisplayOption.h"
42 #include "GUI_DetailLook.h"
43 #include "GUI_PrimitiveHook.h"
44 #include "GUI_RenderCommon.h"
45 #include "GUI_API.h"
46 
47 class GA_EdgeGroup;
48 class GA_ElementGroup;
49 class GU_Detail;
50 class GEO_PrimClassifier;
52 class RE_Render;
53 class RE_Geometry;
54 class GR_LightList;
55 class RE_ReflectMap;
56 class RE_Shader;
57 class RE_VertexArray;
58 class RE_ElementArray;
59 class GUI_DetailLook;
60 class GA_ROAttributeRef;
61 class GA_PointGroup;
62 class GA_EdgeGroup;
63 class GA_PrimitiveGroup;
65 class GEO_Primitive;
66 class GR_DisplayOption;
68 class gui_AttribInfo;
69 class gui_CollectionPrim;
70 class GR_Primitive;
72 class GT_RefineParms;
73 class OBJ_Node;
74 class gui_HookedPrims;
75 class gr_PrimEntry;
76 class GR_VisualizerInfo;
77 class gui_RenderHookEntry;
78 class gui_UpdateResults;
79 class GUI_ObjectMaterialCache;
80 class GR_Uniforms;
81 
82 using GUI_PrimTypeKey = std::pair<GA_PrimitiveTypeId, GT_PrimitiveType>;
83 
85 {
86 public:
88  const char *name,
89  int geo_index,
90  int name_index);
91  virtual ~GUI_GeoRender();
92 
93  virtual const char *className() const { return "GUI_GeoRender"; }
94 
95  virtual bool isLopRender() const { return false; }
96 
97  void setGeometry(OP_Node *node);
98  OP_Node *getGeometry() const;
99 
100  // set the base geometry name for the cache name.
101  void setGeoName(const char *name);
102  // set the cache name to exactly 'name'. Only used for instancing.
103  void setInstanceName(const char *name);
104 
105  const char *getCacheName() const { return myCacheName; }
106 
107  // the index of the detail within the GUI_DetailLook.
108  void setGeoIndex(int idx) { myGeoIndex = idx; }
109  int getGeoIndex() const { return myGeoIndex; }
110  void setNameIndex(int idx) { myNameIndex = idx; }
111  int getNameIndex() const { return myNameIndex; }
112 
113  // If this represents a node, this will return its node id.
114  int getNodeID() const { return myNodeID; }
115 
116  // If this represents some guide geometry, the index within a list of
117  // guides is tracked through these methods.
118  void setGuideID(int id) { myGuideID = id; }
119  int getGuideID() const { return myGuideID; }
120 
121  // The geometry this object will be rendering.
122  void setDetailHandle(const GU_ConstDetailHandle &handle);
123  virtual GU_ConstDetailHandle &getDetailHandle() { return myDetailHandle; }
124 
125  // control the display of the GUI_GeoRender object. Those not displayed
126  // cannot be rendered or picked.
127  void setDisplayed(bool is_disp) { myIsDisplayed = is_disp; }
128  bool isDisplayed() const { return myIsDisplayed; }
129 
130  // local transform of the object
131  bool setDetailTransform(const UT_DMatrix4 &xform);
132  const UT_DMatrix4 &getDetailTransform(int index) const;
133  const UT_DMatrix4 &getDetailInvTransform(int index) const;
135  { return myDetailTransforms.entries(); }
137  { myDetailFullTransform = xform; }
139  { return myDetailFullTransform; }
140 
141  // For an instance object, this is the instance object's transform. The
142  // detail transforms are the individual point transforms.
144  { myInstancerTransform = xform;
145  myInstancerIdentityFlag = xform.isIdentity(); }
147  { myInstancerTransform.identity();
148  myInstancerIdentityFlag = true; }
150  { return myInstancerTransform; }
151 
152  const UT_BoundingBox &localBBox();
153  const UT_BoundingBox &worldBBox();
154 
155  bool updateBBox();
156 
157 
158  // bounding box of this object
159  virtual int getBoundingBox2D(UT_BoundingBox &bbox,
160  const char *name,
161  int use_vertex) const;
162  virtual int getBoundingBox3D(UT_BoundingBox &bbox,
163  const UT_Matrix3R *rot) const;
164 
165  int getInstancedBoundingBox3D(UT_BoundingBox &bbox,
166  const UT_Matrix3R *rot,
167  const UT_DMatrix4 &detail_xform) const;
168 
169  // set the view * projection matrix
170  static void setWorldToScreen(const UT_Matrix4R &xform);
171 
172  // instanced transforms for the object, when point instancing
173  void setIsInstancedGeo(bool instanced);
174  bool addInstanceTransform(const UT_DMatrix4 &xform,
175  int geo_index);
176  void clearInstanceTransforms();
177  void setInstanceVersion(int64 version);
178  int64 getInstanceVersion() const;
179 
180  // setup() called before any update or drawing is done, and cleanup() is
181  // called when all rendering is complete for the current redraw.
182  virtual GUI_SetupResult setup(const GUI_DisplayOption &disp_opt,
183  GUI_DisplaySetType state,
184  bool show_selection,
185  GR_DecorationOverride selmask_dec,
186  GR_DecorationOverride &select_dec,
187  bool &needs_alpha,
188  bool is_current);
189 
190  // minimal setup for multiple viewports (such as a quad config). One
191  // viewport is called with setup(), the others fastSetup().
192  virtual bool fastSetup(const GUI_DisplayOption &disp_opt);
193 
194  virtual void update(RE_RenderContext r,
195  GR_DisplayOption *opt,
196  GUI_SetupResult setup_reason,
197  GR_DecorationOverride selmask_dec,
198  const char *view_name,
199  bool &needs_alpha,
200  const GR_FrustumList &view_frustums);
201 
202  // Update run in parallel, during Vulkan Update. Only called
203  // if look is marked as needing parallel update in serial update
204  // and `hasParallelUpdate` returns true
205  virtual void updateParallel(RE_RenderContext r,
206  GR_DisplayOption *opt,
207  GUI_SetupResult setup_reason,
208  GR_DecorationOverride selmask_dec,
209  const char *view_name,
210  bool &needs_alpha,
211  const GR_FrustumList &view_frustums);
212  virtual bool hasParallelUpdate() const;
213 
214  void updateRenderVersion(RE_RenderContext r);
215 
216  virtual void cleanup(RE_RenderContext r);
217 
218  bool isSetup() const { return mySetupFlag; }
219  bool needsAlphaPass() const { return myNeedsAlphaPassFlag; }
220  void needsAlphaPass(bool need) { myNeedsAlphaPassFlag=need;}
221 
223  { return myMaterialTexturePending; }
224 
225  void addMaterialReference(OP_Node *mat_node);
226  void removeMaterialReference(OP_Node *mat_node);
227  void clearMaterialReferences();
228 
229  // called when this look is no longer displayed and placed in a short cache
230  // in case it is displayed again.
231  void retire();
232 
233  // Called when an object isn't displayed anymore, aka retire()-lite.
234  void hide();
235 
236  // Return true if gl_lit is set on the contained detail.
237  bool isLit() const { return myLitFlag; }
238 
239  // return true if this geo has guide rendering
240  bool hasGuideParts() const { return myHasGuideParts; }
241 
242  // Return if gl_wireframe is set to a positive value.
243  bool forceWireframe() const { return myWireframeFlag; }
244 
245  // Return if gl_wireframe is set to a negative value.
246  bool forceShaded() const { return myForceShadedFlag; }
247 
248  // Return if gl_xray is set to a positive value.
249  bool forceXRay() const { return myXRayFlag; }
250 
251  // Return true if should be drawn shaded in the beauty pass
252  // with current settings, false if it should be drawn wireframe
253  bool shouldDrawShaded(GUI_DisplayOption &disp_opt) const;
254 
255  // The post-pass ID is used to setup and render post-render passes
256  void setPostPassID(int id) { myPostPassID = id ; }
257  int getPostPassID() const { return myPostPassID; }
258 
259  // An additional deferred pass is required (not a post pass).
260  bool needsDeferredPass() const { return myNeedsDeferredPass;}
261  void setNeedsDeferredPass(bool need)
262  { myNeedsDeferredPass = need;}
263  void setDeferredPass(bool dpass) { myIsDeferPass = dpass; }
264  bool isDeferredPass() const { return myIsDeferPass; }
265 
266  // An additional parallel primary pass is required (not a post pass).
267  bool needsParallelPass() const { return myNeedsParallelPass;}
268 
269  // Returns the time in seconds of various operations
270  fpreal getSetupTime() const { return fpreal(mySetupTime)*1e-9;}
271  fpreal getDrawTime() const { return fpreal(myDrawTime)*1e-9;}
272 
273  virtual bool isObjectRender() const { return false; }
274 
276  { return myMaterialHasReflection; }
277 
278  void setGhosted(bool ghost)
279  { myInfo.myObjectGhosted = ghost; }
280  void setObjectSelection(int obj_selection)
281  { myInfo.myObjectSelection = obj_selection; }
282  void setCanRenderUV(int uv_render)
283  { myInfo.myCanRenderUV = uv_render; }
284  bool canRenderUV() const
285  {
286  return myInfo.myCanRenderUV;
287  }
288 
289  bool getComponentSelection(
290  const GR_DisplayOption *opt,
291  GR_SelectionAdapter &adapter) const;
292 
293  // DRAWING --------------------------------------------------------------
294 
295  // wire representation of all objects.
296  virtual void wireframeRender(RE_RenderContext r,
297  GUI_DisplayOption &disp_opt,
299  GR_RenderFlags render_flags);
300 
301  // Beauty pass shaded render.
302  virtual GUI_RenderPassFlags
303  beautyRender(RE_RenderContext r,
304  GUI_DisplayOption &disp_opt,
305  GR_ShadingPass shade_pass,
306  GR_AlphaPass alphapass,
308  GR_RenderFlags render_flags);
309 
310  static void setupRender(RE_RenderContext r, GR_RenderMode mode);
311  static void cleanupRender(RE_RenderContext r, GR_RenderMode mode);
312 
314  const GUI_DisplayOption &disp_opt,
315  UT_Vector4F &ghost_color,
316  fpreal ghost_amount = 0.5);
318 
319  // Various simple rendering, such as matte or depth.
320  virtual void utilityRender(RE_RenderContext r,
321  GUI_DisplayOption &disp_opt,
323  GR_RenderFlags rflags);
324 
325  // rendering for post-render passes that primitives request.
326  virtual void postPassRender(RE_RenderContext r,
327  GUI_DisplayOption &disp_opt,
328  GR_AlphaPass apass);
329 
330  // Object bounding box render
331  virtual void bboxRender(RE_RenderContext r,
332  GUI_DisplayOption &disp_opt,
333  GR_RenderMode render_mode);
334 
335  // Render any highlights required
336  void renderMatteHighlights(RE_RenderContext r,
337  GUI_DisplayOption &disp_opt,
338  GR_RenderFlags render_flags);
339  // Render onion skins
340  void onionSkinRender(RE_RenderContext r,
341  GUI_DisplayOption &disp_opt);
342 
343  virtual int64 getPrimDecorationMask() const
344  { return myPrimDecorMask; }
345 
346  // Modelling aids, like normals or uv coord display.
347  // This function is called before any specific decorations are rendered.
348  virtual void setupDecorationsRender(RE_RenderContext r);
349  // This functions renders one type of decoration.
350  virtual void decorationRender(
352  GUI_DisplayOption &disp_opt,
353  GR_Decoration dec,
354  GR_DecorVisibility vis,
355  bool override_dispopt,
356  GR_DecorRenderFlags render_flags);
357 
358  virtual void customDecorationRender(RE_RenderContext r,
359  GUI_DisplayOption &disp_opts,
360  const GR_VisualizerInfo *dec,
362 
363  // PICKING --------------------------------------------------------------
364 
365  // Return true if this object can be selected, and if 'node' isn't null,
366  // assign to it the node that should be selected when this object is picked
367  bool canBeSelected(OP_Node *op,
368  GUI_DisplayOption &disp_opt,
369  bool pick_template,
370  bool pick_non_sel,
371  bool pick_ghost,
372  OBJ_Node **node = nullptr) const;
373 
374  // A version of canBeSelected() used when every displayed detail is treated
375  // as an "object".
376  bool canBeSelectedWhenNotUsingOps(
377  GUI_DisplayOption &disp_opt,
378  bool pick_template,
379  bool pick_non_sel,
380  bool pick_ghost) const;
381 
382  // Full object pick - all or nothing.
383  virtual void objectPick(RE_RenderContext r,
384  GUI_DisplayOption &opts,
385  GR_RenderFlags render_flags,
386  const GR_ObjectPickFlags &pick_flags,
387  bool force_wire);
388 
389  // Component pick, component type based on display option.
390  virtual int componentPick(RE_RenderContext r,
391  GUI_DisplayOption &opts,
392  unsigned int primmask,
394  GR_PickStyle pickstyle,
395  bool has_pick_map,
396  UT_Array<GR_PickRecord> *pick_records);
397 
398  GUI_DetailLook &look() const { return *myLook; }
399  const char *name() const { return myCacheName; }
400 
401  // LIGHTING ------------------------------------------------------------
402 
403  void setupLighting(GR_LightList *list, bool headlight);
404  void cleanupLighting();
405 
406  static void resetStats();
407  static void getStats(int &num_objs,
408  int &num_polys,
409  int &num_vertices);
410 
411  void bumpObjectMaterial() { myObjectMaterialDirty=true; }
412 
413  void useObjectMaterials(bool use_obj_mat);
414  bool getAssignedMaterials(UT_Array<OP_Node *> &nodes) const;
415 
416  int getObjectMaterialID() const { return myObjMaterialID; }
417 
418  void adoptAtlas(const RE_MaterialAtlas &gl_atlas,
419  const GR_MaterialAtlas &vk_atlas);
420 
421  bool isBBoxShadingMode(const GR_DisplayOption *opt) const
422  {
423  return opt->shadingMode()==GR_BOUNDING_BOX_WIRE
425  }
426 
428  {
429  return isBBoxShadingMode(getDisplayOptionSet(opt));
430  }
431 
432  // Reflection map support, for this object
433  bool prepReflectionMap(RE_RenderContext r,
434  GUI_DisplayOption &opt,
435  int64 version,
436  fpreal time);
437  void startReflectionPass(RE_RenderContext r,
439  void endReflectionPass(RE_RenderContext r);
440  void finishReflectionMap(RE_RenderContext r,
441  GUI_DisplayOption &opt);
442  RE_Texture *getReflectionMap() const;
443 
444  // VISUALIZERS -----------------------------------------------------------
445 
447  { return myVisUpdateTime; }
448 
450  { return myVisRefineTime; }
451 
453  { myVisUpdateTime =
455 
457  { myVisRefineTime = myVisUpdateTime =
459 
460  bool hasUpdateVisualizer(int vis_id) const
461  { return myUpdateVisualizers.find(vis_id) >= 0; }
462 
463  bool hasRefineVisualizer(int vis_id) const
464  { return myRefineVisualizers.find(vis_id) >= 0; }
465 
467  { return look().getActiveVisualizers(); }
468 
470  { return myUpdateVisualizers; }
471 
473  { return myRefineVisualizers; }
474 
476  { myUpdateVisualizers = getActiveVisualizers(); }
477 
479  { myUpdateVisualizers.clear(); }
480 
482  { myRefineVisualizers = getActiveVisualizers(); }
483 
485  { myRefineVisualizers.clear(); }
486 
487  void runCreatorVisualizers(int &listcount,
489 
490  GUI_VisFlags getActiveVisFlags(int prim_idx,
491  GUI_VisContext context) const;
492 
493  // Look for an attribute in the given owner class (or all of them for
494  // GT_OWNER_INVALID) in all cached GT_Primitives in the detail
495  // (those used for updating GR_Primitives in the last update, which,
496  // in particular, have been filtered by visualizes) and return
497  // the first matching attribute if any.
498 
499  const
500  GT_DataArrayHandle findCachedAttribute(const char *attrib_name,
501  GT_Owner owner = GT_OWNER_INVALID) const;
502 
503  // Cached data used for display. Tied to the underlying GU_Detail.
504  virtual const GEO_DetachedHedgeInterface *getHedgeInterface(
505  bool use_hidden_grp);
506  virtual const GEO_PrimClassifier *getPrimClassifier(GU_Connectivity con);
507  virtual const GA_EdgeGroup *getHiddenEdgeGroup();
508  virtual const GA_ElementGroup *getVisibleElementGroup(GA_GroupType t);
509 
510  static int getPolygonMeshLimit();
511  static int getPointMeshLimit();
512 
513  static void handleMaterialChange(OP_Node *src, void *dest,
514  OP_EventType type, void *data);
515 
516  bool isMSSEnabled() const { return myMSSEnable; }
517  bool isMSSPackedEnabled() const { return myMSSPackedGeo; }
518  bool isMSSPerPrimEnabled() const { return myMSSPerPrim; }
519  bool areOverridesEnabled() const
520  { return myMaterialUseOverrides; }
521  int getMaterialLimit() const { return myMaterialLimit; }
523  { myMaterialLimitExceeded = e; }
524 
525  // clear all primitives and associated caching information
526  void invalidateGeo();
527 
528  // clear the cached data ids used to enable GR_PACK_TRANSORM_CHANGED
529  // faster code path
531  { myDataIds.clear(); }
532 
533 #ifdef USE_VULKAN
534  static bool initShaders(RV_Instance* inst);
535  static void cleanupShaders();
536 #endif
537 
538  GR_MaterialAtlas *materials() { return &myVulkanMaterials; }
539 
540  bool hasMaterialOpChanges() const
541  { return (myMatOpChanges.size()!=0); }
542 
543 protected:
544 
545  virtual void cleanupMaterials() {}
546 
548  {
549  myLocalBBox.makeInvalid();
550  myWorldBBox.makeInvalid();
551  myLook->invalidateBBox();
552  }
553  virtual void doUpdateBBox(UT_BoundingBox &world_bbox,
554  UT_BoundingBox &local_bbox);
555 
556  void setShowMaterials(bool show) { myShowMaterials = show; }
557  bool showMaterials() const { return myShowMaterials; }
558  virtual bool shouldRender(const GU_Detail *geo) const;
559 
560  int getNumPrimitives() const
561  { return myPrimitives.entries(); }
562  GR_Primitive *getPrimitive(int index) const;
563 
565  { return &disp_opt[ look().getDisplaySetType() ]; }
566 
568  const GUI_DisplayOption &disp_opt) const
569  { return &disp_opt[ look().getDisplaySetType() ]; }
570 
571  // Required Render functions -------------------------------------------
572 
573  // Wireframe only.
574  virtual void wireRender(RE_RenderContext r,
575  GUI_DisplayOption &disp_opt,
576  const GU_Detail *geo,
579 
580  // Solid polygon render
582  GUI_DisplayOption &disp_opt,
583  const GU_Detail *geo,
586  GR_AlphaPass pass) {};
587 
589  GUI_DisplayOption &opt,
590  const GU_Detail *geo,
592  GR_RenderFlags flags) {};
593 
595  GUI_DisplayOption &opt,
596  RE_Shader *shader=0,
597  bool fill=true,
598  bool outline=true) {};
599 
600  // Utility functions ---------------------------------------------------
601 
602  // Returns the decorations required for the selection types on this detail
603  GR_DecorationOverride getSelectionDecorations(
604  const GR_DisplayOption *opt) const;
605 
606  // Returns true if the geometry has a selection which requires a closure
607  // color.
608  bool isClosureSelection(GU_SelectionHandle sel,
609  bool &has_edges) const;
610  bool isClosureSelection(GR_SelectionAdapter &sel,
611  bool &has_edges) const;
612 
613  // returns true if the buffer was filled because the attribute existed in
614  // the detail, or false if a constant attribute was created (which must be
615  // filled in)
617  {
622  FETCH_ERROR
623  };
624 
625  // returns true if all materials were loaded (textures included).
626  // can return false if timeout > 0 and it took too long.
627  bool prepMaterials(RE_RenderContext r,
628  const GR_DisplayOption *opts,
629  bool &needs_alpha_pass);
630  bool prepVulkanMaterials(RV_Render *r,
631  const GR_DisplayOption *disp,
632  bool &needs_alpha);
633  int prepVulkanMaterialList(RV_Render *r,
634  GR_MaterialAtlas &mats,
635  const GR_DisplayOption *opts,
636  UT_Set<int> &op_ids,
637  bool &needs_alpha,
638  bool &changed);
639 
640  // Setup wire selection uniforms on 'r', and modify 'flags' to include
641  // GR_RENDER_FLAG_WIRE_OVER if needed.
642  void setupWireSelectParms(RE_RenderContext r,
643  const GUI_DisplayOption &disp_opts,
644  bool is_wireframe,
646  void cleanupWireSelectParms(RE_RenderContext r);
647 
648  // Sets the object matrix uniform based on our instancer transform,
649  // detail transform, etc.
650  void setObjectMatrixUniform(RE_RenderContext r);
651 
652  void doPrimitiveUpdates(RE_RenderContext r,
653  GR_DisplayOption *opts,
655  GT_RefineParms& refine_opts,
656  GR_UpdateReason reason,
657  GR_DecorationOverride req_dec,
658  const char *view_name,
659  const GR_FrustumList &view_frustums,
660  bool did_refinement,
661  bool prim_update,
662  bool &needs_alpha);
663  void updatePrimitives(RE_RenderContext r,
664  GR_DisplayOption *opts,
666  GT_RefineParms &refine_opts,
667  GR_UpdateReason reason,
668  GR_DecorationOverride req_dec,
669  const char *view_name,
670  const GR_FrustumList &view_frustums);
671  void processPrimitives(const GU_ConstDetailHandle &geo,
672  GT_PrimitiveHandle &ph,
673  GT_RefineParms &refparms,
674  int &listcount,
675  const GR_DisplayOption &dispopt,
676  GR_UpdateReason reason,
677  const char *cache_name,
679  bool processPrim(const GU_ConstDetailHandle &geo,
680  GT_PrimitiveHandle &ph,
681  GT_RefineParms &refparms,
682  int &listcount,
683  const GR_DisplayOption &dispopt,
684  GR_UpdateReason reason,
685  const char *cache_name,
687  bool apply_filter_vis,
688  int &packed_index);
689 
690  void processAlembicArchive(GT_PrimitiveHandle &ph,
691  const GU_ConstDetailHandle &gdh,
692  GT_RefineParms &refparms,
693  int &listcount,
694  const GR_DisplayOption &dispopt,
695  GR_UpdateReason reason,
696  const char *cache_name,
698  exint mat_id);
699  void clearUnusedAlembicArchives();
700 
701  void renderMatteGroupColors(RE_RenderContext r,
702  GUI_GroupDataHandle group_data,
703  const GR_DisplayOption *opt,
704  GR_RenderFlags render_flags);
705 
706  // Lower level render function used by beautyRender, wireRender, etc.
707  void renderPrims(RE_RenderContext r,
708  const GR_DisplayOption *opt,
711  GR_AlphaPass alphapass,
712  bool use_materials);
713 
714  bool createOrReuseRefinedPrim(GT_PrimitiveHandle &ph,
715  const GU_ConstDetailHandle &gdh,
716  const GEO_Primitive *geo_prim,
717  int &listcount,
718  const GR_DisplayOption &disp,
719  GR_UpdateReason reason,
720  const GT_RefineParms &ref_parms,
721  const char *cache_name,
723  bool processing_geo_prims,
724  bool apply_filter_vis,
725  int packed_index,
726  int64 mat_id);
727  GR_PrimAcceptResult checkForExistingPrim(GT_PrimitiveHandle &ph,
728  GR_Primitive *prim,
729  int pindex,
730  GR_UpdateReason reason,
731  const GT_RefineParms &ref_parms,
732  const GU_ConstDetailHandle &gdh,
733  const GEO_Primitive *geo_prim,
734  int &listcount,
736  bool processing_geo_prims,
737  int packed_index);
738 
739  void classifyPrim(const GT_Primitive *prim);
740  void resetPrimClassify();
741 
742  void accumulateTime(RE_RenderContext r);
743 
744  void buildEdgeHighlight(RE_RenderContext r,
745  const GU_Detail *geo,
746  GR_UpdateReason reason,
747  const GR_DisplayOption *opt,
748  const char *view_name);
749 
750  bool buildInstanceSelection(bool has_sel_overrides);
751  fpreal getPointInstanceFraction(const GR_DisplayOption *opts) const;
752  UT_Matrix4DArray *getPointInstanceTransforms(const GR_DisplayOption *opts);
753 
754  RE_CacheVersion getGeoVersion(const GU_Detail *geo,
755  const GR_DisplayOption *opt);
756  RE_CacheVersion getSelectionVersion(const GU_Detail *geo,
757  const GR_DisplayOption *opt);
758  RE_CacheVersion getEdgeHighlightVersion(const GU_Detail *geo,
759  const GR_DisplayOption *opt,
760  bool include_selection);
761 
763  { mySelectionId = id; mySelectionRevision = version; }
764 
765  GR_PrimAcceptResult processHookPrimitive(GT_PrimitiveHandle &gt_prim,
766  const GEO_Primitive *geo_prim,
767  const GU_ConstDetailHandle &gdh,
768  GR_UpdateReason reason,
769  const GT_RefineParms &ref_parms,
770  const char *cache_name,
771  GR_Primitive *&created,
772  int &list_index,
773  int &hook_priority,
774  bool &filtered_prim,
775  gui_RenderHookEntry *&prev,
777  bool processing_geo_prims,
778  int packed_index);
779 
780  void processFilterHooks(GT_PrimitiveHandle &gt_prim,
781  const GEO_Primitive *geo_prim);
782 
783  void restartCollectionPrimitives();
784  void removeUnusedCollectionPrimitives();
785 
786  void find3DBoundaries(const GU_Detail *geo,
787  const GA_PrimitiveGroup *within_prims,
788  GA_EdgeGroup *boundary_group);
789  void findUVBoundaries(const GU_Detail *geo,
790  const GA_PrimitiveGroup *within_prims,
791  GA_EdgeGroup * uv_boundary_group,
792  const GA_ROHandleV2 &uv,
793  bool vert_uvs);
794 
796  {
797  public:
798  gui_BoundaryData() : myUsed(false), myAttribVersion(-1) {}
799 
806  bool myUsed;
807  };
808 
809  bool matchesVersion(gui_BoundaryData &bdata,
810  const UT_StringHolder &attrib_name,
811  const RE_CacheVersion &ver,
812  bool view_3d, bool vert_uv);
813  void createEdgeGeo(RE_RenderContext r,
814  gui_BoundaryData &bdata,
815  const GA_EdgeGroup *edges,
816  bool is_3d,
817  bool is_vertex,
818  const UT_StringHolder &attrib_name,
819  const UT_StringHolder &cache_suffix,
820  const GU_Detail *geo,
821  const RE_CacheVersion &ev,
822  GA_ROHandleV2 *uvhandle = nullptr);
823 
825  { return myInfo; }
826 
827  void getRefineParms(RE_RenderContext r,
828  const GR_DisplayOption *opts,
829  GT_RefineParms &p) const;
830 
831  void resizePrimArray(exint nprims, bool clear = false);
832  void assignPrim(exint index,
833  GR_Primitive *prim,
834  const GT_PrimitiveHandle &gtprim);
835  void updateWorldTransform();
836 
837  bool checkDisplacementChange(const GR_CommonDispOption &opt);
838 
840 
841  static int theNumObjects;
842  static int theNumPolys;
843  static int theNumVertices;
844 
848  GUI_ObjectMaterialCache *myObjectMaterialCache;
852 
855 
862 
866  int myViewID;
869 
874 
875 private:
876  bool shouldUVRender(const GU_Detail *geo,
877  const GUI_DisplayOption &disp,
878  bool is_vertex) const;
879  bool shouldRender(const GU_Detail *geo,
880  const GUI_DisplayOption &disp,
881  GR_RenderFlags render_flags) const;
882  bool shouldRender(const GU_Detail *geo,
883  const GUI_DisplayOption &disp,
884  GR_DecorRenderFlags decor_flags) const;
885  bool shouldRender(const GU_Detail *geo,
886  const GUI_DisplayOption &disp,
887  GR_PickStyle pick_style) const;
888 
889  bool requiresStateChange(const GUI_DisplayOption &disp_opt,
890  GUI_DisplaySetType newset,
891  GUI_DisplaySetType oldset) const;
892 
893  GR_UpdateReason checkForShaderUpdates(const GU_Detail *geo,
894  const GUI_DisplayOption &disp);
895  bool prepObjectMaterial(RE_RenderContext r,
896  const GR_DisplayOption &opts);
897  bool checkAutoVertexNormal(const GU_Detail *dtl,
898  const GR_CommonDispOption &opts);
899 
900  bool inPackedPrim() const
901  { return myPackedPrimLevel > 0; }
902  bool inInstancePrim() const
903  { return myInstancePrim.entries() > 0; }
904  void updateInstanceEntry(gr_PrimEntry *entry,
905  int prim_index);
906 
907  bool processInstancedPrims(const GT_PrimitiveHandle &ph,
908  int &listcount,
910  int64 geo_id, int64 geo_count,
911  int packed_index,
912  int64 mat_id);
913 
914  // instancing
915  void buildPointInstanceArray(RE_RenderContext r,
916  const GR_DisplayOption *dopts,
917  const GU_Detail *dtl,
918  bool use_fraction_parm);
919  void pointInstanceGuideRender(RE_RenderContext r,
920  GUI_DisplayOption &disp_opt);
921  void renderEdgeHighlight(RE_RenderContext r,
922  const GR_DisplayOption *op,
923  GR_RenderFlags render_flags);
924  void renderBBox(RE_RenderContext r,
925  GUI_DisplayOption &opt,
926  RE_Shader *shader=0,
927  bool fill=true,
928  bool outline=true);
929  OP_Node * getObjectMaterial(fpreal t);
930  void clearMaterialInterests();
931 
932  UT_Array<gr_PrimEntry *> myPrimitives;
933  UT_IntArray myPrimitiveIndex;
934 
935  GUI_GroupDataHandle myGroupData;
936 
937  UT_Array<gui_HookedPrims *> myHookedGEOPrims;
938 
939  bool myObjectMaterialDirty;
940  int myTopObjectID;
941  int myShaderNodeID;
942  UT_StopWatch myShaderRetryTimer;
943  int myNodeID;
944  int myGuideID;
945  bool myUseObjectMaterial;
946 
947  GR_RenderInfo myInfo;
948  GUI_DetailLook *myLook;
949  int myGeoIndex;
950  int myNameIndex;
951  UT_String myCacheName;
952  bool mySetupFlag;
953  bool myHasGLStateCheckPrims;
954  bool myLitFlag;
955  bool myShadeOpenCurvesFlag;
956  bool myShadeOpenCurvesFlagSet;
957  bool myHasGuideParts;
958  bool myHasPackedPrims;
959  bool myHasPackedFragments;
960  bool myHasPackedInstances;
961  bool myWireframeFlag;
962  bool myForceShadedFlag;
963  bool myXRayFlag;
964  bool myRecordingTime;
965  bool myIsDisplayed;
966 
967  bool myHasAgentPrims;
968  bool myAgentLastLODEnable;
969  int myAgentLastMinPoints;
970  int myAgentLastMaxLOD;
971 
972  bool myHasCharacterScenePrim;
973  UT_Optional<fpreal> myCharacterSceneTime;
974 
975  bool myHasPolygons;
976  bool myHasCurves;
977  bool myHasPoints;
978 
981  int myDrawTimeWaiting;
982  int64 myDrawTime;
983  int64 mySetupTime;
984 
985  int myDetailID;
986  int64 myVersion;
987  int64 myTopologyVersion;
988  int myCachedShowSelect;
989  int64 myPrimitiveVersion;
990  int64 myPosVersion;
991  exint mySelectionId;
992  exint mySelectionRevision;
993  int myPostPassID;
994  bool myNeedsDeferredPass;
995  bool myNeedsParallelPass;
996 
997  // Accumulate a Count and a Sum of attribute data ids to know
998  // if something changed.
999  class DataIdsCache
1000  {
1001  public:
1002  DataIdsCache()
1003  : myDataIdsCount(0)
1004  , myDataIdsSum(0)
1005  {}
1006 
1007  bool operator==(const DataIdsCache &rhs) const
1008  {
1009  return myDataIdsCount==rhs.myDataIdsCount &&
1010  myDataIdsSum==rhs.myDataIdsSum;
1011  }
1012 
1013  void clear()
1014  {
1015  myDataIdsCount = 0;
1016  myDataIdsSum = 0;
1017  }
1018 
1019  void append(GA_DataId id)
1020  {
1021  myDataIdsCount++;
1022  myDataIdsSum += (exint)id;
1023  }
1024 
1025  void getDataIdsExcept_p_transform(const GA_Detail *gdp);
1026 
1027  private:
1028  exint myDataIdsCount;
1029  exint myDataIdsSum;
1030  };
1031  DataIdsCache myDataIds;
1032  DataIdsCache myDataIdsCache;
1033 
1034  UT_String myDopnetPath;
1035 
1036  // For determining if a display option which affects geometry has changed.
1037  int64 myDispOptID;
1038  int myDispOptSerial;
1039  fpreal myLOD;
1040  bool myPolygonConvexQuality;
1041  bool myVertexNormalEnable;
1042  fpreal myVertexNormalCuspAngle;
1043  GR_DecorationOverride myRequiredDecorations;
1044  bool myShowAllPoints;
1045  fpreal myDetailLOD;
1046 
1047  GUI_RenderMask myRenderMask;
1048  GUI_DisplaySetType myObjectState;
1049  GEO_ViewportLOD myObjectLOD;
1050  bool myObjectDisplayAsSubdiv;
1051 
1052  GU_ConstDetailHandle myDetailHandle;
1053  UT_Matrix4DArray myDetailTransforms;
1054  UT_Matrix4DArray myDetailInvTransforms;
1055  UT_Matrix4DArray myReducedDetailTransforms;
1056  bool myDetailTransformIdentity;
1057  UT_Matrix4D myInstancerTransform;
1058  UT_Matrix4D myDetailFullTransform;
1059  bool myInstancerIdentityFlag;
1060  UT_IntArray myDetailGeoIndex;
1061  UT_BoundingBox myLocalBBox;
1062  UT_BoundingBox myWorldBBox;
1063  int64 myCachedInstanceVersion;
1064  int myRefineVersion;
1065  bool myObjectTransformDirty;
1066  bool myNeedsAlphaPassFlag;
1067  bool myPrimAlphaPassFlag;
1068  bool myIsDeferPass;
1069  bool myRefineOnLODChange;
1070  int mySelectionInstance;
1071  fpreal myLimitedInstanceFraction;
1072  bool myShowMaterials;
1073  int myFactoryMaterialOverrideId = -1;
1074 
1075  RE_CacheVersion myInstanceSelectVersion;
1076  UT_BitArray myInstanceSelection;
1077  bool myHasInstanceSelection;
1078 
1079  // for GT_PrimInstance types, this holds the array of instance transforms
1080  // while its geometry is being refined.
1081  class gui_Instance
1082  {
1083  public:
1084  gui_Instance() { myBBox.makeInvalid(); }
1085 
1086  UT_Matrix4DArray myTransforms;
1087  GU_ConstDetailHandle myDetail;
1088  GT_PrimitiveHandle myPrim;
1089  UT_BoundingBox myBBox;
1090  };
1091  UT_Array<gui_Instance> myInstancePrim;
1092  GT_AttributeListHandle myInstancePrimAttribs;
1093  GT_AttributeListHandle myInstancePointAttribs;
1094 
1095  class gui_DiskFile
1096  {
1097  public:
1098  gui_DiskFile() : myPrimIndex(0) {}
1099  UT_StringHolder myDiskFile;
1100  int myPrimIndex;
1101  };
1102  UT_Array<gui_DiskFile> myPackedDiskStack;
1103 
1104  int myPackedPrimLevel;
1105  GT_PrimitiveHandle myPackedPrim;
1106  mutable bool myCachedUseSampleMask;
1107  mutable int myCachedSampleMask;
1108  mutable bool myCachedMultisample;
1109  mutable bool myCachedSampleCoverage;
1110 
1111  RE_Geometry *myPointGeo;
1112  RE_Geometry *myCubeGeo;
1113  RE_VertexArray *myCubeInstance;
1114  fpreal myCubeInstanceFraction;
1115 
1116  RE_ReflectMap *myReflectMap;
1117 
1118  // last update and refinement time in visualization clock (counter)
1119  exint myVisUpdateTime;
1120  exint myVisRefineTime;
1121 
1122  UT_IntArray myUpdateVisualizers;
1123  UT_IntArray myRefineVisualizers;
1124 
1125  // if set to true in setup, updates are upgraded to full refinements.
1126  bool myRefineOnUpdate;
1127  unsigned myMaterialTextureFlag :1,
1128  myMaterialTexturePending :1,
1129  myMaterialHasDisplaceMap :1,
1130  myMaterialHasReflection :1,
1131  myMaterialUseOverrides :1,
1132  myMaterialTexCacheUpdate : 1,
1133  myHasTimeDepMaterials :1,
1134  myMSSEnable :1,
1135  myMSSPackedGeo :1,
1136  myMSSPerPrim :1,
1137  myMatCapDefault:1,
1138  myMatDrawUVMap:1;
1139  GUI_DisplayOption::gui_MatAssignMode myMatAssignMode;
1140  int myMaterialLimit;
1141  bool myMaterialLimitExceeded;
1142  int myObjMaterialID;
1143  DEP_MicroNode myObjMaterialParm;
1144  UT_Set<int> myMaterialReferences;
1145 
1146  GT_DataArrayHandle myBaseMaterialAssignments;
1147  GT_DataArrayHandle myBaseMaterialRemap;
1148  int64 myBaseMaterialPrevID;
1149  int64 myBaseMaterialRemapPrevID;
1150  bool myForceMaterialUpdate;
1151  bool myMaterialAllowUpdates;
1152 
1153 
1154  UT_StringHolder myPackedFoldersTopo;
1155 
1156  class gui_DetailAttribLists
1157  {
1158  public:
1159  bool checkForAttribListChanges(const GU_Detail &dtl);
1160 
1161  UT_StringMap<bool> myPoint;
1162  UT_StringMap<bool> myVertex;
1163  UT_StringMap<bool> myPrim;
1164  UT_StringMap<bool> myDetail;
1165 
1166  UT_StringMap<bool> myVisAttribs;
1167  };
1168 
1169  gui_DetailAttribLists myDetailAttribLists;
1170  struct
1171  {
1176  } myHedgeInterface[2];
1177 
1178  UT_UniquePtr<GEO_PrimClassifier> myPrimClassifier;
1179  int myPrimClassifierDetailId;
1180  int64 myPrimClassifierCacheVersion;
1181  int64 myPrimClassifierTopVersion;
1182  int64 myPrimClassifierSelectId;
1183  int64 myPrimClassifierSelectRevision;
1184  GU_Connectivity myPrimClassifierConnectivity;
1185 
1186  GA_GroupUPtr myCachedGroup;
1187  GA_GroupType myCachedGroupType;
1188  int myCachedGroupDetailId;
1189  int64 myCachedGroupCacheVersion;
1190  int64 myCachedGroupTopVersion;
1191 
1192  int64 myCachedHidden3DVersion;
1193 
1194  fpreal myDisplacementValue = -1.0;
1195  bool myDisplacementChanged = false;
1196 
1197  static RE_ShaderHandle theBBoxShader;
1198  static RE_ShaderHandle theObjectPickShader;
1199  static RE_ShaderHandle theEdgeHighlightShader;
1200  static RE_ShaderHandle theEdgeHighlightUVShader;
1201 
1202  UT_StringMap<GT_PrimitiveHandle> myAlembicArchives;
1203  UT_StringMap<int> myUsedAlembicArchives;
1204 
1205  UT_StringHolder myUVDisplay;
1206  UT_Set<int> myMatOpChanges;
1207 public:
1208  // treat as private. For DM_RenderTable only.
1209  static bool registerHook(GUI_PrimitiveHook *hook,
1210  GT_PrimitiveType gt_type,
1211  int geo_type,
1212  int priority,
1214 
1215  friend class gr_PrimEntry;
1216 };
1217 
1218 inline void
1220 {
1222 }
1223 
1224 inline int64
1226 {
1227  return myInstanceVersion;
1228 }
1229 
1230 inline const UT_DMatrix4 &
1232 {
1233  return myDetailTransforms(index);
1234 }
1235 
1236 inline const UT_DMatrix4 &
1238 {
1239  return myDetailInvTransforms(index);
1240 }
1241 
1242 #endif
void setPostPassID(int id)
GR_MaterialAtlas myVulkanMaterials
UT_Map< UT_StringRef, int > myPrevAttributes
void setDetailFullTransform(const UT_DMatrix4 &xform)
GLbitfield flags
Definition: glcorearb.h:1596
int getNumPrimitives() const
bool forceShaded() const
gui_BoundaryData my3DBoundary
void clearUpdateVisualizers()
GR_MaterialAtlas * materials()
RE_TextureCubeFace
GR_DecorRenderFlags
Definition: GR_Defines.h:230
UT_StringMap< gui_BoundaryData > myUVBoundary
bool isDisplayed() const
virtual void simpleBBoxRender(RE_RenderContext r, GUI_DisplayOption &opt, RE_Shader *shader=0, bool fill=true, bool outline=true)
GR_DecorationOverride
Definition: GR_Defines.h:219
void refreshVisRefineTime()
int64 myPrimDecorMask
gui_BoundaryData myEdgeSelection
GA_API const UT_StringHolder uv
GT_API const UT_StringHolder time
int64 GA_DataId
Definition: GA_Types.h:696
static int theNumObjects
void shadingMode(GR_ShadingMode shading_mode)
void setNameIndex(int idx)
GA_API const UT_StringHolder rot
int getObjectMaterialID() const
bool isIdentity() const
Definition: UT_Matrix4.h:1132
int64 myInstanceVersion
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
Definition: RE_Geometry.h:53
GUI_VisFlags
int64 exint
Definition: SYS_Types.h:125
fpreal getSetupTime() const
GT_API const UT_StringHolder cache_name
int getNodeID() const
void setGhosted(bool ghost)
void clearDataIds()
const UT_DMatrix4 & getDetailTransform(int index) const
bool forceWireframe() const
bool hasUpdateVisualizer(int vis_id) const
static UT_Lock theShaderLock
GR_Decoration
Definition: GR_Defines.h:162
bool isBBoxShadingMode(GUI_DisplayOption &opt) const
GR_AlphaPass
Definition: GR_Defines.h:121
bool isDeferredPass() const
int getNameIndex() const
GUI_DisplaySetType
Context specific display options for geometry states.
Temporary container for either a RV_Render and an RE_Render.
FMT_NOINLINE FMT_CONSTEXPR auto fill(OutputIt it, size_t n, const fill_t< Char > &fill) -> OutputIt
Definition: format.h:1262
int getNumDetailTransforms() const
std::optional< T > UT_Optional
Definition: UT_Optional.h:26
const GU_Detail * myLockedDetail
void invalidateBounds()
const UT_IntArray & getUpdateVisualizers() const
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
const UT_IntArray & getRefineVisualizers() const
bool needsDeferredPass() const
int64 myEdgePrimsVersion
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setNeedsDeferredPass(bool need)
void refreshUpdateVisualizers()
void setSelection(int64 id, int64 version)
virtual exint bumpClock()=0
UT_SharedPtr< GA_EdgeGroup > myEdges
void setDisplayed(bool is_disp)
GLfloat f
Definition: glcorearb.h:1926
UT_SharedPtr< RE_Geometry > my2DGeo
GR_DecorVisibility
Definition: GR_Defines.h:192
GR_ShadingPass
Definition: GR_Defines.h:130
GR_RenderMode
Definition: GR_Defines.h:48
std::pair< GA_PrimitiveTypeId, GT_PrimitiveType > GUI_PrimTypeKey
Definition: GUI_GeoRender.h:82
RE_MaterialAtlas myMaterialAtlas
void bumpObjectMaterial()
bool canRenderUV() const
virtual int64 getPrimDecorationMask() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
#define GUI_API
Definition: GUI_API.h:10
This class provides a way to manage a reference to an attribute permitting Read-Only access...
UT_UniquePtr< gui_UpdateResults > myUpdateResults
UT_SharedPtr< RE_Geometry > my2DGeoV
GUI_ObjectMaterialCache * myObjectMaterialCache
UT_SharedPtr< RE_Geometry > myGeoV
GU_Connectivity
Definition: GU_SelectType.h:66
UT_SharedPtr< GA_PrimitiveGroup > myEdgePrims
GR_LightList * myLightList
GR_UpdateReason
Definition: GR_Defines.h:312
GUI_RenderPassFlags
long long int64
Definition: SYS_Types.h:116
bool isBBoxShadingMode(const GR_DisplayOption *opt) const
GUI_SetupResult
GLuint id
Definition: glcorearb.h:655
GLuint const GLchar * name
Definition: glcorearb.h:786
void clearRefineVisualizers()
GR_PrimAcceptResult
Definition: GR_Defines.h:359
void setInstancerTransform(const UT_DMatrix4 &xform)
static int theNumPolys
GR_RenderFlags
Definition: GR_Defines.h:86
const UT_DMatrix4 & getDetailInvTransform(int index) const
virtual void simpleRender(RE_RenderContext r, GUI_DisplayOption &opt, const GU_Detail *geo, GR_RenderMode mode, GR_RenderFlags flags)
The base class for all GT primitive types.
Definition: GT_Primitive.h:43
bool needsAlphaPass() const
Handle to the main interface of Vulkan.
Definition: RV_Instance.h:38
void setInstancerTransformIdentity()
UT_SharedPtr< GU_Selection > GU_SelectionHandle
GUI_DetailLook & look() const
void setShowMaterials(bool show)
void setDeferredPass(bool dpass)
GLdouble t
Definition: glad.h:2397
const UT_DMatrix4 & getDetailFullTransform() const
GLenum mode
Definition: glcorearb.h:99
bool isMSSEnabled() const
GT_API const UT_StringHolder version
virtual const char * className() const
Definition: GUI_GeoRender.h:93
void setInstanceVersion(int64 version)
bool hasGuideParts() const
GT_Owner
Definition: GT_Types.h:90
GT_PrimitiveType
bool showMaterials() const
void refreshRefineVisualizers()
GUI_DisplaySetType getDisplaySetType() const
GLuint shader
Definition: glcorearb.h:785
bool isMSSPerPrimEnabled() const
bool isSetup() const
int getMaterialLimit() const
int64 myUVAttribSerial
GR_DisplayOption * getDisplayOptionSet(GUI_DisplayOption &disp_opt)
void refreshVisUpdateTime()
int getPostPassID() const
GEO_ViewportLOD
UT_UniquePtr< GA_Group > GA_GroupUPtr
Definition: GA_Group.h:199
int getGeoIndex() const
int64 myLimitInstanceVersion
bool myHasEdgeSelection
fpreal64 fpreal
Definition: SYS_Types.h:277
bool hasMaterialReflection() const
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:161
GLuint index
Definition: glcorearb.h:786
UT_SharedPtr< RE_Geometry > myGeo
GUI_RenderMask
void setMaterialLimitExceeded(bool e)
A specialization of GA_AIFStringTuple to access "shared strings".
void setObjectSelection(int obj_selection)
exint getVisUpdateTime() const
int64 getInstanceVersion() const
const char * name() const
OP_EventType
Definition: OP_Value.h:22
GR_API void setupGhosting(RE_RenderContext r, int opaque_data[3], fpreal transparency=0.25f)
bool hasRefineVisualizer(int vis_id) const
void setGuideID(int id)
virtual GU_ConstDetailHandle & getDetailHandle()
bool forceXRay() const
GR_RenderInfo & getRenderInfo()
exint getVisRefineTime() const
UT_Map< UT_StringRef, int > myAttributes
const UT_DMatrix4 & getInstancerTransform() const
GR_API void cleanupGhosting(RE_RenderContext r, int opaque_data[3])
virtual void solidRender(RE_RenderContext r, GUI_DisplayOption &disp_opt, const GU_Detail *geo, GR_RenderMode mode, GR_RenderFlags flags, GR_AlphaPass pass)
bool myCheckUpdateViewFlag
Container class for all geometry.
Definition: GA_Detail.h:96
bool isMSSPackedEnabled() const
bool needsParallelPass() const
void setCanRenderUV(int uv_render)
fpreal getDrawTime() const
Simple class for a mutli-integer cache tag.
virtual bool isObjectRender() const
bool hasMaterialOpChanges() const
virtual void cleanupMaterials()
const UT_IntArray & getActiveVisualizers() const
GLboolean r
Definition: glcorearb.h:1222
int getGuideID() const
UT_StringMap< bool > myUVAttribIsVertex
static int theNumVertices
const UT_IntArray & getActiveVisualizers() const
bool isLit() const
type
Definition: core.h:1059
const char * getCacheName() const
GUI_PrimitiveHookFlags
virtual bool isLopRender() const
Definition: GUI_GeoRender.h:95
void needsAlphaPass(bool need)
Definition: format.h:895
void setGeoIndex(int idx)
static GUI_VisInterface * getHandler()
Simple interface to building a shader from a .prog file.
bool areOverridesEnabled() const
GLenum src
Definition: glcorearb.h:1793
UT_UniquePtr< GEO_DetachedHedgeInterface > interface
bool hasPendingMaterialTextures() const
GR_PickStyle
Definition: GR_Defines.h:252
const GR_DisplayOption * getDisplayOptionSet(const GUI_DisplayOption &disp_opt) const