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_CameraParms.h>
16 #include <UT/UT_Lock.h>
17 #include <UT/UT_Optional.h>
18 #include <UT/UT_Rect.h>
19 #include <UT/UT_Set.h>
20 #include <UT/UT_String.h>
21 #include <UT/UT_StringMap.h>
22 #include <UT/UT_StopWatch.h>
23 #include <UT/UT_Matrix4.h>
24 #include <UT/UT_ValArray.h>
25 #include <UT/UT_UniquePtr.h>
26 #include <UT/UT_Array.h>
27 #include <DEP/DEP_MicroNode.h>
28 #include <RE/RE_Types.h>
29 #include <RE/RE_Texture.h>
30 #include <RE/RE_TimerQuery.h>
32 #include <RE/RE_RenderContext.h>
33 #include <GA/GA_Attribute.h>
34 #include <GR/GR_Defines.h>
35 #include <GR/GR_Material.h>
36 #include <GR/GR_RenderInfo.h>
37 #include <GT/GT_Primitive.h>
38 #include <GU/GU_DetailHandle.h>
39 #include <GU/GU_SelectType.h>
40 #include "GUI_GroupData.h"
41 #include "GUI_RenderCommon.h"
42 #include "GUI_DisplayOption.h"
43 #include "GUI_DetailLook.h"
44 #include "GUI_PrimitiveHook.h"
45 #include "GUI_RenderCommon.h"
46 #include "GUI_API.h"
47 
48 class RV_Geometry;
49 class RV_ShaderBlock;
51 
52 class GA_EdgeGroup;
53 class GA_ElementGroup;
54 class GU_Detail;
55 class GEO_PrimClassifier;
57 class RE_Render;
58 
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  bool isDisplayAsSubdiv() const { return myObjectDisplayAsSubdiv; }
137 
138  // local transform of the object
139  bool setDetailTransform(const UT_DMatrix4 &xform);
140  const UT_DMatrix4 &getDetailTransform(int index) const;
141  const UT_DMatrix4 &getDetailInvTransform(int index) const;
143  { return myDetailTransforms.entries(); }
145  { myDetailFullTransform = xform; }
147  { return myDetailFullTransform; }
148 
149  // For an instance object, this is the instance object's transform. The
150  // detail transforms are the individual point transforms.
152  { myInstancerTransform = xform;
153  myInstancerIdentityFlag = xform.isIdentity(); }
155  { myInstancerTransform.identity();
156  myInstancerIdentityFlag = true; }
158  { return myInstancerTransform; }
159 
160  const UT_BoundingBox &localBBox();
161  const UT_BoundingBox &worldBBox();
162 
163  bool updateBBox();
164 
165 
166  // bounding box of this object
167  virtual bool getBoundingBox2D(UT_BoundingBox &bbox,
168  const char *name,
169  int use_vertex) const;
170  virtual bool getBoundingBox3D(UT_BoundingBox &bbox,
171  const UT_Matrix3R *rot) const;
172 
173  bool getInstancedBoundingBox3D(UT_BoundingBox &bbox,
174  const UT_Matrix3R *rot,
175  const UT_DMatrix4 &detail_xform) const;
176 
177  // set the view * projection matrix
178  static void setWorldToScreen(const UT_Matrix4R &xform);
179 
180  // instanced transforms for the object, when point instancing
181  void setIsInstancedGeo(bool instanced);
182  bool addInstanceTransform(const UT_DMatrix4 &xform,
183  int geo_index);
184  void clearInstanceTransforms();
185  void setInstanceVersion(int64 version);
186  int64 getInstanceVersion() const;
187 
188  /// Query the memory used by the prims in this geometry
189  void gpuMemoryUsage(exint &used_bytes,
190  exint &cached_bytes,
191  exint &pinned_bytes);
192 
193  // setup() called before any update or drawing is done, and cleanup() is
194  // called when all rendering is complete for the current redraw.
195  virtual GUI_SetupResult setup(const GUI_DisplayOption &disp_opt,
197  bool show_selection,
198  GR_DecorationOverride selmask_dec,
199  GR_DecorationOverride &select_dec,
200  bool &needs_alpha,
201  bool is_current);
202 
203  // minimal setup for multiple viewports (such as a quad config). One
204  // viewport is called with setup(), the others fastSetup().
205  virtual bool fastSetup(const GUI_DisplayOption &disp_opt);
206 
207  virtual void update(RE_RenderContext r,
208  GR_DisplayOption *opt,
209  GUI_SetupResult setup_reason,
210  GR_DecorationOverride selmask_dec,
211  const char *view_name,
212  bool &needs_alpha,
213  const GR_FrustumList &view_frustums);
214 
215  // Update run in parallel, during Vulkan Update. Only called
216  // if look is marked as needing parallel update in serial update
217  // and `hasParallelUpdate` returns true
218  virtual void updateParallel(RE_RenderContext r,
219  GR_DisplayOption *opt,
220  GUI_SetupResult setup_reason,
221  GR_DecorationOverride selmask_dec,
222  const char *view_name,
223  bool &needs_alpha,
224  const GR_FrustumList &view_frustums);
225  virtual bool hasParallelUpdate() const;
226 
227  void updateRenderVersion(RE_RenderContext r);
228 
229  virtual void cleanup(RE_RenderContext r);
230 
231  bool isSetup() const { return mySetupFlag; }
232  bool needsAlphaPass() const { return myNeedsAlphaPassFlag; }
233  void needsAlphaPass(bool need) { myNeedsAlphaPassFlag=need;}
234 
235  /// Returns true if this contains any primitives meant to be rendered
236  /// during an onion skin pass. This can change after refinement during an
237  /// update.
238  bool hasOnionSkinPrims() const
239  { return myHasOnionSkinPrims; }
240 
241  /// This is a utility for getting all `GU_OnionSkinPrimRenderInfo` from
242  /// onion skin primitives. It is meant for use during rendering of onion
243  /// skins so that appearance of each onion skin can be written into a buffer
244  /// on the GPU. The info is indexed by onion skin group minus 1 (for
245  /// example, onion skin group 1 is in index 0 of the array).
246  void getOnionSkinPrimRenderInfos(
248 
249  /// This is a utility for checking if any onion skin primitives have their
250  /// render mode set to `OUTLINE`. It is meant for use during rendering of
251  /// onion skins, since outlines require a bit more setup compared to other
252  /// onion skin render modes.
253  bool hasOutlineOnionSkins() const;
254 
256  { return myMaterialTexturePending; }
257 
258  void addMaterialReference(OP_Node *mat_node);
259  void removeMaterialReference(OP_Node *mat_node);
260  void clearMaterialReferences();
261  void setObjMaterialInterests(const UT_Set<int> &ids);
262 
263  // called when this look is no longer displayed and placed in a short cache
264  // in case it is displayed again.
265  void retire();
266 
267  // Called when an object isn't displayed anymore, aka retire()-lite.
268  void hide();
269 
270  // Return true if gl_lit is set on the contained detail.
271  bool isLit() const { return myLitFlag; }
272 
273  // return true if this geo has guide rendering
274  bool hasGuideParts() const { return myHasGuideParts; }
275 
276  // Return if gl_wireframe is set to a positive value.
277  bool forceWireframe() const { return myWireframeFlag; }
278 
279  // Return if gl_wireframe is set to a negative value.
280  bool forceShaded() const { return myForceShadedFlag; }
281 
282  // Return if gl_xray is set to a positive value.
283  bool forceXRay() const { return myXRayFlag; }
284 
285  // Return true if should be drawn shaded in the beauty pass
286  // with current settings, false if it should be drawn wireframe
287  bool shouldDrawShaded(GUI_DisplayOption &disp_opt) const;
288 
289  // The post-pass ID is used to setup and render post-render passes
290  void setPostPassID(int id) { myPostPassID = id ; }
291  int getPostPassID() const { return myPostPassID; }
292 
293  // An additional deferred pass is required (not a post pass).
294  bool needsDeferredPass() const { return myNeedsDeferredPass;}
295  void setNeedsDeferredPass(bool need)
296  { myNeedsDeferredPass = need;}
297  void setDeferredPass(bool dpass) { myIsDeferPass = dpass; }
298  bool isDeferredPass() const { return myIsDeferPass; }
299 
300  // An additional parallel primary pass is required (not a post pass).
301  bool needsParallelPass() const { return myNeedsParallelPass;}
302 
303  // Returns the time in seconds of various operations
304  fpreal getSetupTime() const { return fpreal(mySetupTime)*1e-9;}
305  fpreal getDrawTime() const { return fpreal(myDrawTime)*1e-9;}
306 
307  virtual bool isObjectRender() const { return false; }
308 
310  { return myMaterialHasReflection; }
311 
312  void setGhosted(bool ghost)
313  { myInfo.myObjectGhosted = ghost; }
314  void setObjectSelection(int obj_selection)
315  { myInfo.myObjectSelection = obj_selection; }
316  void setCanRenderUV(int uv_render)
317  { myInfo.myCanRenderUV = uv_render; }
318  bool canRenderUV() const
319  {
320  return myInfo.myCanRenderUV;
321  }
322 
323  bool getComponentSelection(
324  const GR_DisplayOption *opt,
325  GR_SelectionAdapter &adapter) const;
326 
327  // DRAWING --------------------------------------------------------------
328 
329  // wire representation of all objects.
330  virtual void wireframeRender(RE_RenderContext r,
331  GUI_DisplayOption &disp_opt,
333  GR_RenderFlags render_flags);
334 
335  // Beauty pass shaded render.
336  virtual GUI_RenderPassFlags
337  beautyRender(RE_RenderContext r,
338  GUI_DisplayOption &disp_opt,
339  GR_ShadingPass shade_pass,
340  GR_AlphaPass alphapass,
342  GR_RenderFlags render_flags);
343 
344  static void setupRender(RE_RenderContext r, GR_RenderMode mode);
345  static void cleanupRender(RE_RenderContext r, GR_RenderMode mode);
346 
348  const GUI_DisplayOption &disp_opt,
349  UT_Vector4F &ghost_color,
350  fpreal ghost_amount = 0.5);
352 
353  // Various simple rendering, such as matte or depth.
354  virtual void utilityRender(RE_RenderContext r,
355  GUI_DisplayOption &disp_opt,
357  GR_RenderFlags rflags);
358 
359  // rendering for post-render passes that primitives request.
360  virtual void postPassRender(RE_RenderContext r,
361  GUI_DisplayOption &disp_opt,
362  GR_AlphaPass apass);
363 
364  // Object bounding box render
365  virtual void bboxRender(RE_RenderContext r,
366  GUI_DisplayOption &disp_opt,
367  GR_RenderMode render_mode);
368 
369  // Render any highlights required
370  void renderMatteHighlights(RE_RenderContext r,
371  GUI_DisplayOption &disp_opt,
372  GR_RenderFlags render_flags);
373  // Render onion skins
374  void onionSkinRender(RE_RenderContext r,
375  GUI_DisplayOption &disp_opt);
376 
377  virtual int64 getPrimDecorationMask() const
378  { return myPrimDecorMask; }
379 
380  // Modelling aids, like normals or uv coord display.
381  // This function is called before any specific decorations are rendered.
382  virtual void setupDecorationsRender(RE_RenderContext r);
383  // This functions renders one type of decoration.
384  virtual void decorationRender(
386  GUI_DisplayOption &disp_opt,
388  GR_DecorVisibility vis,
389  bool override_dispopt,
390  GR_DecorRenderFlags render_flags);
391 
392  virtual void customDecorationRender(RE_RenderContext r,
393  GUI_DisplayOption &disp_opts,
394  const GR_VisualizerInfo *dec,
396 
397  // PICKING --------------------------------------------------------------
398 
399  // Return true if this object can be selected, and if 'node' isn't null,
400  // assign to it the node that should be selected when this object is picked
401  bool canBeSelected(OP_Node *op,
402  GUI_DisplayOption &disp_opt,
403  bool pick_template,
404  bool pick_non_sel,
405  bool pick_ghost,
406  OBJ_Node **node = nullptr) const;
407 
408  // A version of canBeSelected() used when every displayed detail is treated
409  // as an "object".
410  bool canBeSelectedWhenNotUsingOps(
411  GUI_DisplayOption &disp_opt,
412  bool pick_template,
413  bool pick_non_sel,
414  bool pick_ghost) const;
415 
416  // Full object pick - all or nothing.
417  virtual void objectPick(RE_RenderContext r,
418  GUI_DisplayOption &opts,
419  GR_RenderFlags render_flags,
420  const GR_ObjectPickFlags &pick_flags,
421  bool force_wire);
422 
423  // Component pick, component type based on display option.
424  virtual int componentPick(RE_RenderContext r,
425  GUI_DisplayOption &opts,
426  unsigned int primmask,
428  GR_PickStyle pickstyle,
429  bool has_pick_map,
430  UT_Array<GR_PickRecord> *pick_records);
431 
432  GUI_DetailLook &look() const { return *myLook; }
433  const char *name() const { return myCacheName; }
434 
435  // LIGHTING ------------------------------------------------------------
436 
437  void setupLighting(GR_LightList *list, bool headlight);
438  void cleanupLighting();
439 
440  static void resetStats();
441  static void getStats(int &num_objs,
442  int &num_polys,
443  int &num_vertices);
444 
445  void bumpObjectMaterial() { myObjectMaterialDirty=true; }
446 
447  void useObjectMaterials(bool use_obj_mat);
448  bool getAssignedMaterials(UT_Array<OP_Node *> &nodes) const;
449 
450  int getObjectMaterialID() const { return myObjMaterialID; }
451 
452  void adoptAtlas(const GR_MaterialAtlas &vk_atlas);
453 
454  bool isBBoxShadingMode(const GR_DisplayOption *opt) const
455  {
456  return opt->shadingMode()==GR_BOUNDING_BOX_WIRE
458  }
459 
461  {
462  return isBBoxShadingMode(getDisplayOptionSet(opt));
463  }
464 
465  // Reflection map support, for this object
466  bool prepReflectionMap(RE_RenderContext r,
467  GUI_DisplayOption &opt,
468  int64 version,
469  fpreal time);
470  void startReflectionPass(RE_RenderContext r,
472  void endReflectionPass(RE_RenderContext r);
473  void finishReflectionMap(RE_RenderContext r,
474  GUI_DisplayOption &opt);
475  RE_Texture *getReflectionMap() const;
476 
477  // VISUALIZERS -----------------------------------------------------------
478 
480  { return myVisUpdateTime; }
481 
483  { return myVisRefineTime; }
484 
486  { myVisUpdateTime =
488 
490  { myVisRefineTime = myVisUpdateTime =
492 
493  bool hasUpdateVisualizer(int vis_id) const
494  { return myUpdateVisualizers.find(vis_id) >= 0; }
495 
496  bool hasRefineVisualizer(int vis_id) const
497  { return myRefineVisualizers.find(vis_id) >= 0; }
498 
500  { return look().getActiveVisualizers(); }
501 
503  { return myUpdateVisualizers; }
504 
506  { return myRefineVisualizers; }
507 
509  { myUpdateVisualizers = getActiveVisualizers(); }
510 
512  { myUpdateVisualizers.clear(); }
513 
515  { myRefineVisualizers = getActiveVisualizers(); }
516 
518  { myRefineVisualizers.clear(); }
519 
520  void runCreatorVisualizers(int &listcount,
522 
523  GUI_VisFlags getActiveVisFlags(int prim_idx,
524  GUI_VisContext context) const;
525 
526  // Look for an attribute in the given owner class (or all of them for
527  // GT_OWNER_INVALID) in all cached GT_Primitives in the detail
528  // (those used for updating GR_Primitives in the last update, which,
529  // in particular, have been filtered by visualizes) and return
530  // the first matching attribute if any.
531 
532  const
533  GT_DataArrayHandle findCachedAttribute(const char *attrib_name,
534  GT_Owner owner = GT_OWNER_INVALID) const;
535 
536  // Cached data used for display. Tied to the underlying GU_Detail.
537  virtual const GEO_DetachedHedgeInterface *getHedgeInterface(
538  bool use_hidden_grp);
539  virtual const GEO_PrimClassifier *getPrimClassifier(GU_Connectivity con);
540  virtual const GA_EdgeGroup *getHiddenEdgeGroup();
541  virtual const GA_ElementGroup *getVisibleElementGroup(GA_GroupType t);
542 
543  static int getPolygonMeshLimit(RE_RenderContext r);
544  static int getPointMeshLimit(RE_RenderContext r);
545 
546  static void handleMaterialChange(OP_Node *src, void *dest,
547  OP_EventType type, void *data);
548 
549  bool isMSSEnabled() const { return myMSSEnable; }
550  bool isMSSPackedEnabled() const { return myMSSPackedGeo; }
551  bool isMSSPerPrimEnabled() const { return myMSSPerPrim; }
552  bool areOverridesEnabled() const
553  { return myMaterialUseOverrides; }
554  int getMaterialLimit() const { return myMaterialLimit; }
556  { myMaterialLimitExceeded = e; }
558  { myHasTimeDepMaterials = d; }
560  { return myHasTimeDepMaterials; }
561 
562  // clear all primitives and associated caching information
563  void invalidateGeo();
564 
565  // clear the cached data ids used to enable GR_PACK_TRANSORM_CHANGED
566  // faster code path
568  { myDataIds.clear(); }
569 
570  bool getCameraInfo(const UT_StringHolder &name,
572  UT_Matrix4D &transform) const;
573 
574  static bool initShaders(RV_Instance* inst);
575  static void cleanupShaders();
576 
577  GR_MaterialAtlas *materials() { return &myVulkanMaterials; }
578 
579  bool hasMaterialOpChanges() const
580  { return (myMatOpChanges.size()!=0); }
581 
582  // RAY TRACING ----------------------------------------------------------
583  void prepareForRayTrace(RE_RenderContext r, int tag, int light_id);
584 
585 protected:
586 
587  virtual void cleanupMaterials() {}
588 
590  {
591  myLocalBBox.makeInvalid();
592  myWorldBBox.makeInvalid();
593  myLook->invalidateBBox();
594  }
595  virtual void doUpdateBBox(UT_BoundingBox &world_bbox,
596  UT_BoundingBox &local_bbox);
597 
598  void setShowMaterials(bool show) { myShowMaterials = show; }
599  bool showMaterials() const { return myShowMaterials; }
600  virtual bool shouldRender(const GU_Detail *geo) const;
601 
602  int getNumPrimitives() const
603  { return myPrimitives.entries(); }
604  GR_Primitive *getPrimitive(int index) const;
605 
607  { return &disp_opt[ look().getDisplaySetType() ]; }
608 
610  const GUI_DisplayOption &disp_opt) const
611  { return &disp_opt[ look().getDisplaySetType() ]; }
612 
613  // Required Render functions -------------------------------------------
614 
615  // Wireframe only.
616  virtual void wireRender(RE_RenderContext r,
617  GUI_DisplayOption &disp_opt,
618  const GU_Detail *geo,
621 
622  // Solid polygon render
624  GUI_DisplayOption &disp_opt,
625  const GU_Detail *geo,
628  GR_AlphaPass pass) {};
629 
631  GUI_DisplayOption &opt,
632  const GU_Detail *geo,
634  GR_RenderFlags flags) {};
635 
637  GUI_DisplayOption &opt,
638  RE_Shader *shader=0,
639  bool fill=true,
640  bool outline=true) {};
641 
642  // Utility functions ---------------------------------------------------
643 
644  // Returns the decorations required for the selection types on this detail
645  GR_DecorationOverride getSelectionDecorations(
646  const GR_DisplayOption *opt) const;
647 
648  // Returns true if the geometry has a selection which requires a closure
649  // color.
650  bool isClosureSelection(GU_SelectionHandle sel,
651  bool &has_edges) const;
652  bool isClosureSelection(GR_SelectionAdapter &sel,
653  bool &has_edges) const;
654 
655  // returns true if the buffer was filled because the attribute existed in
656  // the detail, or false if a constant attribute was created (which must be
657  // filled in)
659  {
664  FETCH_ERROR
665  };
666 
667  // returns true if all materials were loaded (textures included).
668  // can return false if timeout > 0 and it took too long.
669  bool prepMaterials(RE_RenderContext r,
670  const GR_DisplayOption *opts,
671  bool &needs_alpha_pass);
672  bool prepVulkanMaterials(RV_Render *r,
673  const GR_DisplayOption *disp,
674  bool &needs_alpha);
675  int prepVulkanMaterialList(RV_Render *r,
676  GR_MaterialAtlas &mats,
677  const GR_DisplayOption *opts,
678  UT_Set<int> &op_ids,
679  bool &needs_alpha,
680  bool &changed);
681 
682  // Setup wire selection uniforms on 'r', and modify 'flags' to include
683  // GR_RENDER_FLAG_WIRE_OVER if needed.
684  void setupWireSelectParms(RE_RenderContext r,
685  const GUI_DisplayOption &disp_opts,
686  bool is_wireframe,
688  void cleanupWireSelectParms(RE_RenderContext r);
689 
690 
691  void setupDepthOffset(RE_RenderContext r,
692  const GUI_DisplayOption &disp_opts,
694  bool *old_poly_offset);
695  void cleanupDepthOffset(RE_RenderContext r, bool old_poly_offset);
696 
697  // Sets the object matrix uniform based on our instancer transform,
698  // detail transform, etc.
699  void setObjectMatrixUniform(RE_RenderContext r);
700 
701  void doPrimitiveUpdates(RE_RenderContext r,
702  GR_DisplayOption *opts,
704  GT_RefineParms& refine_opts,
705  GR_UpdateReason reason,
706  GR_DecorationOverride req_dec,
707  const char *view_name,
708  const GR_FrustumList &view_frustums,
709  bool did_refinement,
710  bool prim_update,
711  bool &needs_alpha);
712  void updatePrimitives(RE_RenderContext r,
713  GR_DisplayOption *opts,
715  GT_RefineParms &refine_opts,
716  GR_UpdateReason reason,
717  GR_DecorationOverride req_dec,
718  const char *view_name,
719  const GR_FrustumList &view_frustums);
720  void processPrimitives(const GU_ConstDetailHandle &geo,
721  GT_PrimitiveHandle &ph,
722  GT_RefineParms &refparms,
723  int &listcount,
724  const GR_DisplayOption &dispopt,
725  GR_UpdateReason reason,
726  const char *cache_name,
728  bool processPrim(const GU_ConstDetailHandle &geo,
729  GT_PrimitiveHandle &ph,
730  GT_RefineParms &refparms,
731  int &listcount,
732  const GR_DisplayOption &dispopt,
733  GR_UpdateReason reason,
734  const char *cache_name,
736  bool apply_filter_vis,
737  int &packed_index);
738 
739  void processAlembicArchive(GT_PrimitiveHandle &ph,
740  const GU_ConstDetailHandle &gdh,
741  GT_RefineParms &refparms,
742  int &listcount,
743  const GR_DisplayOption &dispopt,
744  GR_UpdateReason reason,
745  const char *cache_name,
747  exint mat_id);
748  void clearUnusedAlembicArchives();
749 
750  void renderMatteGroupColors(RE_RenderContext r,
751  GUI_GroupDataHandle group_data,
752  const GR_DisplayOption *opt,
753  GR_RenderFlags render_flags);
754 
755  // Lower level render function used by beautyRender, wireRender, etc.
756  void renderPrims(RE_RenderContext r,
757  const GR_DisplayOption *opt,
760  GR_AlphaPass alphapass,
761  bool use_materials,
762  bool is_onion_skin_pass = false);
763 
764  bool createOrReuseRefinedPrim(GT_PrimitiveHandle &ph,
765  const GU_ConstDetailHandle &gdh,
766  const GEO_Primitive *geo_prim,
767  int &listcount,
768  const GR_DisplayOption &disp,
769  GR_UpdateReason reason,
770  const GT_RefineParms &ref_parms,
771  const char *cache_name,
773  bool processing_geo_prims,
774  bool apply_filter_vis,
775  int packed_index,
776  int64 mat_id);
777  GR_PrimAcceptResult checkForExistingPrim(GT_PrimitiveHandle &ph,
778  GR_Primitive *prim,
779  int pindex,
780  GR_UpdateReason reason,
781  const GT_RefineParms &ref_parms,
782  const GU_ConstDetailHandle &gdh,
783  const GEO_Primitive *geo_prim,
784  int &listcount,
786  bool processing_geo_prims,
787  int packed_index);
788 
789  void classifyPrim(const GT_Primitive *prim);
790  void resetPrimClassify();
791 
792  void accumulateTime(RE_RenderContext r);
793 
794  void buildEdgeHighlight(RE_RenderContext r,
795  const GU_Detail *geo,
796  GR_UpdateReason reason,
797  const GR_DisplayOption *opt,
798  const char *view_name);
799 
800  bool buildInstanceSelection(bool has_sel_overrides);
801  fpreal getPointInstanceFraction(const GR_DisplayOption *opts) const;
802  UT_Matrix4DArray *getPointInstanceTransforms(const GR_DisplayOption *opts);
803 
804  RE_CacheVersion getGeoVersion(const GU_Detail *geo,
805  const GR_DisplayOption *opt);
806  RE_CacheVersion getSelectionVersion(const GU_Detail *geo,
807  const GR_DisplayOption *opt);
808  RE_CacheVersion getEdgeHighlightVersion(const GU_Detail *geo,
809  const GR_DisplayOption *opt,
810  bool include_selection);
811 
813  { mySelectionId = id; mySelectionRevision = version; }
814 
815  GR_PrimAcceptResult processHookPrimitive(GT_PrimitiveHandle &gt_prim,
816  const GEO_Primitive *geo_prim,
817  const GU_ConstDetailHandle &gdh,
818  GR_UpdateReason reason,
819  const GT_RefineParms &ref_parms,
820  const char *cache_name,
821  GR_Primitive *&created,
822  int &list_index,
823  int &hook_priority,
824  bool &filtered_prim,
825  gui_RenderHookEntry *&prev,
827  bool processing_geo_prims,
828  int packed_index);
829 
830  void processFilterHooks(GT_PrimitiveHandle &gt_prim,
831  const GEO_Primitive *geo_prim);
832 
833  void restartCollectionPrimitives();
834  void removeUnusedCollectionPrimitives();
835 
836  void find3DBoundaries(const GU_Detail *geo,
837  const GA_PrimitiveGroup *within_prims,
838  GA_EdgeGroup *boundary_group);
839  void findUVBoundaries(const GU_Detail *geo,
840  const GA_PrimitiveGroup *within_prims,
841  GA_EdgeGroup * uv_boundary_group,
842  const GA_ROHandleV2 &uv,
843  bool vert_uvs);
844 
846  {
847  public:
848  gui_BoundaryData() : myUsed(false), myAttribVersion(-1) {}
849 
856  bool myUsed;
857  };
858 
859  bool matchesVersion(gui_BoundaryData &bdata,
860  const UT_StringHolder &attrib_name,
861  const RE_CacheVersion &ver,
862  bool view_3d, bool vert_uv);
863  void createEdgeGeo(RE_RenderContext r,
864  gui_BoundaryData &bdata,
865  const GA_EdgeGroup *edges,
866  bool is_3d,
867  bool is_vertex,
868  const UT_StringHolder &attrib_name,
869  const UT_StringHolder &cache_suffix,
870  const GU_Detail *geo,
871  const RE_CacheVersion &ev,
872  GA_ROHandleV2 *uvhandle = nullptr);
873 
875  { return myInfo; }
876 
877  void getRefineParms(RE_RenderContext r,
878  const GR_DisplayOption *opts,
879  GT_RefineParms &p) const;
880 
881  void resizePrimArray(exint nprims, bool clear = false);
882  void assignPrim(exint index,
883  GR_Primitive *prim,
884  const GT_PrimitiveHandle &gtprim);
885  void updateWorldTransform();
886 
887  bool checkDisplacementChange(const GR_CommonDispOption &opt);
888 
890 
891  static int theNumObjects;
892  static int theNumPolys;
893  static int theNumVertices;
894 
897  GUI_ObjectMaterialCache *myObjectMaterialCache;
901 
904 
912 
916  int myViewID;
919 
929 
930  // For determining if a display option which affects geometry has changed.
933 
934 private:
935  bool shouldUVRender(const GU_Detail *geo,
936  const GUI_DisplayOption &disp,
937  bool is_vertex) const;
938  bool shouldRender(const GU_Detail *geo,
939  const GUI_DisplayOption &disp,
940  GR_RenderFlags render_flags) const;
941  bool shouldRender(const GU_Detail *geo,
942  const GUI_DisplayOption &disp,
943  GR_DecorRenderFlags decor_flags) const;
944  bool shouldRender(const GU_Detail *geo,
945  const GUI_DisplayOption &disp,
946  GR_PickStyle pick_style) const;
947 
948  bool requiresStateChange(const GUI_DisplayOption &disp_opt,
949  GUI_DisplaySetType newset,
950  GUI_DisplaySetType oldset) const;
951 
952  GR_UpdateReason checkForShaderUpdates(const GU_Detail *geo,
953  const GUI_DisplayOption &disp);
954  bool prepObjectMaterial(RE_RenderContext r,
955  const GR_DisplayOption &opts);
956  bool checkAutoVertexNormal(const GU_Detail *dtl,
957  const GR_CommonDispOption &opts);
958 
959  bool inPackedPrim() const
960  { return myPackedPrimLevel > 0; }
961  bool inInstancePrim() const
962  { return myInstancePrim.entries() > 0; }
963  void updateInstanceEntry(gr_PrimEntry *entry,
964  int prim_index);
965 
966  bool processInstancedPrims(const GT_PrimitiveHandle &ph,
967  int &listcount,
969  int64 geo_id, int64 geo_count,
970  int packed_index,
971  int64 mat_id);
972 
973  // instancing
974  void buildPointInstanceArray(RE_RenderContext r,
975  const GR_DisplayOption *dopts,
976  const GU_Detail *dtl,
977  bool use_fraction_parm);
978  void pointInstanceGuideRender(RE_RenderContext r,
979  GUI_DisplayOption &disp_opt);
980  void renderEdgeHighlight(RE_RenderContext r,
981  const GR_DisplayOption *op,
982  GR_RenderFlags render_flags);
983  void renderBBox(RE_RenderContext r,
984  GUI_DisplayOption &opt,
985  bool set_shader = false,
986  bool is_matte = false,
987  bool fill=true,
988  bool outline=true);
989  virtual int buildInstanceTransforms(RE_RenderContext r,
991  OP_Node * getObjectMaterial(fpreal t);
992  void clearMaterialInterests();
993 
994  UT_Array<gr_PrimEntry *> myPrimitives;
995  UT_IntArray myPrimitiveIndex;
996 
997  GUI_GroupDataHandle myGroupData;
998 
999  UT_Array<gui_HookedPrims *> myHookedGEOPrims;
1000 
1001  bool myObjectMaterialDirty;
1002  int myTopObjectID;
1003  int myShaderNodeID;
1004  UT_StopWatch myShaderRetryTimer;
1005  int myNodeID;
1006  int myGuideID;
1007  bool myUseObjectMaterial;
1008 
1009  GR_RenderInfo myInfo;
1010  GUI_DetailLook *myLook;
1011  int myGeoIndex;
1012  int myNameIndex;
1013  UT_String myCacheName;
1014  bool mySetupFlag;
1015  bool myHasGLStateCheckPrims;
1016  bool myLitFlag;
1017  bool myShadeOpenCurvesFlag;
1018  bool myShadeOpenCurvesFlagSet;
1019  bool myHasGuideParts;
1020  bool myHasPackedPrims;
1021  bool myHasPackedFragments;
1022  bool myHasPackedInstances;
1023  bool myWireframeFlag;
1024  bool myForceShadedFlag;
1025  bool myTransparencySortFlag;
1026  bool myXRayFlag;
1027  bool myRecordingTime;
1028  bool myIsDisplayed;
1029  bool myIsSubD = false;
1030 
1031  bool myHasAgentPrims;
1032  bool myAgentLastLODEnable;
1033  int myAgentLastMinPoints;
1034  int myAgentLastMaxLOD;
1035  int myAgentLastMaxBlendShapeLOD;
1036 
1037  /// Used to detect changes in look onion skinning state.
1038  bool myLookIsOnionSkinning = false;
1039  bool myHasOnionSkinPrims = false;
1040  UT_Optional<fpreal> myCharacterSceneTime;
1042 
1043  bool myHasPolygons = false;
1044  bool myHasCurves = false;
1045  bool myHasPoints = false;
1046 
1049  int myDrawTimeWaiting;
1050  int64 myDrawTime;
1051  int64 mySetupTime;
1052 
1053  int myDetailID;
1054  int64 myVersion;
1055  int64 myTopologyVersion;
1056  int myCachedShowSelect;
1057  int64 myPrimitiveVersion;
1058  int64 myPosVersion;
1059  exint mySelectionId;
1060  exint mySelectionRevision;
1061  int myPostPassID;
1062  bool myNeedsDeferredPass;
1063  bool myNeedsParallelPass;
1064 
1065  // Accumulate a Count and a Sum of attribute data ids to know
1066  // if something changed.
1067  class DataIdsCache
1068  {
1069  public:
1070  DataIdsCache()
1071  : myDataIdsCount(0)
1072  , myDataIdsSum(0)
1073  {}
1074 
1075  bool operator==(const DataIdsCache &rhs) const
1076  {
1077  return myDataIdsCount==rhs.myDataIdsCount &&
1078  myDataIdsSum==rhs.myDataIdsSum;
1079  }
1080 
1081  void clear()
1082  {
1083  myDataIdsCount = 0;
1084  myDataIdsSum = 0;
1085  }
1086 
1087  void append(GA_DataId id)
1088  {
1089  myDataIdsCount++;
1090  myDataIdsSum += (exint)id;
1091  }
1092 
1093  void getDataIdsExcept_p_transform(const GA_Detail *gdp);
1094 
1095  private:
1096  exint myDataIdsCount;
1097  exint myDataIdsSum;
1098  };
1099  DataIdsCache myDataIds;
1100  DataIdsCache myDataIdsCache;
1101 
1102  UT_String myDopnetPath;
1103 
1104  fpreal myLOD;
1105  bool myPolygonConvexQuality;
1106  bool myVertexNormalEnable;
1107  fpreal myVertexNormalCuspAngle;
1108  GR_DecorationOverride myRequiredDecorations;
1109  bool myShowAllPoints;
1110  fpreal myDetailLOD;
1111 
1112  GUI_RenderMask myRenderMask;
1113  GUI_DisplaySetType myObjectState;
1114  GEO_ViewportLOD myObjectLOD;
1115  bool myObjectDisplayAsSubdiv;
1116 
1117  GU_ConstDetailHandle myDetailHandle;
1118  UT_Matrix4DArray myDetailTransforms;
1119  UT_Matrix4DArray myDetailInvTransforms;
1120  UT_Matrix4DArray myReducedDetailTransforms;
1121  bool myDetailTransformIdentity;
1122  UT_Matrix4D myInstancerTransform;
1123  UT_Matrix4D myDetailFullTransform;
1124  bool myInstancerIdentityFlag;
1125  UT_IntArray myDetailGeoIndex;
1126  UT_BoundingBox myLocalBBox;
1127  UT_BoundingBox myWorldBBox;
1128  int64 myCachedInstanceVersion;
1129  int myRefineVersion;
1130  bool myObjectTransformDirty;
1131  bool myNeedsAlphaPassFlag;
1132  bool myPrimAlphaPassFlag;
1133  bool myIsDeferPass;
1134  bool myRefineOnLODChange;
1135  int mySelectionInstance;
1136  fpreal myLimitedInstanceFraction;
1137  bool myShowMaterials;
1138  int myFactoryMaterialOverrideId = -1;
1139 
1140  RE_CacheVersion myInstanceSelectVersion;
1141  UT_BitArray myInstanceSelection;
1142  bool myHasInstanceSelection;
1143 
1144  // for GT_PrimInstance types, this holds the array of instance transforms
1145  // while its geometry is being refined.
1146  class gui_Instance
1147  {
1148  public:
1149  gui_Instance() { myBBox.makeInvalid(); }
1150 
1151  UT_Matrix4DArray myTransforms;
1152  GU_ConstDetailHandle myDetail;
1153  GT_PrimitiveHandle myPrim;
1154  UT_BoundingBox myBBox;
1155  };
1156  UT_Array<gui_Instance> myInstancePrim;
1157  GT_AttributeListHandle myInstancePrimAttribs;
1158  GT_AttributeListHandle myInstancePointAttribs;
1159 
1160  class gui_DiskFile
1161  {
1162  public:
1163  gui_DiskFile() : myPrimIndex(0) {}
1164  UT_StringHolder myDiskFile;
1165  int myPrimIndex;
1166  };
1167  UT_Array<gui_DiskFile> myPackedDiskStack;
1168 
1169  int myPackedPrimLevel;
1170  GT_PrimitiveHandle myPackedPrim;
1171  mutable bool myCachedUseSampleMask;
1172  mutable int myCachedSampleMask;
1173  mutable bool myCachedMultisample;
1174  mutable bool myCachedSampleCoverage;
1175 
1176  fpreal myCubeInstanceFraction;
1177 
1178  RE_ReflectMap *myReflectMap;
1179 
1180  // last update and refinement time in visualization clock (counter)
1181  exint myVisUpdateTime;
1182  exint myVisRefineTime;
1183 
1184  UT_IntArray myUpdateVisualizers;
1185  UT_IntArray myRefineVisualizers;
1186 
1187  // if set to true in setup, updates are upgraded to full refinements.
1188  bool myRefineOnUpdate;
1189  unsigned myMaterialTextureFlag :1,
1190  myMaterialTexturePending :1,
1191  myMaterialHasDisplaceMap :1,
1192  myMaterialHasReflection :1,
1193  myMaterialUseOverrides :1,
1194  myMaterialTexCacheUpdate : 1,
1195  myHasTimeDepMaterials :1,
1196  myHasOpDepMaterials :1,
1197  myMSSEnable :1,
1198  myMSSPackedGeo :1,
1199  myMSSPerPrim :1,
1200  myMatCapDefault:1,
1201  myMatDrawUVMap:1;
1202  GUI_DisplayOption::gui_MatAssignMode myMatAssignMode;
1203  int myMaterialLimit;
1204  bool myMaterialLimitExceeded;
1205  int myObjMaterialID;
1206  DEP_MicroNode myObjMaterialParm;
1207  UT_Set<int> myMaterialReferences;
1208  UT_Set<int> myObjMaterialInterests;
1209 
1210  GT_DataArrayHandle myBaseMaterialAssignments;
1211  GT_DataArrayHandle myBaseMaterialRemap;
1212  int64 myBaseMaterialPrevID;
1213  int64 myBaseMaterialRemapPrevID;
1214  bool myForceMaterialUpdate;
1215  bool myMaterialAllowUpdates;
1216 
1217 
1218  UT_StringHolder myPackedFoldersTopo;
1219 
1220  class gui_DetailAttribLists
1221  {
1222  public:
1223  bool checkForAttribListChanges(const GU_Detail &dtl);
1224 
1225  UT_StringMap<bool> myPoint;
1226  UT_StringMap<bool> myVertex;
1227  UT_StringMap<bool> myPrim;
1228  UT_StringMap<bool> myDetail;
1229 
1230  UT_StringMap<bool> myVisAttribs;
1231  };
1232 
1233  gui_DetailAttribLists myDetailAttribLists;
1234  struct
1235  {
1240  } myHedgeInterface[2];
1241 
1242  UT_UniquePtr<GEO_PrimClassifier> myPrimClassifier;
1243  int myPrimClassifierDetailId;
1244  int64 myPrimClassifierCacheVersion;
1245  int64 myPrimClassifierTopVersion;
1246  int64 myPrimClassifierSelectId;
1247  int64 myPrimClassifierSelectRevision;
1248  GU_Connectivity myPrimClassifierConnectivity;
1249 
1250  GA_GroupUPtr myCachedGroup;
1251  GA_GroupType myCachedGroupType;
1252  int myCachedGroupDetailId;
1253  int64 myCachedGroupCacheVersion;
1254  int64 myCachedGroupTopVersion;
1255 
1256  int64 myCachedHidden3DVersion;
1257 
1258  fpreal myDisplacementValue = -1.0;
1259  bool myDisplacementChanged = false;
1260  bool myAllowTransparency = true;
1261  fpreal myAlphaCutoff = -1.0;
1262 
1263  UT_StringMap<GT_PrimitiveHandle> myAlembicArchives;
1264  UT_StringMap<int> myUsedAlembicArchives;
1265 
1266  UT_StringHolder myUVDisplay;
1267  UT_Set<int> myMatOpChanges;
1268 
1271 public:
1272  // treat as private. For DM_RenderTable only.
1273  static bool registerHook(GUI_PrimitiveHook *hook,
1274  GT_PrimitiveType gt_type,
1275  int geo_type,
1276  int priority,
1278 
1279  friend class gr_PrimEntry;
1280 };
1281 
1282 inline void
1284 {
1286 }
1287 
1288 inline int64
1290 {
1291  return myInstanceVersion;
1292 }
1293 
1294 inline const UT_DMatrix4 &
1296 {
1297  return myDetailTransforms(index);
1298 }
1299 
1300 inline const UT_DMatrix4 &
1302 {
1303  return myDetailInvTransforms(index);
1304 }
1305 
1306 #endif
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
UT_SharedPtr< RV_Geometry > my2DGeo
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:235
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:224
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:703
static int theNumObjects
void shadingMode(GR_ShadingMode shading_mode)
void setNameIndex(int idx)
UT_UniquePtr< RV_ShaderBlock > myEdgeBlock
GA_API const UT_StringHolder rot
int getObjectMaterialID() const
bool isIdentity() const
Definition: UT_Matrix4.h:1130
int64 myInstanceVersion
GUI_VisFlags
int64 exint
Definition: SYS_Types.h:125
fpreal getSetupTime() const
GT_API const UT_StringHolder cache_name
int getNodeID() const
bool hasOnionSkinPrims() 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
UT_UniquePtr< RV_ShaderBlock > myCubeTransforms
bool forceWireframe() const
bool hasUpdateVisualizer(int vis_id) const
static UT_Lock theShaderLock
GR_Decoration
Definition: GR_Defines.h:167
bool isBBoxShadingMode(GUI_DisplayOption &opt) const
GR_AlphaPass
Definition: GR_Defines.h:125
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.
GUI_RenderMask
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_UniquePtr< RV_ShaderVariableSet > myEdgeSet
GR_DecorVisibility
Definition: GR_Defines.h:197
GR_ShadingPass
Definition: GR_Defines.h:134
GR_RenderMode
Definition: GR_Defines.h:48
std::pair< GA_PrimitiveTypeId, GT_PrimitiveType > GUI_PrimTypeKey
Definition: GUI_GeoRender.h:88
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
GUI_ObjectMaterialCache * myObjectMaterialCache
GU_Connectivity
Definition: GU_SelectType.h:66
bool isDisplayAsSubdiv() const
UT_SharedPtr< GA_PrimitiveGroup > myEdgePrims
GR_LightList * myLightList
RV_API void cleanupShaders()
GR_UpdateReason
Definition: GR_Defines.h:317
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:364
void setInstancerTransform(const UT_DMatrix4 &xform)
static int theNumPolys
GR_RenderFlags
Definition: GR_Defines.h:88
const UT_DMatrix4 & getDetailInvTransform(int index) const
GA_API const UT_StringHolder transform
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:50
UT_UniquePtr< RV_ShaderVariableSet > myCubeSet
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)
UT_SharedPtr< RV_Geometry > myGeoV
void refreshRefineVisualizers()
GUI_DisplaySetType getDisplaySetType() const
GLuint shader
Definition: glcorearb.h:785
bool isMSSPerPrimEnabled() const
bool isSetup() const
int getMaterialLimit() const
int64 myUVAttribSerial
GA_API const UT_StringHolder parms
GR_DisplayOption * getDisplayOptionSet(GUI_DisplayOption &disp_opt)
UT_UniquePtr< RV_Geometry > myCubeGeo
void refreshVisUpdateTime()
int getPostPassID() const
UT_SharedPtr< RV_Geometry > my2DGeoV
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:283
bool hasMaterialReflection() const
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:167
GLuint index
Definition: glcorearb.h:786
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
UT_UniquePtr< GA_EdgeGroup > mySelectedEdges
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()
GU_API void xform(CE_Context &context, bool recompile, int npts, const cl::Buffer &outPos, const cl::Buffer &inPos, const cl::Buffer &surfacexform, const cl::Buffer *grp=nullptr)
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:105
bool isMSSPackedEnabled() const
bool needsParallelPass() const
void setCanRenderUV(int uv_render)
fpreal getDrawTime() const
cgltf_primitive * getPrimitive(const cgltf_data &data, const GLTF_Index mesh_id, const GLTF_Index prim_id)
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
GLuint * ids
Definition: glcorearb.h:652
bool hasTimeDependentMaterials() const
virtual bool isLopRender() const
state
Definition: core.h:2289
void needsAlphaPass(bool need)
Definition: format.h:1821
void setGeoIndex(int idx)
UT_SharedPtr< RV_Geometry > myGeo
static GUI_VisInterface * getHandler()
bool areOverridesEnabled() const
GLenum src
Definition: glcorearb.h:1793
UT_UniquePtr< GEO_DetachedHedgeInterface > interface
bool hasPendingMaterialTextures() const
GR_PickStyle
Definition: GR_Defines.h:257
const GR_DisplayOption * getDisplayOptionSet(const GUI_DisplayOption &disp_opt) const