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  bool reverse_depth = false);
436 
437  // Handle a change in which geometry is displayed.
438  // For keeping track of what type of UVs to show in UV mode.
439  void handleNewGeometryEvent(UI_Event *e);
440  void updateAttributeOptions(const GU_DetailHandle &gdh);
441 
442  // ---------------------------------------------------------------------
443  // the following methods should be treated as private to DM.
444 
445  /// Methods for starting and stopping events
446  /// in the old performance monitor.
447  void startPerfMonTimer(RE_RenderContext r,
448  RE_GPUTimer &timer,
449  const char *msg) const;
450  void stopPerfMonTimer(RE_RenderContext r,
451  RE_GPUTimer &timer) const;
452 
453  // setup proper winding and culling, returning a set of flags to use for
454  // the cleanup method.
455  int setupBackfaceAndWinding(RE_Render *r,
456  const GUI_DisplayOption *opts);
457  void cleanupBackfaceAndWinding(RE_Render *r,
458  int setup_flags);
459 
460  // resolve the AA Z buffer to a single sample, taking the further sample
461  bool resolveDepthBuffer(RE_Render *r,
462  RE_Texture *aa_depth_tex,
463  RE_Texture *depth_tex) const;
464 
465  int64 getSceneVersion(fpreal t, bool shadow, bool &timedep);
466 
467  // access to parent viewport
468  const DM_Viewport *getDisplay() const { return myDisplay; }
469  DM_Viewport *getDisplay() { return myDisplay; }
470 
471  // for transparency
472  int getTransparencyLayers(RE_RenderContext r,
473  const GUI_DisplayOption *disp);
474  void prepareStencilRouting(RE_RenderContext r,int nsamples);
475  void prepareABufferFront(RE_RenderContext r, int nsamples);
476 
477  void updateTimeDependentLook(fpreal t);
478 
479  bool isToolbarLinked() const; // see .C file note
480 
481  const GUI_DetailPtrList &getDetails() const;
482  const GUI_DetailPtrList &getDetails();
483 
484  void setupViewUniforms(RE_RenderContext rc);
485  void cleanupViewUniforms(RE_RenderContext rc);
486  void setupViewUniformsGL(RE_Render *r);
487  void cleanupViewUniformsGL(RE_Render *r);
488 
489  // Looks through the lights for an environment map
490  void applyEnvMapOverride(RE_Render *r) const;
491 
492  // Helper methods to determine if a GUI_DetailLook, or OBJ_Node, should be
493  // hidden as a view cam object when hiding view cam geometry.
494  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
495  const GUI_DetailLook &look);
496  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
497  const OBJ_Node &node);
498 
499  // For DM_RenderHighQuality.
500  bool needsToDrawFloor() const
501  { return myDrawFloorTransientFlag; }
502  void initFogVolume(RE_Render *r,
503  DM_Viewport *vport,
504  GUI_FogMode fog,
505  const RE_Texture *zdepth) const;
506  RE_Texture *getFogVolumeTexture() const;
507  RE_Texture *getRandomDitherTexture(RE_Render *r);
508 
509  const DM_SceneManager &modeler() const
510  { return mySceneManager; }
511 
512  void renderBackgroundImage(RE_RenderContext r);
513  void renderForegroundImage(RE_RenderContext r);
514 
515  void resolveBeautyColorPass(RE_Render *r,
516  RE_Texture *aa_color,
517  RE_Texture *aa_depth,
518  RE_Texture *aa_nml,
519  bool xray) const;
520 
521  // If true, render to VK images rather than GL-interop VK images.
522  void renderToVulkanImages();
523 
524  void renderVulkan(RE_RenderContext r, UT_Vector2i res);
525 
526  // These only work for Vulkan images (if the above is set to true).
527  UT_UniquePtr<PXL_Raster> extractColorImage(RE_RenderContext r);
528  UT_UniquePtr<PXL_Raster> extractDepthImage(RE_RenderContext r);
529 
530 #ifdef VULKAN_PRESENTATION
531  // Swapchain
532  bool presentColorImage(RE_RenderContext r, RV_VKSwapchain* sc);
533 #endif
534 
535 #ifdef USE_VULKAN
536  // Ray tracing
537  const UT_Array<GUI_DetailLook *> &getRTLooks();
538 
539 
540  static bool initShaders(RV_Instance* inst);
541  static void cleanupShaders();
542 #endif
543 
544  DM_VPortComposite *getComposite() { return myComposite.get(); }
545  void setComposite(UT_UniquePtr<DM_VPortComposite> composite);
546 
547 #ifdef USE_VULKAN
548  DM_RenderVulkan *vkRender() { return myVKRender.get(); }
549 #endif
550 
551 protected:
552  friend class dm_SetupTask;
553 
554 private:
555 
556  RE_RenderContext getVulkanContext(RE_Render *r, int thread_index=0) const;
557 
558  DM_SceneManager &modeler()
559  { return mySceneManager; }
560 
561  const GUI_SceneLook *getLook() const { return mySceneLook.get(); }
562  GUI_SceneLook *getLook() { return mySceneLook.get(); }
563 
564  bool shouldDisplayObject(const DM_Viewport &vport,
565  const GUI_DetailLook *look,
566  OBJ_Node *node);
567 
568  bool shouldVisualizeObject(const DM_Viewport &vport,
569  const GUI_DetailLook *look,
570  OBJ_Node *node);
571 
572  bool shouldShowComponentSelections(const GUI_DetailLook &look,
573  const GUI_DisplayOption &d) const;
574 
575  enum DM_BufferBlend
576  {
577  ACCUM_ADD,
578  ACCUM_REPLACE,
579  ACCUM_ALPHA_BLEND
580  };
581 
582  // prints a message in the viewer (centrally justified) on a given line
583  void renderMessage( RE_Render *ren, int x, int y,
584  const char* msg, int line );
585  // renders true viewer name
586  void doRenderCurrentName(RE_Render *r, int x, int y);
587  // renders the snapshot label
588  void doRenderSnapshotName(RE_Render *r, int x, int y);
589 
590  // prints a message in the viewer for camera (central, bottom justified)
591  void renderCameraMessage( RE_Render *ren, int x, int y,
592  const char* msg);
593 
594  // Render a mask over the parts of the viewport outside of the view
595  // subregion.
596  void renderViewMask(RE_Render *r, int x, int y);
597 
598  bool resizeBeautyPassBuffer(RE_RenderContext r,
599  int width, int height,
600  bool hdr, bool needs_aa);
601  void destroyBeautyPassBuffer();
602  RE_OGLFramebuffer *getBeautyPassBuffer(bool allow_aa);
603 
604  // initializes the view and projection to a 1:1 pixel transform.
605  void pushIdentityOrthoView(RE_Render *r);
606  void popIdentityOrthoView(RE_Render *r);
607 
608  // Render the viewport name.
609  void doRenderName(RE_Render *r, int x, int y,
610  bool snapshot_name = false);
611  // Render the current state information.
612  void doRenderStateStatus(RE_Render *r);
613  // Render a mask over the parts of the viewport outside of the view
614  // subregion.
615  void doRenderViewMask(RE_Render *r, int x, int y);
616 
617  // Draw the view overview gadget.
618  void doRenderViewOverview(RE_Render *r, int x, int y);
619 
620  // Common utility methods to setup lights and the z buffer.
621  void setupForRender(RE_RenderContext ren,
622  bool allow_smooth = true);
623  void cleanupAfterRender(RE_RenderContext ren);
624 
625 
626  void setGammaPass(bool b) { myGammaPass = b?1:0; }
627 
628  void doRenderNoHookUnlitObjects(RE_RenderContext r,
629  int x, int y,
630  bool xray_pass);
631  void doRenderUnlitObjects(RE_RenderContext r, int x, int y);
632 
633  // Render the camera's mask (bars and anything else inside the mask)
634  void doRenderMask(RE_Render *r, int, int);
635 
636  // Render outlines
637  void doRenderOutlines(RE_RenderContext r);
638  // Render separate outlines for objects that have them
639  void doRenderSeparateOutline(RE_RenderContext r,
640  const UT_IntArray &indices);
641  void destroySelectionBuffer();
642 
643  void startBeautyPass(RE_RenderContext r,
644  bool allow_aa=true);
645  void endBeautyPass(RE_RenderContext r, bool allow_aa=true);
646  bool isBeautyPassAA(bool allow_aa = true);
647  bool isHeadlightRender(RE_RenderContext r);
648 
649  // helper methods for setting up stereo passes
650  void setupStereo3d(RE_Render *r);
651  void setupStereoVR(RE_Render *r);
652  void cleanupStereo3d(RE_Render *r);
653  void interruptStereo(RE_Render *r);
654  void resumeStereo(RE_Render *r);
655  void setupStereo3dForLeftCamera(RE_Render *r,
656  bool uniforms_for_3d);
657  void setupStereo3dForRightCamera(RE_Render *r,
658  bool uniforms_for_3d);
659  void updateStereoViewUniforms(RE_Render *r, bool left);
660  void assignStereoLeft(RE_Render *r,
661  const GUI_ViewState::GUI_ViewType vt);
662  void assignStereoRight(RE_Render *r,
663  const GUI_ViewState::GUI_ViewType vt);
664  void assignStereoTop(RE_Render *r,
665  const GUI_ViewState::GUI_ViewType vt);
666  void assignStereoBottom(RE_Render *r,
667  const GUI_ViewState::GUI_ViewType vt);
668 
669  bool setupTransparentBuffers(RE_RenderContext r, int hdr);
670  void destroyTransparentBuffers();
671 
672  /// Setup framebuffer object for storing the result of composite passes.
673  /// @param use_color_buffer_for_depth if true, attach a second color buffer
674  /// for storing depth instead of a depth buffer.
675  /// @see compositePasses
676  bool setupCompositeBuffers(RE_RenderContext r,
677  bool use_color_buffer_for_depth);
678  /// Destroy composite FBO and related textures.
679  void destroyCompositeBuffers();
680 
681  void renderViewport(RE_RenderContext r, int x, int y);
682  void renderSceneView(RE_RenderContext r, int x, int y);
683 
684  // Render the transparent bars defined by the camera's mask parameters
685  void renderCameraMask(RE_Render *r);
686 
687  // Render the object that goes on top of the camera mask
688  void renderCameraMaskOverlay(RE_Render *, int, int);
689 
690  void renderTransparentGeometry(
692  GUI_DisplayOption *dispopt,
693  bool headlight);
694  bool renderHQTransparencyPass(
695  RE_RenderContext r, int x, int y,
696  GUI_DisplayOption *dispopt,
697  const UT_Array<GUI_DetailLook *> *geos = NULL,
698  bool for_xray = false);
699  bool setupHQTransparentBuffers(
700  RE_RenderContext r, int nsamples,
701  bool hdr);
702  void destroyHQTransparentBuffers();
703 
704  void initStencilABuffer(RE_RenderContext r, int nsamples);
705 
706  bool setupUnlitAlphaBuffer(RE_RenderContext r, bool zbuf);
707  void destroyUnlitAlphaBuffer();
708 
709  // Geometry pick code
710  bool createPickBuffer(RE_RenderContext r);
711  bool renderPickBuffer(RE_RenderContext r,
712  bool object_pick,
713  bool enable_occlusion,
714  unsigned int pickmask,
716  const GUI_DetailList *geos,
717  const GR_ObjectPickFlags &pick_flags);
718 
719  // Query the pick buffer. Returns true on a hit.
720  // allow_geo - allow geometry picks (either obj or component
721  // depending on geo_is_object)
722  // allow_handle - allow handle picks
723  // geo_is_object - geometry records are objects instead of
724  // components
725  // geo_ignore_depth - avoid scanning samples looking for a closer
726  // hit (only when !geo_is_object)
727  // geo_prioritize - scan samples looking for a higher priority
728  // component pick (only when !geo_is_object)
729  // floor_prioritize - scan samples looking for a higher priority
730  // floor component pick (only when allow_handle
731  // and does not differentiate between different
732  // floors)
733  // overlap_dist - the distance at which to consider picks to
734  // be essentially overlapping and employ some
735  // heuristics to pick the best one
736  bool pickFromBuffer(RE_RenderContext r,
737  RE_PickBuffer *pick_buffer,
738  int x, int y,
739  bool allow_geo,
740  bool allow_handle,
741  bool geo_is_object,
742  bool geo_ignore_depth,
743  bool geo_prioritize,
744  bool floor_prioritize,
745  int pick_dist,
746  int overlap_dist,
748  UT_Array<GR_PickRecord> *results,
749  UT_Vector2i *result_offset,
750  fpreal *depth,
751  const GUI_DetailList *geos);
752 
753  int filterPickData(int32 *pick_base_data,
754  int32 *pick_component_data,
755  int npicks,
756  UT_Array<GR_PickRecord> &pick_records);
757  int subtractPickData(const UT_Vector3iArray &base,
758  const UT_Vector3iArray &comp,
759  const UT_Array<GR_PickRecord> &outside,
760  UT_Array<GR_PickRecord> &results);
761  void objectPickRender(RE_RenderContext r,
762  unsigned int pickmask,
764  const GUI_DetailList *geos,
765  const GR_ObjectPickFlags &pick_flags);
766  void doObjectBoxPick(RE_RenderContext r,
767  const UT_DimRect &area,
768  UT_Array<GR_PickRecord> &pick_records,
769  bool visible_only,
770  bool invert_mask,
771  bool use_texture,
772  bool clip_edges,
773  const GUI_DetailList *geos);
774 
775  int componentPickRender(RE_RenderContext r,
776  unsigned int pickmask,
777  unsigned int xray_pickmask,
779  const GUI_DetailList *geos,
780  GR_PickStyle pickstyle,
781  bool invert_mask,
782  UT_Array<GR_PickRecord> *pick_rec);
783  int boxPickVisibleComponent(RE_RenderContext r,
784  const UT_DimRect &area,
785  uint8 *texture,
786  UT_Array<GR_PickRecord> &pick_records,
787  unsigned pickmask,
789  const GUI_DetailList *geos,
790  bool contained);
791  int boxPickFrustumComponent(RE_RenderContext r,
792  const UT_DimRect &area,
793  uint8 *texture,
794  UT_Array<GR_PickRecord> &pick_records,
795  unsigned pickmask,
797  const GUI_DetailList *geos,
798  bool visible_only,
799  bool contained);
800 
801 #ifdef USE_VULKAN
802  // helper function called by boxPickObject
803  int boxPickObjectVK(RE_RenderContext r,
804  const UT_DimRect &area,
805  uint8 *texture,
806  UT_Array<GR_PickRecord> &pick_records,
807  bool visible_only,
808  bool wholy_contained,
809  const GUI_DetailList *geos);
810 
811  void doObjectBoxPickVK(RE_RenderContext r,
812  const UT_DimRect &area,
813  UT_Array<GR_PickRecord> &pick_records,
814  bool visible_only,
815  bool invert_mask,
816  bool use_texture,
817  bool clip_edges,
818  const GUI_DetailList *geos);
819 
820  void doPickBufferRenderVK(RE_RenderContext r,
821  bool object_pick,
822  bool enable_occlusion,
823  unsigned int pickmask,
825  const GUI_DetailList *geos,
826  const GR_ObjectPickFlags &pick_flags);
827 
828  void doSnapBufferRenderVK(RE_RenderContext r,
829  unsigned int snapmask,
830  unsigned int xray_snapmask,
832  const GUI_DetailList *geos,
833  bool hide_selected,
834  bool enable_occlusion,
835  bool do_current,
836  bool do_guides);
837 
838  void objectPickRenderVK(RE_RenderContext r,
839  unsigned int pickmask,
841  const GUI_DetailList *geos,
842  const GR_ObjectPickFlags &pick_flags);
843 
844  int componentPickRenderVK(RE_RenderContext r,
845  unsigned int pickmask,
846  unsigned int xray_pickmask,
848  const GUI_DetailList *geos,
849  GR_PickStyle pickstyle,
850  bool invert_mask,
851  bool has_pick_map,
852  UT_Array<GR_PickRecord> *pick_rec);
853 
854  int boxPickFrustumComponentVK(RE_RenderContext r,
855  const UT_DimRect &area,
856  uint8 *texture,
857  UT_Array<GR_PickRecord> &pick_records,
858  unsigned pickmask,
860  const GUI_DetailList *geos,
861  bool visible_only,
862  bool contained);
863 
864  void renderOffsetDepthPassVK(RE_RenderContext r,
865  bool skip_obj_sel_looks,
866  bool skip_guide_looks,
867  bool skip_nonsnappable_looks,
868  bool skip_current_look);
869 
870 #endif
871  void renderOffsetDepthPass(RE_RenderContext r,
872  bool skip_obj_sel_looks = false,
873  bool skip_guide_looks = false,
874  bool skip_nonsnappable_looks = false,
875  bool skip_current_look = false);
876  void flattenAlphaPass(RE_RenderContext r,
877  const GUI_DisplayOption *dispopt,
878  int num_layers);
879  // end pick code
880 
881  // Snapping and handle pick code
882  bool createSnapHandleBuffer(RE_RenderContext r);
883  bool renderHandleBuffer(RE_RenderContext r);
884  bool renderSnapBuffer(RE_RenderContext r,
885  unsigned int snapmask,
887  const GUI_DetailList *geos,
888  bool hide_selected,
889  bool enable_occlusion,
890  bool do_current,
891  bool do_xray, bool do_guides,
892  bool extend_floor);
893  // end snapping and handle pick code
894 
895  bool sampleDepth(RE_Render *r, int x, int y, fpreal &z,
896  RE_Texture *depth_texture);
897 
898  void renderXray(RE_RenderContext r,
899  GUI_DisplayOption *dispopts);
900  void resolveXrayBeautyPass(RE_RenderContext r) const;
901  void renderOnionSkin(RE_RenderContext r,
902  GUI_DisplayOption *dispopts);
903 
904  bool renderBeautyPass(RE_RenderContext r, int x, int y,
905  GUI_DisplayOption *dispopt,
906  bool &needs_lighting);
907  bool renderTransparencyPass(RE_RenderContext r,
908  int x, int y,
909  GUI_DisplayOption *dispopt);
910  bool renderEnvironmentMaps(RE_RenderContext r,
911  bool query_only);
912  void renderEnvMap(RE_RenderContext r,
913  RE_OGLTexture *cubemap,
914  int cubemap_unit) const;
915  void compositePasses(RE_RenderContext r,
916  const GUI_DisplayOption *dispopt,
917  bool skip_postprocessing = false);
918 
919  void normalQualityRender(
921  GUI_DisplayOption *dispopt,
922  GR_AlphaPass alpha_pass,
924  const UT_Array<GUI_DetailLook*> *geos=NULL);
925 
926  bool isUsingHQLighting(RE_RenderContext r,
927  const GUI_DisplayOption *dispopt);
928 
929  void renderOverlappingUV(RE_RenderContext r,
930  GUI_DisplayOption *disp);
931  bool setupOverlappingUVBuffer(RE_RenderContext r,
932  int w, int h);
933  void destroyOverlappingUVBuffer();
934 
935  void renderCoincidentPoints(RE_RenderContext r,
936  GUI_DisplayOption *disp);
937  bool setupCoincidentBuffer(RE_Render *r, int w, int h);
938  void destroyCoincidentBuffer();
939 
940  void subtractFromSelection(UT_Array<GR_PickRecord> &results,
942  exint start_subtracting_at,
944 #ifdef MBSD_COCOA
945  void dmOSXDepthBufferWorkaround(RE_Render *r,
946  RE_Texture *tex);
947 #endif
948  void updateVisibleBoundariesAndViews(int vis_display_sets);
949 
950  void redrawNeeded(UI_Event *);
951 
952  mutable RE_ShaderHandle *myDepthResolveShader;
953 
954  UT_Array<RE_Light *> myMaterialLights;
955 
956  RE_OGLFramebuffer *myBeautyPassBuffer;
957  RE_OGLFramebuffer *myBeautyPassAABuffer;
958  RE_Texture *myBeautyColorTexture;
959  RE_Texture *myBeautyDepthTexture;
960  RE_Texture *myBeautyPassAACTexture;
961  RE_Texture *myBeautyPassAAZTexture;
962  int myBeautyPassSamples;
963  bool myBeautyPassHDR;
964 
965  RE_OGLFramebuffer *myTransparentFBO;
966  RE_Texture *myTransparentColorTex;
967  RE_Texture *myTransparentZTex;
968  bool myTransparentHDR;
969 
970  RE_OGLFramebuffer *mySelectionIDFBO;
971  RE_Texture *mySelectionIDTex;
972  RE_Texture *mySelectionZTex;
973 
974  UT_UniquePtr<RE_Texture> myOutlineColorsTex;
975  UT_Vector4FArray myOutlineColorsArray;
976 
977  UT_UniquePtr<RE_OGLFramebuffer> myOutlineBitmaskFBO;
978  UT_UniquePtr<RE_Texture> myOutlineBitmaskTex;
979 
981  /// The composite FBO is used to write the final composite into textures
982  /// that we can use for post-processing such as slap comp.
983  /// It is only used when @c myComposite is set.
984  UT_UniquePtr<RE_OGLFramebuffer> myCompositeFBO;
985  UT_UniquePtr<RE_Texture> myCompositeColorTexture;
986  UT_UniquePtr<RE_Texture> myCompositeDepthTexture;
987 
988 #ifdef USE_VULKAN // WIP: make private, and make heleper func
989  // so access in DM_Viewport insn't needed
990 public:
992 
993 private:
994  // extra data for box picking
995  UT_UniquePtr<RV_Geometry> myBoxPickObjectGeometryVK;
996  UT_UniquePtr<RV_VKImage> myBoxPickMaskTextureVK;
997 
998  UT_UniquePtr<RV_ShaderVariableSet> myBoxPickSetVK;
999  UT_UniquePtr<RV_Framebuffer> myBoxPickFramebufferVK;
1000  UT_UniquePtr<RV_VKImage> myImageFallbackVK;
1001  UT_UniquePtr<RV_VKImage> myBoxPickDepthVK;
1002 
1003  UT_Array<GUI_DetailLook *> myRTLooks;
1004 #endif
1005  DM_RenderHighQuality *myHQRender;
1006  DM_PostEffects *myPostEffects;
1007 
1008  RE_Texture *myRandomDitherTexture;
1009  RE_TextureMap *myRandomDitherTextureMap;
1010 
1011  PXL_Lookup myLookup;
1012  UT_String myLUTFile;
1013  UT_String myOCIODisplay;
1014  exint myOCIOSerial;
1015 
1016  bool myIsBeautyPass;
1017  GR_LightingPass myLightingPass;
1018  bool myIsAlphaPass;
1019  bool myUseUnlitMask;
1020  bool myHighQualityMode;
1021  bool myNeedsXRayResolve;
1022  bool myHasGILight;
1023  bool myHasEnvLight;
1024  bool myHasCascadingShadowLight;
1025  bool myNeedsOverlayRender;
1026  uint64 myStandaloneFlag;
1027  int myStereoMode;
1028  GR_DecorationOverride myDecorationOverride;
1029  UT_StringHolder myDisplayedUVAttrib;
1030  bool myHasTransparencyPass = false;
1031  bool myHasAlphaBuffers = false;
1032 
1033  mutable RE_OGLFramebuffer *myDepthResolveFBO;
1034  mutable unsigned int myDepthResolveShaderFailed : 1,
1035  myZCompositeShaderFailed : 1;
1036 
1037  UT_UniquePtr<DM_FloorInterface> myFloorInterface;
1038  UT_IntArray mySetupLookShowSelection;
1039  bool myHasSelectionsShown;
1040  bool myDrawFloorTransientFlag;
1041  int myDecorLocateMask;
1042  int myDecorVisibleMask;
1043  int myGammaPass;
1044 
1045  RE_GPUTimer myBGTimer;
1046  RE_GPUTimer myFGTimer;
1047  RE_GPUTimer myGeoCleanupTimer;
1048  RE_GPUTimer myUnlitTimer;
1049 
1050  DM_ViewportType myType;
1051  int myRenderCount;
1052  RE_OGLContext myInitContext;
1053 
1054  UT_Array<GUI_DetailLookPtr> mySetupLooks;
1055  UT_Array<OBJ_Node *> mySetupObjects;
1056  UT_Array<GUI_DetailLook *> myUnlitLooks;
1057  UT_Array<GUI_DetailLook *> myXRayLooks;
1058  UT_Array<GUI_DetailLook *> myOnionSkinLooks;
1059  UT_Array<GUI_DetailLook *> myTransparentLooks;
1060  UT_Array<OBJ_Node *> myTransparentObjects;
1061 
1062  bool mySavedAntiAliasOption;
1063  UI_XPtr<GUI_SceneLook> mySceneLook;
1064  DM_SceneManager &mySceneManager;
1065  DM_Viewport *myDisplay;
1066  bool mySetupFlag;
1067 
1068  // Buffers for picking geometry.
1069  UT_UniquePtr<dm_PickBuffer> myPickBuffer;
1070  UT_TokenString *myPickBufferTestHash;
1071 
1072  // Extra data for box picking.
1073  RE_ShaderHandle myBoxPickObjectShader;
1074  RE_Geometry *myBoxPickObjectGeometry;
1075  RE_Texture *myBoxPickMaskTexture;
1076 
1077  // Buffers for snapping to components.
1078  UT_UniquePtr<dm_PickBuffer> mySnapHandleBuffer;
1079  UT_TokenString *mySnapHandleBufferTestHash;
1080 
1081  // General position/orientation snapping
1082  DM_SnapBuffer *mySnapBuffer;
1083  bool mySnapHasValidData;
1084 
1085  RE_LightList myGLLightList;
1086  UT_Array<RE_Light *> myNormalQualityLights;
1087 
1088  RE_OGLFramebuffer *myUnlitAlphaFBO;
1089  RE_Texture *myUnlitAlphaTexture;
1090  RE_Texture *myUnlitDepthTexture;
1091 
1092  static RE_ShaderHandle theBeautyCompShader;
1093  static RE_ShaderHandle theBeautyCompAAShader;
1094  static RE_ShaderHandle theBeautyCompHQAlpha4Shader;
1095  static RE_ShaderHandle theBeautyCompHQAlpha4AAShader;
1096  static RE_ShaderHandle theBeautyCompHQAlpha8Shader;
1097  static RE_ShaderHandle theBeautyCompHQAlpha8AAShader;
1098  static RE_ShaderHandle theBeautyCompHQAlpha16Shader;
1099  static RE_ShaderHandle theBeautyCompHQAlpha16AAShader;
1100  static RE_ShaderHandle theDepthCompShader;
1101  static RE_ShaderHandle theDepthComp4Shader;
1102  static RE_ShaderHandle theDepthComp8Shader;
1103  static RE_ShaderHandle theDepthComp16Shader;
1104  static RE_ShaderHandle theColorCorrectCompShader;
1105  static RE_ShaderHandle theAlphaFlatten4Shader;
1106  static RE_ShaderHandle theAlphaFlatten8Shader;
1107  static RE_ShaderHandle theAlphaFlatten16Shader;
1108  static RE_ShaderHandle theUnlitAlphaShader;
1109  static RE_ShaderHandle theUnlitDepthShader;
1110  static RE_ShaderHandle theXRayShader;
1111 
1112  int myDecorLocateRawPos[2];
1113  int myDecorLocatePos[2];
1114  RE_ShaderHandle mySampleDepthShader;
1115 
1116  RE_OGLFramebuffer *myHQTransparentFBO;
1117  RE_Texture *myHQTransparentColorTex;
1118  RE_Texture *myHQTransparentStencil;
1119  bool myHQTransparentHDR;
1120 
1121  UT_UniquePtr<RE_Geometry> myCubeGeo;
1122 
1123  RE_OGLFramebuffer *myCoincidentBuffer;
1124  RE_Texture *myCoincidentTexture;
1125  RE_OGLFramebuffer *myOverlappingUVBuffer;
1126 
1127  bool myRampUnitPushed;
1128 
1129  RE_RenderWait *myBeautyPassSync;
1130 
1131  RE_GPUTimer myPreRenderTimer;
1132  RE_GPUTimer myPostRenderTimer;
1133  RE_GPUTimer myXRayTimer;
1134  RE_GPUTimer myOnionSkinTimer;
1135  RE_GPUTimer myCompositeTimer;
1136  RE_GPUTimer myBGEnvMapTimer;
1137  RE_GPUTimer myDecorTimer;
1138  RE_GPUTimer myHandleTimer;
1139 
1140  bool myUseHQLighting;
1141  bool myHasPerLookPickPriority;
1142 
1143  DM_ViewportHooks *myViewportHooks;
1144  UT_IntArray myViewportConfig;
1145  UI_Value myRedrawNotify;
1146  int myCurrentObjectID;
1147 };
1148 #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