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