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; }
535 
536  // clear all primitives and associated caching information
537  void invalidateGeo();
538 
539  // clear the cached data ids used to enable GR_PACK_TRANSORM_CHANGED
540  // faster code path
542  { myDataIds.clear(); }
543 
544 #ifdef USE_VULKAN
545  static bool initShaders(RV_Instance* inst);
546  static void cleanupShaders();
547 #endif
548 
549  GR_MaterialAtlas *materials() { return &myVulkanMaterials; }
550 
551  bool hasMaterialOpChanges() const
552  { return (myMatOpChanges.size()!=0); }
553 
554 #ifdef USE_VULKAN
555  // RAY TRACING ----------------------------------------------------------
556  void prepareForRayTrace(RE_RenderContext r, int tag, int light_id);
557 #endif
558 
559 protected:
560 
561  virtual void cleanupMaterials() {}
562 
564  {
565  myLocalBBox.makeInvalid();
566  myWorldBBox.makeInvalid();
567  myLook->invalidateBBox();
568  }
569  virtual void doUpdateBBox(UT_BoundingBox &world_bbox,
570  UT_BoundingBox &local_bbox);
571 
572  void setShowMaterials(bool show) { myShowMaterials = show; }
573  bool showMaterials() const { return myShowMaterials; }
574  virtual bool shouldRender(const GU_Detail *geo) const;
575 
576  int getNumPrimitives() const
577  { return myPrimitives.entries(); }
578  GR_Primitive *getPrimitive(int index) const;
579 
581  { return &disp_opt[ look().getDisplaySetType() ]; }
582 
584  const GUI_DisplayOption &disp_opt) const
585  { return &disp_opt[ look().getDisplaySetType() ]; }
586 
587  // Required Render functions -------------------------------------------
588 
589  // Wireframe only.
590  virtual void wireRender(RE_RenderContext r,
591  GUI_DisplayOption &disp_opt,
592  const GU_Detail *geo,
595 
596  // Solid polygon render
598  GUI_DisplayOption &disp_opt,
599  const GU_Detail *geo,
602  GR_AlphaPass pass) {};
603 
605  GUI_DisplayOption &opt,
606  const GU_Detail *geo,
608  GR_RenderFlags flags) {};
609 
611  GUI_DisplayOption &opt,
612  RE_Shader *shader=0,
613  bool fill=true,
614  bool outline=true) {};
615 
616  // Utility functions ---------------------------------------------------
617 
618  // Returns the decorations required for the selection types on this detail
619  GR_DecorationOverride getSelectionDecorations(
620  const GR_DisplayOption *opt) const;
621 
622  // Returns true if the geometry has a selection which requires a closure
623  // color.
624  bool isClosureSelection(GU_SelectionHandle sel,
625  bool &has_edges) const;
626  bool isClosureSelection(GR_SelectionAdapter &sel,
627  bool &has_edges) const;
628 
629  // returns true if the buffer was filled because the attribute existed in
630  // the detail, or false if a constant attribute was created (which must be
631  // filled in)
633  {
638  FETCH_ERROR
639  };
640 
641  // returns true if all materials were loaded (textures included).
642  // can return false if timeout > 0 and it took too long.
643  bool prepMaterials(RE_RenderContext r,
644  const GR_DisplayOption *opts,
645  bool &needs_alpha_pass);
646  bool prepVulkanMaterials(RV_Render *r,
647  const GR_DisplayOption *disp,
648  bool &needs_alpha);
649  int prepVulkanMaterialList(RV_Render *r,
650  GR_MaterialAtlas &mats,
651  const GR_DisplayOption *opts,
652  UT_Set<int> &op_ids,
653  bool &needs_alpha,
654  bool &changed);
655 
656  // Setup wire selection uniforms on 'r', and modify 'flags' to include
657  // GR_RENDER_FLAG_WIRE_OVER if needed.
658  void setupWireSelectParms(RE_RenderContext r,
659  const GUI_DisplayOption &disp_opts,
660  bool is_wireframe,
662  void cleanupWireSelectParms(RE_RenderContext r);
663 
664  // Sets the object matrix uniform based on our instancer transform,
665  // detail transform, etc.
666  void setObjectMatrixUniform(RE_RenderContext r);
667 
668  void doPrimitiveUpdates(RE_RenderContext r,
669  GR_DisplayOption *opts,
671  GT_RefineParms& refine_opts,
672  GR_UpdateReason reason,
673  GR_DecorationOverride req_dec,
674  const char *view_name,
675  const GR_FrustumList &view_frustums,
676  bool did_refinement,
677  bool prim_update,
678  bool &needs_alpha);
679  void updatePrimitives(RE_RenderContext r,
680  GR_DisplayOption *opts,
682  GT_RefineParms &refine_opts,
683  GR_UpdateReason reason,
684  GR_DecorationOverride req_dec,
685  const char *view_name,
686  const GR_FrustumList &view_frustums);
687  void processPrimitives(const GU_ConstDetailHandle &geo,
688  GT_PrimitiveHandle &ph,
689  GT_RefineParms &refparms,
690  int &listcount,
691  const GR_DisplayOption &dispopt,
692  GR_UpdateReason reason,
693  const char *cache_name,
695  bool processPrim(const GU_ConstDetailHandle &geo,
696  GT_PrimitiveHandle &ph,
697  GT_RefineParms &refparms,
698  int &listcount,
699  const GR_DisplayOption &dispopt,
700  GR_UpdateReason reason,
701  const char *cache_name,
703  bool apply_filter_vis,
704  int &packed_index);
705 
706  void processAlembicArchive(GT_PrimitiveHandle &ph,
707  const GU_ConstDetailHandle &gdh,
708  GT_RefineParms &refparms,
709  int &listcount,
710  const GR_DisplayOption &dispopt,
711  GR_UpdateReason reason,
712  const char *cache_name,
714  exint mat_id);
715  void clearUnusedAlembicArchives();
716 
717  void renderMatteGroupColors(RE_RenderContext r,
718  GUI_GroupDataHandle group_data,
719  const GR_DisplayOption *opt,
720  GR_RenderFlags render_flags);
721 
722  // Lower level render function used by beautyRender, wireRender, etc.
723  void renderPrims(RE_RenderContext r,
724  const GR_DisplayOption *opt,
727  GR_AlphaPass alphapass,
728  bool use_materials);
729 
730  bool createOrReuseRefinedPrim(GT_PrimitiveHandle &ph,
731  const GU_ConstDetailHandle &gdh,
732  const GEO_Primitive *geo_prim,
733  int &listcount,
734  const GR_DisplayOption &disp,
735  GR_UpdateReason reason,
736  const GT_RefineParms &ref_parms,
737  const char *cache_name,
739  bool processing_geo_prims,
740  bool apply_filter_vis,
741  int packed_index,
742  int64 mat_id);
743  GR_PrimAcceptResult checkForExistingPrim(GT_PrimitiveHandle &ph,
744  GR_Primitive *prim,
745  int pindex,
746  GR_UpdateReason reason,
747  const GT_RefineParms &ref_parms,
748  const GU_ConstDetailHandle &gdh,
749  const GEO_Primitive *geo_prim,
750  int &listcount,
752  bool processing_geo_prims,
753  int packed_index);
754 
755  void classifyPrim(const GT_Primitive *prim);
756  void resetPrimClassify();
757 
758  void accumulateTime(RE_RenderContext r);
759 
760  void buildEdgeHighlight(RE_RenderContext r,
761  const GU_Detail *geo,
762  GR_UpdateReason reason,
763  const GR_DisplayOption *opt,
764  const char *view_name);
765 
766  bool buildInstanceSelection(bool has_sel_overrides);
767  fpreal getPointInstanceFraction(const GR_DisplayOption *opts) const;
768  UT_Matrix4DArray *getPointInstanceTransforms(const GR_DisplayOption *opts);
769 
770  RE_CacheVersion getGeoVersion(const GU_Detail *geo,
771  const GR_DisplayOption *opt);
772  RE_CacheVersion getSelectionVersion(const GU_Detail *geo,
773  const GR_DisplayOption *opt);
774  RE_CacheVersion getEdgeHighlightVersion(const GU_Detail *geo,
775  const GR_DisplayOption *opt,
776  bool include_selection);
777 
779  { mySelectionId = id; mySelectionRevision = version; }
780 
781  GR_PrimAcceptResult processHookPrimitive(GT_PrimitiveHandle &gt_prim,
782  const GEO_Primitive *geo_prim,
783  const GU_ConstDetailHandle &gdh,
784  GR_UpdateReason reason,
785  const GT_RefineParms &ref_parms,
786  const char *cache_name,
787  GR_Primitive *&created,
788  int &list_index,
789  int &hook_priority,
790  bool &filtered_prim,
791  gui_RenderHookEntry *&prev,
793  bool processing_geo_prims,
794  int packed_index);
795 
796  void processFilterHooks(GT_PrimitiveHandle &gt_prim,
797  const GEO_Primitive *geo_prim);
798 
799  void restartCollectionPrimitives();
800  void removeUnusedCollectionPrimitives();
801 
802  void find3DBoundaries(const GU_Detail *geo,
803  const GA_PrimitiveGroup *within_prims,
804  GA_EdgeGroup *boundary_group);
805  void findUVBoundaries(const GU_Detail *geo,
806  const GA_PrimitiveGroup *within_prims,
807  GA_EdgeGroup * uv_boundary_group,
808  const GA_ROHandleV2 &uv,
809  bool vert_uvs);
810 
812  {
813  public:
814  gui_BoundaryData() : myUsed(false), myAttribVersion(-1) {}
815 
822  bool myUsed;
823  };
824 
825  bool matchesVersion(gui_BoundaryData &bdata,
826  const UT_StringHolder &attrib_name,
827  const RE_CacheVersion &ver,
828  bool view_3d, bool vert_uv);
829  void createEdgeGeo(RE_RenderContext r,
830  gui_BoundaryData &bdata,
831  const GA_EdgeGroup *edges,
832  bool is_3d,
833  bool is_vertex,
834  const UT_StringHolder &attrib_name,
835  const UT_StringHolder &cache_suffix,
836  const GU_Detail *geo,
837  const RE_CacheVersion &ev,
838  GA_ROHandleV2 *uvhandle = nullptr);
839 
841  { return myInfo; }
842 
843  void getRefineParms(RE_RenderContext r,
844  const GR_DisplayOption *opts,
845  GT_RefineParms &p) const;
846 
847  void resizePrimArray(exint nprims, bool clear = false);
848  void assignPrim(exint index,
849  GR_Primitive *prim,
850  const GT_PrimitiveHandle &gtprim);
851  void updateWorldTransform();
852 
853  bool checkDisplacementChange(const GR_CommonDispOption &opt);
854 
856 
857  static int theNumObjects;
858  static int theNumPolys;
859  static int theNumVertices;
860 
864  GUI_ObjectMaterialCache *myObjectMaterialCache;
868 
871 
878 
882  int myViewID;
885 
890 #ifdef USE_VULKAN
891  UT_UniquePtr<RV_Geometry> myCubeGeo;
892  UT_UniquePtr<RV_ShaderBlock> myCubeTransforms;
894 #endif
895 
896 private:
897  bool shouldUVRender(const GU_Detail *geo,
898  const GUI_DisplayOption &disp,
899  bool is_vertex) const;
900  bool shouldRender(const GU_Detail *geo,
901  const GUI_DisplayOption &disp,
902  GR_RenderFlags render_flags) const;
903  bool shouldRender(const GU_Detail *geo,
904  const GUI_DisplayOption &disp,
905  GR_DecorRenderFlags decor_flags) const;
906  bool shouldRender(const GU_Detail *geo,
907  const GUI_DisplayOption &disp,
908  GR_PickStyle pick_style) const;
909 
910  bool requiresStateChange(const GUI_DisplayOption &disp_opt,
911  GUI_DisplaySetType newset,
912  GUI_DisplaySetType oldset) const;
913 
914  GR_UpdateReason checkForShaderUpdates(const GU_Detail *geo,
915  const GUI_DisplayOption &disp);
916  bool prepObjectMaterial(RE_RenderContext r,
917  const GR_DisplayOption &opts);
918  bool checkAutoVertexNormal(const GU_Detail *dtl,
919  const GR_CommonDispOption &opts);
920 
921  bool inPackedPrim() const
922  { return myPackedPrimLevel > 0; }
923  bool inInstancePrim() const
924  { return myInstancePrim.entries() > 0; }
925  void updateInstanceEntry(gr_PrimEntry *entry,
926  int prim_index);
927 
928  bool processInstancedPrims(const GT_PrimitiveHandle &ph,
929  int &listcount,
931  int64 geo_id, int64 geo_count,
932  int packed_index,
933  int64 mat_id);
934 
935  // instancing
936  void buildPointInstanceArray(RE_RenderContext r,
937  const GR_DisplayOption *dopts,
938  const GU_Detail *dtl,
939  bool use_fraction_parm);
940  void pointInstanceGuideRender(RE_RenderContext r,
941  GUI_DisplayOption &disp_opt);
942  void renderEdgeHighlight(RE_RenderContext r,
943  const GR_DisplayOption *op,
944  GR_RenderFlags render_flags);
945  void renderBBox(RE_RenderContext r,
946  GUI_DisplayOption &opt,
947  bool set_shader = false,
948  bool is_matte = false,
949  bool fill=true,
950  bool outline=true);
951 #ifdef USE_VULKAN
952  virtual int buildInstanceTransforms(RE_RenderContext r,
954 #endif
955  OP_Node * getObjectMaterial(fpreal t);
956  void clearMaterialInterests();
957 
958  UT_Array<gr_PrimEntry *> myPrimitives;
959  UT_IntArray myPrimitiveIndex;
960 
961  GUI_GroupDataHandle myGroupData;
962 
963  UT_Array<gui_HookedPrims *> myHookedGEOPrims;
964 
965  bool myObjectMaterialDirty;
966  int myTopObjectID;
967  int myShaderNodeID;
968  UT_StopWatch myShaderRetryTimer;
969  int myNodeID;
970  int myGuideID;
971  bool myUseObjectMaterial;
972 
973  GR_RenderInfo myInfo;
974  GUI_DetailLook *myLook;
975  int myGeoIndex;
976  int myNameIndex;
977  UT_String myCacheName;
978  bool mySetupFlag;
979  bool myHasGLStateCheckPrims;
980  bool myLitFlag;
981  bool myShadeOpenCurvesFlag;
982  bool myShadeOpenCurvesFlagSet;
983  bool myHasGuideParts;
984  bool myHasPackedPrims;
985  bool myHasPackedFragments;
986  bool myHasPackedInstances;
987  bool myWireframeFlag;
988  bool myForceShadedFlag;
989  bool myXRayFlag;
990  bool myRecordingTime;
991  bool myIsDisplayed;
992  bool myIsSubD = false;
993 
994  bool myHasAgentPrims;
995  bool myAgentLastLODEnable;
996  int myAgentLastMinPoints;
997  int myAgentLastMaxLOD;
998 
999  UT_Optional<fpreal> myCharacterSceneTime;
1001 
1002  bool myHasPolygons;
1003  bool myHasCurves;
1004  bool myHasPoints;
1005 
1008  int myDrawTimeWaiting;
1009  int64 myDrawTime;
1010  int64 mySetupTime;
1011 
1012  int myDetailID;
1013  int64 myVersion;
1014  int64 myTopologyVersion;
1015  int myCachedShowSelect;
1016  int64 myPrimitiveVersion;
1017  int64 myPosVersion;
1018  exint mySelectionId;
1019  exint mySelectionRevision;
1020  int myPostPassID;
1021  bool myNeedsDeferredPass;
1022  bool myNeedsParallelPass;
1023 
1024  // Accumulate a Count and a Sum of attribute data ids to know
1025  // if something changed.
1026  class DataIdsCache
1027  {
1028  public:
1029  DataIdsCache()
1030  : myDataIdsCount(0)
1031  , myDataIdsSum(0)
1032  {}
1033 
1034  bool operator==(const DataIdsCache &rhs) const
1035  {
1036  return myDataIdsCount==rhs.myDataIdsCount &&
1037  myDataIdsSum==rhs.myDataIdsSum;
1038  }
1039 
1040  void clear()
1041  {
1042  myDataIdsCount = 0;
1043  myDataIdsSum = 0;
1044  }
1045 
1046  void append(GA_DataId id)
1047  {
1048  myDataIdsCount++;
1049  myDataIdsSum += (exint)id;
1050  }
1051 
1052  void getDataIdsExcept_p_transform(const GA_Detail *gdp);
1053 
1054  private:
1055  exint myDataIdsCount;
1056  exint myDataIdsSum;
1057  };
1058  DataIdsCache myDataIds;
1059  DataIdsCache myDataIdsCache;
1060 
1061  UT_String myDopnetPath;
1062 
1063  // For determining if a display option which affects geometry has changed.
1064  int64 myDispOptID;
1065  int myDispOptSerial;
1066  fpreal myLOD;
1067  bool myPolygonConvexQuality;
1068  bool myVertexNormalEnable;
1069  fpreal myVertexNormalCuspAngle;
1070  GR_DecorationOverride myRequiredDecorations;
1071  bool myShowAllPoints;
1072  fpreal myDetailLOD;
1073 
1074  GUI_RenderMask myRenderMask;
1075  GUI_DisplaySetType myObjectState;
1076  GEO_ViewportLOD myObjectLOD;
1077  bool myObjectDisplayAsSubdiv;
1078 
1079  GU_ConstDetailHandle myDetailHandle;
1080  UT_Matrix4DArray myDetailTransforms;
1081  UT_Matrix4DArray myDetailInvTransforms;
1082  UT_Matrix4DArray myReducedDetailTransforms;
1083  bool myDetailTransformIdentity;
1084  UT_Matrix4D myInstancerTransform;
1085  UT_Matrix4D myDetailFullTransform;
1086  bool myInstancerIdentityFlag;
1087  UT_IntArray myDetailGeoIndex;
1088  UT_BoundingBox myLocalBBox;
1089  UT_BoundingBox myWorldBBox;
1090  int64 myCachedInstanceVersion;
1091  int myRefineVersion;
1092  bool myObjectTransformDirty;
1093  bool myNeedsAlphaPassFlag;
1094  bool myPrimAlphaPassFlag;
1095  bool myIsDeferPass;
1096  bool myRefineOnLODChange;
1097  int mySelectionInstance;
1098  fpreal myLimitedInstanceFraction;
1099  bool myShowMaterials;
1100  int myFactoryMaterialOverrideId = -1;
1101 
1102  RE_CacheVersion myInstanceSelectVersion;
1103  UT_BitArray myInstanceSelection;
1104  bool myHasInstanceSelection;
1105 
1106  // for GT_PrimInstance types, this holds the array of instance transforms
1107  // while its geometry is being refined.
1108  class gui_Instance
1109  {
1110  public:
1111  gui_Instance() { myBBox.makeInvalid(); }
1112 
1113  UT_Matrix4DArray myTransforms;
1114  GU_ConstDetailHandle myDetail;
1115  GT_PrimitiveHandle myPrim;
1116  UT_BoundingBox myBBox;
1117  };
1118  UT_Array<gui_Instance> myInstancePrim;
1119  GT_AttributeListHandle myInstancePrimAttribs;
1120  GT_AttributeListHandle myInstancePointAttribs;
1121 
1122  class gui_DiskFile
1123  {
1124  public:
1125  gui_DiskFile() : myPrimIndex(0) {}
1126  UT_StringHolder myDiskFile;
1127  int myPrimIndex;
1128  };
1129  UT_Array<gui_DiskFile> myPackedDiskStack;
1130 
1131  int myPackedPrimLevel;
1132  GT_PrimitiveHandle myPackedPrim;
1133  mutable bool myCachedUseSampleMask;
1134  mutable int myCachedSampleMask;
1135  mutable bool myCachedMultisample;
1136  mutable bool myCachedSampleCoverage;
1137 
1138  RE_Geometry *myPointGeo;
1139  RE_Geometry *myCubeGeoGL;
1140  RE_VertexArray *myCubeInstanceGL;
1141  fpreal myCubeInstanceFraction;
1142 
1143  RE_ReflectMap *myReflectMap;
1144 
1145  // last update and refinement time in visualization clock (counter)
1146  exint myVisUpdateTime;
1147  exint myVisRefineTime;
1148 
1149  UT_IntArray myUpdateVisualizers;
1150  UT_IntArray myRefineVisualizers;
1151 
1152  // if set to true in setup, updates are upgraded to full refinements.
1153  bool myRefineOnUpdate;
1154  unsigned myMaterialTextureFlag :1,
1155  myMaterialTexturePending :1,
1156  myMaterialHasDisplaceMap :1,
1157  myMaterialHasReflection :1,
1158  myMaterialUseOverrides :1,
1159  myMaterialTexCacheUpdate : 1,
1160  myHasTimeDepMaterials :1,
1161  myHasOpDepMaterials :1,
1162  myMSSEnable :1,
1163  myMSSPackedGeo :1,
1164  myMSSPerPrim :1,
1165  myMatCapDefault:1,
1166  myMatDrawUVMap:1;
1167  GUI_DisplayOption::gui_MatAssignMode myMatAssignMode;
1168  int myMaterialLimit;
1169  bool myMaterialLimitExceeded;
1170  int myObjMaterialID;
1171  DEP_MicroNode myObjMaterialParm;
1172  UT_Set<int> myMaterialReferences;
1173 
1174  GT_DataArrayHandle myBaseMaterialAssignments;
1175  GT_DataArrayHandle myBaseMaterialRemap;
1176  int64 myBaseMaterialPrevID;
1177  int64 myBaseMaterialRemapPrevID;
1178  bool myForceMaterialUpdate;
1179  bool myMaterialAllowUpdates;
1180 
1181 
1182  UT_StringHolder myPackedFoldersTopo;
1183 
1184  class gui_DetailAttribLists
1185  {
1186  public:
1187  bool checkForAttribListChanges(const GU_Detail &dtl);
1188 
1189  UT_StringMap<bool> myPoint;
1190  UT_StringMap<bool> myVertex;
1191  UT_StringMap<bool> myPrim;
1192  UT_StringMap<bool> myDetail;
1193 
1194  UT_StringMap<bool> myVisAttribs;
1195  };
1196 
1197  gui_DetailAttribLists myDetailAttribLists;
1198  struct
1199  {
1204  } myHedgeInterface[2];
1205 
1206  UT_UniquePtr<GEO_PrimClassifier> myPrimClassifier;
1207  int myPrimClassifierDetailId;
1208  int64 myPrimClassifierCacheVersion;
1209  int64 myPrimClassifierTopVersion;
1210  int64 myPrimClassifierSelectId;
1211  int64 myPrimClassifierSelectRevision;
1212  GU_Connectivity myPrimClassifierConnectivity;
1213 
1214  GA_GroupUPtr myCachedGroup;
1215  GA_GroupType myCachedGroupType;
1216  int myCachedGroupDetailId;
1217  int64 myCachedGroupCacheVersion;
1218  int64 myCachedGroupTopVersion;
1219 
1220  int64 myCachedHidden3DVersion;
1221 
1222  fpreal myDisplacementValue = -1.0;
1223  bool myDisplacementChanged = false;
1224 
1225  static RE_ShaderHandle theBBoxShader;
1226  static RE_ShaderHandle theObjectPickShader;
1227  static RE_ShaderHandle theEdgeHighlightShader;
1228  static RE_ShaderHandle theEdgeHighlightUVShader;
1229 
1230  UT_StringMap<GT_PrimitiveHandle> myAlembicArchives;
1231  UT_StringMap<int> myUsedAlembicArchives;
1232 
1233  UT_StringHolder myUVDisplay;
1234  UT_Set<int> myMatOpChanges;
1235 public:
1236  // treat as private. For DM_RenderTable only.
1237  static bool registerHook(GUI_PrimitiveHook *hook,
1238  GT_PrimitiveType gt_type,
1239  int geo_type,
1240  int priority,
1242 
1243  friend class gr_PrimEntry;
1244 };
1245 
1246 inline void
1248 {
1250 }
1251 
1252 inline int64
1254 {
1255  return myInstanceVersion;
1256 }
1257 
1258 inline const UT_DMatrix4 &
1260 {
1261  return myDetailTransforms(index);
1262 }
1263 
1264 inline const UT_DMatrix4 &
1266 {
1267  return myDetailInvTransforms(index);
1268 }
1269 
1270 #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()
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
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