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