HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DM_VPortAgent.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: DM_VPortAgent.h ( DM Library, C++)
7  *
8  * COMMENTS:
9  * DM_VPortAgent is the class for the 2D & 3D viewport agents.
10  * Viewport agents encapsulate the viewport functionality that is
11  * specific to a particular kind of viewport, such as
12  * rendering. There is one agent for each viewport.
13  */
14 
15 #ifndef __DM_VPortAgent__
16 #define __DM_VPortAgent__
17 
18 #include "DM_API.h"
19 #include "DM_Defines.h"
20 #include "DM_GeoDetail.h"
21 #include "DM_ViewportType.h"
22 
23 #include <UI/UI_Object.h>
24 #include <UI/UI_XPtr.h>
25 #include <OP/OP_Bundle.h>
26 #include <GEO/GEO_PrimTypeCompat.h>
27 #include <GR/GR_Defines.h>
28 #include <GR/GR_Light.h>
29 #include <GUI/GUI_RenderCommon.h>
30 #include <GUI/GUI_ViewParameter.h>
31 #include <GUI/GUI_ViewState.h>
32 #include <RE/RE_Texture.h>
33 #include <RE/RE_LightList.h>
34 #include <RE/RE_TimerQuery.h>
35 #include <RE/RE_PickBuffer.h>
36 #include <RE/RE_OGLFramebuffer.h>
37 #include <PXL/PXL_Lookup.h>
38 #include <UT/UT_UniquePtr.h>
39 #include <UT/UT_VectorTypes.h>
40 
41 #ifdef USE_VULKAN
42 #include <RV/RV_Geometry.h>
43 #include <RV/RV_VKFramebuffer.h>
44 #endif
45 
46 class RE_RenderWait;
47 class RE_RenderContext;
48 class RV_Instance;
49 class RV_Render;
50 class UI_Event;
51 class OBJ_Ambient;
52 class GR_PickRecord;
53 class GR_Uniforms;
54 class GUI_DisplayOption;
55 class GUI_GeoRender;
56 class GUI_SceneLook;
57 class GUI_ViewState;
58 class DM_FloorInterface;
59 class dm_PickBuffer;
60 class DM_PostEffects;
61 class DM_RenderHighQuality;
62 class DM_SceneManager;
63 class DM_SnapBuffer;
64 class DM_Viewport;
65 class DM_ViewportHooks;
66 class DM_VPortComposite;
67 
68 #ifdef USE_VULKAN
69 class DM_RenderVulkan;
70 #endif
71 
73 {
74 public:
75  DM_VPortAgent(DM_SceneManager &app,
76  DM_Viewport *display,
77  GUI_ViewState *view,
79  ~DM_VPortAgent() override;
80 
81  /// Each viewport has a unique integer id used to differentiate them.
82  int getUniqueId() const;
83 
84  /// Compute bounding box of the scene.
85  int getBoundingBox(UT_BoundingBox &bbox,
86  const UT_Matrix3R *rot,
87  bool non_templated_only,
88  bool skip_view_cam,
89  const DM_Viewport &viewport) const;
90 
91  /// Called by DM_Viewport to initialize and retire the viewport agent
92  /// when opening and closing. Treat as private.
93  void setupViewport();
94  void cleanupViewport();
95 
96  void refresh() const;
97 
98  /// The projection type of this viewport
99  DM_ViewportType getViewType() const { return myType; }
100 
101  /// For ortho viewports, the projection type (top, front, right, etc)
102  GUI_ViewParameter::axis getHomeAxis() const;
103 
104  /// Projection type, ortho or perspective
105  int isOrtho() const;
106 
107  /// Returns true if user interaction is occuring (drag, tumble, XCF).
108  bool isActiveRender() const;
109 
110  /// Returns true if this is rendering LOPs, and false if Obj,SOPs or DOPs.
111  bool isLopsView() const;
112 
113  /// The view state contains transform, projection and display options
114  const GUI_ViewState &getViewStateRef() const;
115  GUI_ViewState &getViewStateRef();
116 
117  /// Given a look id, and possibly a GUI_DetailList, find the GUI_DetailLook
118  /// with the supplied id.
119  GUI_DetailLookPtr getDetailLook(int look_id, const GUI_DetailList *geos);
120  GUI_DetailLookPtr getDetailLook(int node_id) const;
121  GUI_DetailLookPtr getDetailLookByIndex(int index) const;
122 
123  /// Fetch the detail of the current SOP or POP
124  const GUI_DetailLook*currentDetail() const;
125  GUI_DetailLook *currentDetail();
126 
127  // Return the op node the viewport is looking through (camera or light)
128  OP_Node *currentCamera() const;
129 
130  /// turn on/off the background elements
131  void drawBackground(bool draw);
132 
133  /// Called when loading a new hip file or File>New
134  void resetForNew();
135 
136  /// handle a change in our display options
137  void handleDisplayOptionEvent(UI_Event *e);
138 
139  /// handle a change in our view parameters
140  void handleViewParameterEvent(UI_Event *e);
141 
142  /// render all elements in this viewport
143  void doRender(RE_Render *r, int x, int y);
144 
145  /// render any transient overlay elements in the viewport
146  void overlayRender(RE_Render *r, int x, int y);
147 
148  /// render all handles present in the viewport
149  void renderHandles(RE_Render *r, int x, int y,
150  unsigned mask);
151 
152  /// Change the type of the viewport to a different projection or 2D/3D
153  void changeType(UI_Object *by, DM_ViewportType new_type);
154 
155  /// Called when the viewport closes, but is not deleted (such as a pane tab
156  /// switch).
157  void close();
158 
159  /// Request a deferred redraw.
160  void requestDraw() { myRedrawNotify.changed(nullptr); }
161 
162  /// @brief Access the beauty pass textures
163  /// Get a texture containing the color or depth of the beauty pass buffer.
164  /// This texture is always single-sampled.
165  RE_Texture *getBeautyPassTexture(RE_Render *r,
166  bool resolve_aa = true) const;
167  RE_Texture *getBeautyPassDepthTexture(RE_Render *r,
168  bool resolve_aa = true) const;
169 
170  /// copy the beauty pass to 'dst_texture'.
171  bool copyBeautyToTexture(RE_Render *r,
172  const UT_DimRect &src_area,
173  RE_Texture *dst_texture,
174  int dst_layer) const;
175  bool copyBeautyToTexture(RV_Render *r,
176  const UT_DimRect &src_area,
177  RV_VKImage *dst_texture,
178  int dst_layer) const;
179 
181 
182  /// Returns the LUT for the beauty pass, if any.
183  PXL_Lookup *getBeautyLUT();
184  UT_UniquePtr<TIL_Raster> getBeautyPassImage(RE_Render *r);
185  UT_UniquePtr<TIL_Raster> getBeautyPassDepthImage(RE_Render *r);
186  bool getBeautyPassHDR() const;
187  void setBeautyPassConsolidate(bool con);
188 
189  /// ensure all geometry is up to date before a redraw, and cleanup after
190  void preSetupGeometry(RE_Render *r);
191  void postCleanupGeometry(RE_Render *r);
192  void setupGeometry(RE_RenderContext r);
193  void cleanupGeometry(RE_RenderContext r);
194  void fastSetupGeometry(RE_RenderContext r);
195 
196  /// returns a single pick result from the x,y mouse coords. The pick buffer
197  /// must be rendered first. Returns false if nothing was picked.
198  bool singlePickObject(RE_Render *r, int x, int y,
200  const GR_ObjectPickFlags &pick_flags,
201  fpreal *depth,
202  const GUI_DetailList *geos);
203 
204  /// Check for a pick on a handle. Returns true if a handle was picked.
205  bool singlePickHandle(RE_Render *r, int x, int y,
207  fpreal *depth);
208 
209  /// @brief Area select objects, possibly with a matte.
210  /// returns a list of object IDs for those objects picked. This does not
211  /// pick handles or SOP geometry. The return value is the length of the pick
212  /// list.
213  int boxPickObject(RE_Render *r,
214  const UT_DimRect &area,
215  uint8 *texture,
216  UT_Array<GR_PickRecord> &pick_records,
217  bool visible_only,
218  bool wholy_contained,
219  const GUI_DetailList *geos);
220 
221  /// @brief Single select a geomerty element.
222  /// Returns a single pick result for components in objects 'geos'.
223  bool singlePickComponent(RE_Render *r,
224  int x, int y,
226  unsigned pickmask,
228  fpreal *depth,
229  const GUI_DetailList *geos,
230  bool enable_occlusion,
231  bool handle_pick_radius);
232  /// Box, lasso or paint select components.
233  /// @param contained only return results completely inside area
234  /// @param interactive if true, only return "visible" results, ignoring
235  /// primitives which rasterize to less than a single pixel.
236  int boxPickComponent(RE_Render *r,
237  const UT_DimRect &area,
238  uint8 *texture,
239  UT_Array<GR_PickRecord> &pick_records,
240  bool sort_records,
241  unsigned pickmask,
243  bool visible_only,
244  bool contained,
245  bool interactive,
246  const GUI_DetailList *geos);
247 
248  // Return the raw pick buffer textures that are used for visible
249  // component picking. These buffer may be used for picking or
250  // rendering purposes.
251  bool getComponentPickBuffers(UT_SharedPtr<RE_Texture> &pickhigh,
252  UT_SharedPtr<RE_Texture> &picklow,
254 
255  // Return the objects that should be rendered into the pick buffer
256  // for an object level pick
257  void getObjectPickGeos( const GUI_DetailList *looks,
258  UT_Array<GUI_GeoRender *> &out_all_geos,
259  UT_Array<GUI_GeoRender *> &out_xray_geos,
260  UT_Array<GUI_GeoRender *> &out_xray_sec_geos);
261 
262  // Return the objects that should be rendered into the pick buffer
263  // for an component pick
264  void getComponentPickGeos(const GUI_DetailList *looks,
265  unsigned int xray_pickmask,
266  UT_Array<GUI_GeoRender *> &out_all_geos,
267  UT_Array<GUI_GeoRender *> &out_xray_geos);
268 
269  /// @brief Single select a geometry element to snap to.
270  /// Returns a single snap result for components in objects 'geos'.
271  bool singleSnapComponent(RE_Render *r,
272  int x, int y,
273  bool hide_selected, bool enable_occlusion,
274  bool do_current,
275  bool do_xray, bool do_guides,
276  bool extend_floor,
278  UT_Vector2i *result_offset,
279  UT_Array<GR_PickRecord> &near_results,
280  unsigned pickmask, int gravity,
282  const GUI_DetailList *geos=NULL);
283 
284  /// @brief Single select a peanut element to snap to.
285  /// Returns a single snap result for peanuts.
286  bool singleSnapPeanut(RE_Render *r,
287  int x, int y,
288  bool hide_selected, bool enable_occlusion,
289  bool do_xray, bool do_guides,
290  bool extend_floor,
292  UT_Vector2i *result_offset,
293  unsigned pickmask,
295  const GUI_DetailList *geos=NULL);
296 
297  // Currently only for scene graph view.
298  bool snapGeometry(RE_RenderContext r,
299  int x, int y,
300  int pnt_rad, int edge_rad, int face_rad,
301  bool occlusion,
302  bool orient_normals,
303  DM_SnapSelection snap_sel,
304  UT_Vector3D &p,
305  UT_Vector3D &n,
306  int64 serial);
307 
308  /// Call to manually invalidate any cached pick/snap buffers when the
309  /// automatic detection is insufficient.
310  void invalidatePickBuffers();
311 
312  /// Box, lasso or paint select components.
313  /// Render all geometry in the viewport using render mode 'render_type'.
314  GUI_RenderPassFlags renderGeometry(RE_RenderContext r,
315  GR_RenderMode render_type,
316  GR_ShadingPass shade_pass,
317  GR_AlphaPass apass,
318  OP_Bundle *visible_objs = NULL,
320 
321  /// @brief Draw geometry decorations and markers
322  /// Render all decorations. If 'hover_decorations' is true, only the
323  /// locate-style decorations will be drawn.
324  void renderDecorations(RE_RenderContext r,
325  GUI_DisplayOption *dispopt,
326  bool hover_decorations);
327 
328  /// @brief Render geometry corresponding to OP_Nodes or look IDs.
329  /// Exactly one of 'nodes' and 'look_ids' must be null, and
330  /// 'detail_indexes' corresponds to the geometry in the non-null
331  /// array.
332  GUI_RenderPassFlags renderSomeGeometry(
334  int x, int y,
335  const UT_Array<OP_Node*> *nodes,
336  const UT_IntArray *look_ids,
337  const UT_IntArray *detail_indexes,
338  GR_RenderMode render_type,
339  GR_ShadingPass shade_pass,
340  GR_AlphaPass apass,
341  bool do_geometry_setup);
342 
343  /// Render a single geometry using render mode 'render_type'.
344  GUI_RenderPassFlags renderSingleGeo(
346  GUI_GeoRender *gr,
347  GR_RenderMode render_type,
348  GR_ShadingPass shading_pass,
349  GR_AlphaPass ap,
350  bool init_lights,
351  bool treat_uv_viewport_as_3d = false,
353 
354  /// Our floor or construction plane.
355  void renderFloor(RE_RenderContext r, int x, int y);
356  /// Render construction plane in overlayRender.
357  void overlayRenderFloor(RE_Render *r, int x, int y);
358  /// Check if the floor still needs to be rendered and then clear it.
360  {
361  bool floor = myDrawFloorTransientFlag;
362  myDrawFloorTransientFlag = false;
363  return floor;
364  }
365 
366  const DM_FloorInterface *getFloorInterface() const
367  { return myFloorInterface.get(); }
368  DM_FloorInterface *getFloorInterface() { return myFloorInterface.get(); }
369 
370  /// Interface to viewport hooks (render and mouse)
371  DM_ViewportHooks &hooks() const { return *myViewportHooks; }
372 
373  bool needsOverlayRender() const
374  { return myNeedsOverlayRender; }
375 
376  /// Methods to process mouse movement
377  /// @{
378  bool hasLocates();
379  void handleLocateEvent(UI_Event *e);
380  /// @}
381 
382  /// @brief Access displayed objects in the viewport
383  /// Return a handle to an object displayed in the viewport. Do not cache
384  /// these over several redraws, as they may become invalid. get*Object()'s
385  /// index parameter can be 0 to getNum*Objects()-1.
386  /// @{
387  int getNumOpaqueObjects() const;
388  DM_GeoDetail getOpaqueObject(int index) const;
389 
390  int getNumTransparentObjects() const;
391  DM_GeoDetail getTransparentObject(int index) const;
392 
393  int getNumUnlitObjects() const;
394  DM_GeoDetail getUnlitObject(int index) const;
395 
396  int getNumXRayObjects() const;
397  DM_GeoDetail getXRayObject(int index) const;
398  /// @}
399 
400  /// Returns the current detail within the object, when at SOP/POP/DOP level.
401  DM_GeoDetail getCurrentDetail() const;
402 
403  void initGPUTimers(RE_Render *r);
404  void collectGPUTimers(RE_Render *r);
405 
406  GUI_RotoView getRotoViewType();
407 
408  void markGeoSetup(bool setup,
409  DM_Viewport *setup_port = NULL);
410  bool isGeoSetup() const { return mySetupFlag; }
411 
412  // All lights in the scene, for the material render codepath.
413  void setGlobalLightArray(const UT_Array<OBJ_Ambient *> &l);
414  void setGlobalLightArray(const UT_ValArray<RE_Light*> &l);
415 
416  // Get and set lighting information.
417  bool setupLights(RE_RenderContext r, GUI_DisplayOption *opt);
418  void cleanupLights();
419 
421  { return myMaterialLights; }
422 
423  GR_LightingPass getLightingPass() const { return myLightingPass; }
424  void setLightingPass(GR_LightingPass p) { myLightingPass=p;}
425 
426  // Returns the approximate memory usage of the viewport at the current size
427  // given hdr on/off, high quality lighting on/off, transparency > low,
428  // and aa at 1,2,4 or 8x.
429  int64 getFramebufferUsageKB(bool hdr, bool hql, bool trans,
430  int aa);
431 
432  // using zt[0] / (Z + zt[1]) will transform zbuffer values into viewspace Z
433  // If light is specified, then the shadowmap range of that light is computed
434  void getZBufferTransform(float zt[2],RE_Light *light=NULL);
435 
436  // Handle a change in which geometry is displayed.
437  // For keeping track of what type of UVs to show in UV mode.
438  void handleNewGeometryEvent(UI_Event *e);
439  void updateAttributeOptions(const GU_DetailHandle &gdh);
440 
441  // ---------------------------------------------------------------------
442  // the following methods should be treated as private to DM.
443 
444  /// Methods for starting and stopping events
445  /// in the old performance monitor.
446  void startPerfMonTimer(RE_RenderContext r,
447  RE_GPUTimer &timer,
448  const char *msg) const;
449  void stopPerfMonTimer(RE_RenderContext r,
450  RE_GPUTimer &timer) const;
451 
452  // setup proper winding and culling, returning a set of flags to use for
453  // the cleanup method.
454  int setupBackfaceAndWinding(RE_Render *r,
455  const GUI_DisplayOption *opts);
456  void cleanupBackfaceAndWinding(RE_Render *r,
457  int setup_flags);
458 
459  // resolve the AA Z buffer to a single sample, taking the further sample
460  bool resolveDepthBuffer(RE_Render *r,
461  RE_Texture *aa_depth_tex,
462  RE_Texture *depth_tex) const;
463 
464  int64 getSceneVersion(fpreal t, bool shadow, bool &timedep);
465 
466  // access to parent viewport
467  const DM_Viewport *getDisplay() const { return myDisplay; }
468  DM_Viewport *getDisplay() { return myDisplay; }
469 
470  // for transparency
471  int getTransparencyLayers(RE_RenderContext r,
472  const GUI_DisplayOption *disp);
473  void prepareStencilRouting(RE_RenderContext r,int nsamples);
474  void prepareABufferFront(RE_RenderContext r, int nsamples);
475 
476  void updateTimeDependentLook(fpreal t);
477 
478  bool isToolbarLinked() const; // see .C file note
479 
480  const GUI_DetailPtrList &getDetails() const;
481  const GUI_DetailPtrList &getDetails();
482 
483  void setupViewUniforms(RE_RenderContext rc);
484  void cleanupViewUniforms(RE_RenderContext rc);
485  void setupViewUniformsGL(RE_Render *r);
486  void cleanupViewUniformsGL(RE_Render *r);
487 
488  // Looks through the lights for an environment map
489  void applyEnvMapOverride(RE_Render *r) const;
490 
491  // Helper methods to determine if a GUI_DetailLook, or OBJ_Node, should be
492  // hidden as a view cam object when hiding view cam geometry.
493  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
494  const GUI_DetailLook &look);
495  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
496  const OBJ_Node &node);
497 
498  // For DM_RenderHighQuality.
499  bool needsToDrawFloor() const
500  { return myDrawFloorTransientFlag; }
501  void initFogVolume(RE_Render *r,
502  DM_Viewport *vport,
503  GUI_FogMode fog,
504  const RE_Texture *zdepth) const;
505  RE_Texture *getFogVolumeTexture() const;
506  RE_Texture *getRandomDitherTexture(RE_Render *r);
507 
508  const DM_SceneManager &modeler() const
509  { return mySceneManager; }
510 
511  void renderBackgroundImage(RE_RenderContext r);
512  void renderForegroundImage(RE_RenderContext r);
513 
514  void resolveBeautyColorPass(RE_Render *r,
515  RE_Texture *aa_color,
516  RE_Texture *aa_depth,
517  RE_Texture *aa_nml,
518  bool xray) const;
519 
520  // If true, render to VK images rather than GL-interop VK images.
521  void renderToVulkanImages();
522 
523  void renderVulkan(RE_RenderContext r, UT_Vector2i res);
524 
525  // These only work for Vulkan images (if the above is set to true).
526  UT_UniquePtr<PXL_Raster> extractColorImage(RE_RenderContext r);
527  UT_UniquePtr<PXL_Raster> extractDepthImage(RE_RenderContext r);
528 
529 #ifdef VULKAN_PRESENTATION
530  // Swapchain
531  bool presentColorImage(RE_RenderContext r, RV_VKSwapchain* sc);
532 #endif
533 
534 #ifdef USE_VULKAN
535  // Ray tracing
536  const UT_Array<GUI_DetailLook *> &getRTLooks();
537 
538 
539  static bool initShaders(RV_Instance* inst);
540  static void cleanupShaders();
541 #endif
542 
543  DM_VPortComposite *getComposite() { return myComposite.get(); }
544  void setComposite(UT_UniquePtr<DM_VPortComposite> composite);
545 
546 #ifdef USE_VULKAN
547  DM_RenderVulkan *vkRender() { return myVKRender.get(); }
548 #endif
549 
550 protected:
551  friend class dm_SetupTask;
552 
553 private:
554 
555  RE_RenderContext getVulkanContext(RE_Render *r, int thread_index=0) const;
556 
557  DM_SceneManager &modeler()
558  { return mySceneManager; }
559 
560  const GUI_SceneLook *getLook() const { return mySceneLook.get(); }
561  GUI_SceneLook *getLook() { return mySceneLook.get(); }
562 
563  bool shouldDisplayObject(const DM_Viewport &vport,
564  const GUI_DetailLook *look,
565  OBJ_Node *node);
566 
567  bool shouldVisualizeObject(const DM_Viewport &vport,
568  const GUI_DetailLook *look,
569  OBJ_Node *node);
570 
571  bool shouldShowComponentSelections(const GUI_DetailLook &look,
572  const GUI_DisplayOption &d) const;
573 
574  enum DM_BufferBlend
575  {
576  ACCUM_ADD,
577  ACCUM_REPLACE,
578  ACCUM_ALPHA_BLEND
579  };
580 
581  // prints a message in the viewer (centrally justified) on a given line
582  void renderMessage( RE_Render *ren, int x, int y,
583  const char* msg, int line );
584  // renders true viewer name
585  void doRenderCurrentName(RE_Render *r, int x, int y);
586  // renders the snapshot label
587  void doRenderSnapshotName(RE_Render *r, int x, int y);
588 
589  // prints a message in the viewer for camera (central, bottom justified)
590  void renderCameraMessage( RE_Render *ren, int x, int y,
591  const char* msg);
592 
593  // Render a mask over the parts of the viewport outside of the view
594  // subregion.
595  void renderViewMask(RE_Render *r, int x, int y);
596 
597  bool resizeBeautyPassBuffer(RE_RenderContext r,
598  int width, int height,
599  bool hdr, bool needs_aa);
600  void destroyBeautyPassBuffer();
601  RE_OGLFramebuffer *getBeautyPassBuffer(bool allow_aa);
602 
603  // initializes the view and projection to a 1:1 pixel transform.
604  void pushIdentityOrthoView(RE_Render *r);
605  void popIdentityOrthoView(RE_Render *r);
606 
607  // Render the viewport name.
608  void doRenderName(RE_Render *r, int x, int y,
609  bool snapshot_name = false);
610  // Render the current state information.
611  void doRenderStateStatus(RE_Render *r);
612  // Render a mask over the parts of the viewport outside of the view
613  // subregion.
614  void doRenderViewMask(RE_Render *r, int x, int y);
615 
616  // Draw the view overview gadget.
617  void doRenderViewOverview(RE_Render *r, int x, int y);
618 
619  // Common utility methods to setup lights and the z buffer.
620  void setupForRender(RE_RenderContext ren,
621  bool allow_smooth = true);
622  void cleanupAfterRender(RE_RenderContext ren);
623 
624 
625  void setGammaPass(bool b) { myGammaPass = b?1:0; }
626 
627  void doRenderNoHookUnlitObjects(RE_RenderContext r,
628  int x, int y,
629  bool xray_pass);
630  void doRenderUnlitObjects(RE_RenderContext r, int x, int y);
631 
632  // Render the camera's mask (bars and anything else inside the mask)
633  void doRenderMask(RE_Render *r, int, int);
634 
635  // Render outlines
636  void doRenderOutlines(RE_RenderContext r);
637  // Render separate outlines for objects that have them
638  void doRenderSeparateOutline(RE_RenderContext r,
639  const UT_IntArray &indices);
640  void destroySelectionBuffer();
641 
642  void startBeautyPass(RE_RenderContext r,
643  bool allow_aa=true);
644  void endBeautyPass(RE_RenderContext r, bool allow_aa=true);
645  bool isBeautyPassAA(bool allow_aa = true);
646  bool isHeadlightRender(RE_RenderContext r);
647 
648  // helper methods for setting up stereo passes
649  void setupStereo3d(RE_Render *r);
650  void setupStereoVR(RE_Render *r);
651  void cleanupStereo3d(RE_Render *r);
652  void interruptStereo(RE_Render *r);
653  void resumeStereo(RE_Render *r);
654  void setupStereo3dForLeftCamera(RE_Render *r,
655  bool uniforms_for_3d);
656  void setupStereo3dForRightCamera(RE_Render *r,
657  bool uniforms_for_3d);
658  void updateStereoViewUniforms(RE_Render *r, bool left);
659  void assignStereoLeft(RE_Render *r,
660  const GUI_ViewState::GUI_ViewType vt);
661  void assignStereoRight(RE_Render *r,
662  const GUI_ViewState::GUI_ViewType vt);
663  void assignStereoTop(RE_Render *r,
664  const GUI_ViewState::GUI_ViewType vt);
665  void assignStereoBottom(RE_Render *r,
666  const GUI_ViewState::GUI_ViewType vt);
667 
668  bool setupTransparentBuffers(RE_RenderContext r, int hdr);
669  void destroyTransparentBuffers();
670 
671  /// Setup framebuffer object for storing the result of composite passes.
672  /// @param use_color_buffer_for_depth if true, attach a second color buffer
673  /// for storing depth instead of a depth buffer.
674  /// @see compositePasses
675  bool setupCompositeBuffers(RE_RenderContext r,
676  bool use_color_buffer_for_depth);
677  /// Destroy composite FBO and related textures.
678  void destroyCompositeBuffers();
679 
680  void renderViewport(RE_RenderContext r, int x, int y);
681  void renderSceneView(RE_RenderContext r, int x, int y);
682 
683  // Render the transparent bars defined by the camera's mask parameters
684  void renderCameraMask(RE_Render *r);
685 
686  // Render the object that goes on top of the camera mask
687  void renderCameraMaskOverlay(RE_Render *, int, int);
688 
689  void renderTransparentGeometry(
691  GUI_DisplayOption *dispopt,
692  bool headlight);
693  bool renderHQTransparencyPass(
694  RE_RenderContext r, int x, int y,
695  GUI_DisplayOption *dispopt,
696  const UT_Array<GUI_DetailLook *> *geos = NULL,
697  bool for_xray = false);
698  bool setupHQTransparentBuffers(
699  RE_RenderContext r, int nsamples,
700  bool hdr);
701  void destroyHQTransparentBuffers();
702 
703  void initStencilABuffer(RE_RenderContext r, int nsamples);
704 
705  bool setupUnlitAlphaBuffer(RE_RenderContext r, bool zbuf);
706  void destroyUnlitAlphaBuffer();
707 
708  // Geometry pick code
709  bool createPickBuffer(RE_RenderContext r);
710  bool renderPickBuffer(RE_RenderContext r,
711  bool object_pick,
712  bool enable_occlusion,
713  unsigned int pickmask,
715  const GUI_DetailList *geos,
716  const GR_ObjectPickFlags &pick_flags);
717 
718  // Query the pick buffer. Returns true on a hit.
719  // allow_geo - allow geometry picks (either obj or component
720  // depending on geo_is_object)
721  // allow_handle - allow handle picks
722  // geo_is_object - geometry records are objects instead of
723  // components
724  // geo_ignore_depth - avoid scanning samples looking for a closer
725  // hit (only when !geo_is_object)
726  // geo_prioritize - scan samples looking for a higher priority
727  // component pick (only when !geo_is_object)
728  // floor_prioritize - scan samples looking for a higher priority
729  // floor component pick (only when allow_handle
730  // and does not differentiate between different
731  // floors)
732  // overlap_dist - the distance at which to consider picks to
733  // be essentially overlapping and employ some
734  // heuristics to pick the best one
735  bool pickFromBuffer(RE_RenderContext r,
736  RE_PickBuffer *pick_buffer,
737  int x, int y,
738  bool allow_geo,
739  bool allow_handle,
740  bool geo_is_object,
741  bool geo_ignore_depth,
742  bool geo_prioritize,
743  bool floor_prioritize,
744  int pick_dist,
745  int overlap_dist,
747  UT_Array<GR_PickRecord> *results,
748  UT_Vector2i *result_offset,
749  fpreal *depth,
750  const GUI_DetailList *geos);
751 
752  int filterPickData(int32 *pick_base_data,
753  int32 *pick_component_data,
754  int npicks,
755  UT_Array<GR_PickRecord> &pick_records);
756  int subtractPickData(const UT_Vector3iArray &base,
757  const UT_Vector3iArray &comp,
758  const UT_Array<GR_PickRecord> &outside,
759  UT_Array<GR_PickRecord> &results);
760  void objectPickRender(RE_RenderContext r,
761  unsigned int pickmask,
763  const GUI_DetailList *geos,
764  const GR_ObjectPickFlags &pick_flags);
765  void doObjectBoxPick(RE_RenderContext r,
766  const UT_DimRect &area,
767  UT_Array<GR_PickRecord> &pick_records,
768  bool visible_only,
769  bool invert_mask,
770  bool use_texture,
771  bool clip_edges,
772  const GUI_DetailList *geos);
773 
774  int componentPickRender(RE_RenderContext r,
775  unsigned int pickmask,
776  unsigned int xray_pickmask,
778  const GUI_DetailList *geos,
779  GR_PickStyle pickstyle,
780  bool invert_mask,
781  UT_Array<GR_PickRecord> *pick_rec);
782  int boxPickVisibleComponent(RE_RenderContext r,
783  const UT_DimRect &area,
784  uint8 *texture,
785  UT_Array<GR_PickRecord> &pick_records,
786  unsigned pickmask,
788  const GUI_DetailList *geos,
789  bool contained);
790  int boxPickFrustumComponent(RE_RenderContext r,
791  const UT_DimRect &area,
792  uint8 *texture,
793  UT_Array<GR_PickRecord> &pick_records,
794  unsigned pickmask,
796  const GUI_DetailList *geos,
797  bool visible_only,
798  bool contained);
799 
800 #ifdef USE_VULKAN
801  // helper function called by boxPickObject
802  int boxPickObjectVK(RE_RenderContext r,
803  const UT_DimRect &area,
804  uint8 *texture,
805  UT_Array<GR_PickRecord> &pick_records,
806  bool visible_only,
807  bool wholy_contained,
808  const GUI_DetailList *geos);
809 
810  void doObjectBoxPickVK(RE_RenderContext r,
811  const UT_DimRect &area,
812  UT_Array<GR_PickRecord> &pick_records,
813  bool visible_only,
814  bool invert_mask,
815  bool use_texture,
816  bool clip_edges,
817  const GUI_DetailList *geos);
818 
819  void doPickBufferRenderVK(RE_RenderContext r,
820  bool object_pick,
821  bool enable_occlusion,
822  unsigned int pickmask,
824  const GUI_DetailList *geos,
825  const GR_ObjectPickFlags &pick_flags);
826 
827  void doSnapBufferRenderVK(RE_RenderContext r,
828  unsigned int snapmask,
829  unsigned int xray_snapmask,
831  const GUI_DetailList *geos,
832  bool hide_selected,
833  bool enable_occlusion,
834  bool do_current,
835  bool do_guides);
836 
837  void objectPickRenderVK(RE_RenderContext r,
838  unsigned int pickmask,
840  const GUI_DetailList *geos,
841  const GR_ObjectPickFlags &pick_flags);
842 
843  int componentPickRenderVK(RE_RenderContext r,
844  unsigned int pickmask,
845  unsigned int xray_pickmask,
847  const GUI_DetailList *geos,
848  GR_PickStyle pickstyle,
849  bool invert_mask,
850  bool has_pick_map,
851  UT_Array<GR_PickRecord> *pick_rec);
852 
853  int boxPickFrustumComponentVK(RE_RenderContext r,
854  const UT_DimRect &area,
855  uint8 *texture,
856  UT_Array<GR_PickRecord> &pick_records,
857  unsigned pickmask,
859  const GUI_DetailList *geos,
860  bool visible_only,
861  bool contained);
862 
863  void renderOffsetDepthPassVK(RE_RenderContext r,
864  bool skip_obj_sel_looks,
865  bool skip_guide_looks,
866  bool skip_nonsnappable_looks,
867  bool skip_current_look);
868 
869 #endif
870  void renderOffsetDepthPass(RE_RenderContext r,
871  bool skip_obj_sel_looks = false,
872  bool skip_guide_looks = false,
873  bool skip_nonsnappable_looks = false,
874  bool skip_current_look = false);
875  void flattenAlphaPass(RE_RenderContext r,
876  const GUI_DisplayOption *dispopt,
877  int num_layers);
878  // end pick code
879 
880  // Snapping and handle pick code
881  bool createSnapHandleBuffer(RE_RenderContext r);
882  bool renderHandleBuffer(RE_RenderContext r);
883  bool renderSnapBuffer(RE_RenderContext r,
884  unsigned int snapmask,
886  const GUI_DetailList *geos,
887  bool hide_selected,
888  bool enable_occlusion,
889  bool do_current,
890  bool do_xray, bool do_guides,
891  bool extend_floor);
892  // end snapping and handle pick code
893 
894  bool sampleDepth(RE_Render *r, int x, int y, fpreal &z,
895  RE_Texture *depth_texture);
896 
897  void renderXray(RE_RenderContext r,
898  GUI_DisplayOption *dispopts);
899  void resolveXrayBeautyPass(RE_RenderContext r) const;
900  void renderOnionSkin(RE_RenderContext r,
901  GUI_DisplayOption *dispopts);
902 
903  bool renderBeautyPass(RE_RenderContext r, int x, int y,
904  GUI_DisplayOption *dispopt,
905  bool &needs_lighting);
906  bool renderTransparencyPass(RE_RenderContext r,
907  int x, int y,
908  GUI_DisplayOption *dispopt);
909  bool renderEnvironmentMaps(RE_RenderContext r,
910  bool query_only);
911  void renderEnvMap(RE_RenderContext r,
912  RE_OGLTexture *cubemap,
913  int cubemap_unit) const;
914  void compositePasses(RE_RenderContext r,
915  const GUI_DisplayOption *dispopt,
916  bool skip_postprocessing = false);
917 
918  void normalQualityRender(
920  GUI_DisplayOption *dispopt,
921  GR_AlphaPass alpha_pass,
923  const UT_Array<GUI_DetailLook*> *geos=NULL);
924 
925  bool isUsingHQLighting(RE_RenderContext r,
926  const GUI_DisplayOption *dispopt);
927 
928  void renderOverlappingUV(RE_RenderContext r,
929  GUI_DisplayOption *disp);
930  bool setupOverlappingUVBuffer(RE_RenderContext r,
931  int w, int h);
932  void destroyOverlappingUVBuffer();
933 
934  void renderCoincidentPoints(RE_RenderContext r,
935  GUI_DisplayOption *disp);
936  bool setupCoincidentBuffer(RE_Render *r, int w, int h);
937  void destroyCoincidentBuffer();
938 
939  void subtractFromSelection(UT_Array<GR_PickRecord> &results,
941  exint start_subtracting_at,
943 #ifdef MBSD_COCOA
944  void dmOSXDepthBufferWorkaround(RE_Render *r,
945  RE_Texture *tex);
946 #endif
947  void updateVisibleBoundariesAndViews(int vis_display_sets);
948 
949  void redrawNeeded(UI_Event *);
950 
951  mutable RE_ShaderHandle *myDepthResolveShader;
952 
953  UT_Array<RE_Light *> myMaterialLights;
954 
955  RE_OGLFramebuffer *myBeautyPassBuffer;
956  RE_OGLFramebuffer *myBeautyPassAABuffer;
957  RE_Texture *myBeautyColorTexture;
958  RE_Texture *myBeautyDepthTexture;
959  RE_Texture *myBeautyPassAACTexture;
960  RE_Texture *myBeautyPassAAZTexture;
961  int myBeautyPassSamples;
962  bool myBeautyPassHDR;
963 
964  RE_OGLFramebuffer *myTransparentFBO;
965  RE_Texture *myTransparentColorTex;
966  RE_Texture *myTransparentZTex;
967  bool myTransparentHDR;
968 
969  RE_OGLFramebuffer *mySelectionIDFBO;
970  RE_Texture *mySelectionIDTex;
971  RE_Texture *mySelectionZTex;
972 
973  UT_UniquePtr<RE_Texture> myOutlineColorsTex;
974  UT_Vector4FArray myOutlineColorsArray;
975 
976  UT_UniquePtr<RE_OGLFramebuffer> myOutlineBitmaskFBO;
977  UT_UniquePtr<RE_Texture> myOutlineBitmaskTex;
978 
980  /// The composite FBO is used to write the final composite into textures
981  /// that we can use for post-processing such as slap comp.
982  /// It is only used when @c myComposite is set.
983  UT_UniquePtr<RE_OGLFramebuffer> myCompositeFBO;
984  UT_UniquePtr<RE_Texture> myCompositeColorTexture;
985  UT_UniquePtr<RE_Texture> myCompositeDepthTexture;
986 
987 #ifdef USE_VULKAN // WIP: make private, and make heleper func
988  // so access in DM_Viewport insn't needed
989 public:
991 
992 private:
993  // extra data for box picking
994  UT_UniquePtr<RV_Geometry> myBoxPickObjectGeometryVK;
995  UT_UniquePtr<RV_VKImage> myBoxPickMaskTextureVK;
996 
997  UT_UniquePtr<RV_ShaderVariableSet> myBoxPickSetVK;
998  UT_UniquePtr<RV_Framebuffer> myBoxPickFramebufferVK;
999  UT_UniquePtr<RV_VKImage> myImageFallbackVK;
1000  UT_UniquePtr<RV_VKImage> myBoxPickDepthVK;
1001 
1002  UT_Array<GUI_DetailLook *> myRTLooks;
1003 #endif
1004  DM_RenderHighQuality *myHQRender;
1005  DM_PostEffects *myPostEffects;
1006 
1007  RE_Texture *myRandomDitherTexture;
1008  RE_TextureMap *myRandomDitherTextureMap;
1009 
1010  PXL_Lookup myLookup;
1011  UT_String myLUTFile;
1012  UT_String myOCIODisplay;
1013  exint myOCIOSerial;
1014 
1015  bool myIsBeautyPass;
1016  GR_LightingPass myLightingPass;
1017  bool myIsAlphaPass;
1018  bool myUseUnlitMask;
1019  bool myHighQualityMode;
1020  bool myNeedsXRayResolve;
1021  bool myHasGILight;
1022  bool myHasEnvLight;
1023  bool myHasCascadingShadowLight;
1024  bool myNeedsOverlayRender;
1025  uint64 myStandaloneFlag;
1026  int myStereoMode;
1027  GR_DecorationOverride myDecorationOverride;
1028  UT_StringHolder myDisplayedUVAttrib;
1029  bool myHasTransparencyPass = false;
1030  bool myHasAlphaBuffers = false;
1031 
1032  mutable RE_OGLFramebuffer *myDepthResolveFBO;
1033  mutable unsigned int myDepthResolveShaderFailed : 1,
1034  myZCompositeShaderFailed : 1;
1035 
1036  UT_UniquePtr<DM_FloorInterface> myFloorInterface;
1037  UT_IntArray mySetupLookShowSelection;
1038  bool myHasSelectionsShown;
1039  bool myDrawFloorTransientFlag;
1040  int myDecorLocateMask;
1041  int myDecorVisibleMask;
1042  int myGammaPass;
1043 
1044  RE_GPUTimer myBGTimer;
1045  RE_GPUTimer myFGTimer;
1046  RE_GPUTimer myGeoCleanupTimer;
1047  RE_GPUTimer myUnlitTimer;
1048 
1049  DM_ViewportType myType;
1050  int myRenderCount;
1051  RE_OGLContext myInitContext;
1052 
1053  UT_Array<GUI_DetailLookPtr> mySetupLooks;
1054  UT_Array<OBJ_Node *> mySetupObjects;
1055  UT_Array<GUI_DetailLook *> myUnlitLooks;
1056  UT_Array<GUI_DetailLook *> myXRayLooks;
1057  UT_Array<GUI_DetailLook *> myOnionSkinLooks;
1058  UT_Array<GUI_DetailLook *> myTransparentLooks;
1059  UT_Array<OBJ_Node *> myTransparentObjects;
1060 
1061  bool mySavedAntiAliasOption;
1062  UI_XPtr<GUI_SceneLook> mySceneLook;
1063  DM_SceneManager &mySceneManager;
1064  DM_Viewport *myDisplay;
1065  bool mySetupFlag;
1066 
1067  // Buffers for picking geometry.
1068  UT_UniquePtr<dm_PickBuffer> myPickBuffer;
1069  UT_TokenString *myPickBufferTestHash;
1070 
1071  // Extra data for box picking.
1072  RE_ShaderHandle myBoxPickObjectShader;
1073  RE_Geometry *myBoxPickObjectGeometry;
1074  RE_Texture *myBoxPickMaskTexture;
1075 
1076  // Buffers for snapping to components.
1077  UT_UniquePtr<dm_PickBuffer> mySnapHandleBuffer;
1078  UT_TokenString *mySnapHandleBufferTestHash;
1079 
1080  // General position/orientation snapping
1081  DM_SnapBuffer *mySnapBuffer;
1082  bool mySnapHasValidData;
1083 
1084  RE_LightList myGLLightList;
1085  UT_Array<RE_Light *> myNormalQualityLights;
1086 
1087  RE_OGLFramebuffer *myUnlitAlphaFBO;
1088  RE_Texture *myUnlitAlphaTexture;
1089  RE_Texture *myUnlitDepthTexture;
1090 
1091  static RE_ShaderHandle theBeautyCompShader;
1092  static RE_ShaderHandle theBeautyCompAAShader;
1093  static RE_ShaderHandle theBeautyCompHQAlpha4Shader;
1094  static RE_ShaderHandle theBeautyCompHQAlpha4AAShader;
1095  static RE_ShaderHandle theBeautyCompHQAlpha8Shader;
1096  static RE_ShaderHandle theBeautyCompHQAlpha8AAShader;
1097  static RE_ShaderHandle theBeautyCompHQAlpha16Shader;
1098  static RE_ShaderHandle theBeautyCompHQAlpha16AAShader;
1099  static RE_ShaderHandle theDepthCompShader;
1100  static RE_ShaderHandle theDepthComp4Shader;
1101  static RE_ShaderHandle theDepthComp8Shader;
1102  static RE_ShaderHandle theDepthComp16Shader;
1103  static RE_ShaderHandle theColorCorrectCompShader;
1104  static RE_ShaderHandle theAlphaFlatten4Shader;
1105  static RE_ShaderHandle theAlphaFlatten8Shader;
1106  static RE_ShaderHandle theAlphaFlatten16Shader;
1107  static RE_ShaderHandle theUnlitAlphaShader;
1108  static RE_ShaderHandle theUnlitDepthShader;
1109  static RE_ShaderHandle theXRayShader;
1110 
1111  int myDecorLocateRawPos[2];
1112  int myDecorLocatePos[2];
1113  RE_ShaderHandle mySampleDepthShader;
1114 
1115  RE_OGLFramebuffer *myHQTransparentFBO;
1116  RE_Texture *myHQTransparentColorTex;
1117  RE_Texture *myHQTransparentStencil;
1118  bool myHQTransparentHDR;
1119 
1120  UT_UniquePtr<RE_Geometry> myCubeGeo;
1121 
1122  RE_OGLFramebuffer *myCoincidentBuffer;
1123  RE_Texture *myCoincidentTexture;
1124  RE_OGLFramebuffer *myOverlappingUVBuffer;
1125 
1126  bool myRampUnitPushed;
1127 
1128  RE_RenderWait *myBeautyPassSync;
1129 
1130  RE_GPUTimer myPreRenderTimer;
1131  RE_GPUTimer myPostRenderTimer;
1132  RE_GPUTimer myXRayTimer;
1133  RE_GPUTimer myOnionSkinTimer;
1134  RE_GPUTimer myCompositeTimer;
1135  RE_GPUTimer myBGEnvMapTimer;
1136  RE_GPUTimer myDecorTimer;
1137  RE_GPUTimer myHandleTimer;
1138 
1139  bool myUseHQLighting;
1140  bool myHasPerLookPickPriority;
1141 
1142  DM_ViewportHooks *myViewportHooks;
1143  UT_IntArray myViewportConfig;
1144  UI_Value myRedrawNotify;
1145  int myCurrentObjectID;
1146 };
1147 #endif
GLsizei GLenum const void * indices
Definition: glcorearb.h:406
void requestDraw()
Request a deferred redraw.
int int32
Definition: SYS_Types.h:39
bool isGeoSetup() const
GR_DecorationOverride
Definition: GR_Defines.h:221
IMATH_HOSTDEVICE constexpr int floor(T x) IMATH_NOEXCEPT
Definition: ImathFun.h:112
GLint left
Definition: glcorearb.h:2005
const DM_Viewport * getDisplay() const
GA_API const UT_StringHolder rot
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
Definition: RE_Geometry.h:52
int64 exint
Definition: SYS_Types.h:125
PUGI__FN void sort(I begin, I end, const Pred &pred)
Definition: pugixml.cpp:7550
GLint y
Definition: glcorearb.h:103
const UT_Array< RE_Light * > & getAllLights() const
**But if you need a result
Definition: thread.h:622
const DM_FloorInterface * getFloorInterface() const
void close() override
unsigned long long uint64
Definition: SYS_Types.h:117
GR_AlphaPass
Definition: GR_Defines.h:123
Temporary container for either a RV_Render and an RE_Render.
DM_ViewportHooks & hooks() const
Interface to viewport hooks (render and mouse)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
#define DM_API
Definition: DM_API.h:10
DM_ViewportType getViewType() const
The projection type of this viewport.
Definition: DM_VPortAgent.h:99
unsigned char uint8
Definition: SYS_Types.h:36
void setLightingPass(GR_LightingPass p)
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
GLdouble n
Definition: glcorearb.h:2008
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
ImageBuf OIIO_API sub(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GR_ShadingPass
Definition: GR_Defines.h:132
GR_RenderMode
Definition: GR_Defines.h:48
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
GA_API const UT_StringHolder trans
GR_ThreadingPass
Definition: GR_Defines.h:141
GLint GLuint mask
Definition: glcorearb.h:124
RV_API void cleanupShaders()
GUI_RenderPassFlags
long long int64
Definition: SYS_Types.h:116
const DM_SceneManager & modeler() const
GUI_FogMode
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
Handle to the main interface of Vulkan.
Definition: RV_Instance.h:44
GLint GLenum GLint x
Definition: glcorearb.h:409
bool needsToDrawFloor() const
GLdouble t
Definition: glad.h:2397
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glcorearb.h:476
DM_SnapSelection
Definition: DM_Defines.h:208
RV_API bool initShaders(RV_Instance *inst)
DM_FloorInterface * getFloorInterface()
Contains transitional objects to provide some backward compatibility for code that references old GEO...
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:2002
DM_VPortComposite * getComposite()
GUI_RotoView
Viewport type for Rotoscope settings.
bool needsOverlayRender() const
bool checkAndClearTransientFloorFlag()
Check if the floor still needs to be rendered and then clear it.
fpreal64 fpreal
Definition: SYS_Types.h:278
GLuint index
Definition: glcorearb.h:786
DM_GeoSortMode
Definition: DM_Defines.h:150
GR_LightingPass
Definition: GR_Defines.h:148
GLint GLsizei width
Definition: glcorearb.h:103
GLuint texture
Definition: glcorearb.h:415
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
#define DM_VIEWPORT_PERSPECTIVE
GR_LightingPass getLightingPass() const
GLboolean r
Definition: glcorearb.h:1222
set of parameters sent to GR_Primitive::update()
Definition: GR_Uniforms.h:56
QOpenGLContext * RE_OGLContext
Definition: RE_Types.h:949
DM_Viewport * getDisplay()
int DM_ViewportType
UT_UniquePtr< TIL_Raster > RasterPtr
GA_API const UT_StringHolder area
Simple interface to building a shader from a .prog file.
GR_PickStyle
Definition: GR_Defines.h:254