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