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 #endif
44 
45 class RE_RenderWait;
46 class RE_RenderContext;
47 class RV_Instance;
48 class RV_Render;
49 class RV_Framebuffer;
50 class RV_VKImage;
51 class UI_Event;
53 class OBJ_Ambient;
54 class GR_PickRecord;
55 class GR_Uniforms;
56 class GUI_DisplayOption;
57 class GUI_GeoRender;
58 class GUI_SceneLook;
59 class GUI_ViewState;
60 class DM_Detail;
61 class DM_FloorInterface;
62 class dm_PickBuffer;
63 class DM_PostEffects;
64 class DM_RenderHighQuality;
65 class DM_SceneManager;
66 class DM_SnapBuffer;
67 class DM_Viewport;
68 class DM_ViewportHooks;
69 class DM_VPortComposite;
70 class DM_RenderVulkan;
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_RenderContext r, int x, int y);
144 
145  /// render any transient overlay elements in the viewport
146  void overlayRender(RE_RenderContext r, int x, int y);
147 
148  /// render all handles present in the viewport
149  void renderHandles(RE_RenderContext 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  /// updates and returns the beauty LUT and gamma
183  void updateBeautyLUT(const GUI_DisplayOption &dopt,
184  bool &out_has_LUT,
185  PXL_Lookup *&out_LUT,
186  float &out_gamma);
187 
188  /// Returns the LUT for the beauty pass, if any.
189  PXL_Lookup *getBeautyLUT();
190 
191  UT_UniquePtr<TIL_Raster> getBeautyPassImage(RE_RenderContext r);
192  UT_UniquePtr<TIL_Raster> getBeautyPassDepthImage(RE_RenderContext r);
193  bool getBeautyPassHDR() const;
194  void setBeautyPassConsolidate(bool con);
195 
196  /// ensure all geometry is up to date before a redraw, and cleanup after
197  void preSetupGeometry(RE_Render *r);
198  void postCleanupGeometry(RE_Render *r);
199  void setupGeometry(RE_RenderContext r);
200  void cleanupGeometry(RE_RenderContext r);
201  void fastSetupGeometry(RE_RenderContext r);
202 
203  /// returns a single pick result from the x,y mouse coords. The pick buffer
204  /// must be rendered first. Returns false if nothing was picked.
205  bool singlePickObject(RE_Render *r, int x, int y,
207  const GR_ObjectPickFlags &pick_flags,
208  fpreal *depth,
209  const GUI_DetailList *geos);
210 
211  /// Check for a pick on a handle. Returns true if a handle was picked.
212  bool singlePickHandle(RE_RenderContext r, int x, int y,
214  fpreal *depth);
215 
216  /// @brief Area select objects, possibly with a matte.
217  /// returns a list of object IDs for those objects picked. This does not
218  /// pick handles or SOP geometry. The return value is the length of the pick
219  /// list.
220  int boxPickObject(RE_Render *r,
221  const UT_DimRect &area,
222  uint8 *texture,
223  UT_Array<GR_PickRecord> &pick_records,
224  bool visible_only,
225  bool wholy_contained,
226  const GUI_DetailList *geos);
227 
228  /// @brief Single select a geomerty element.
229  /// Returns a single pick result for components in objects 'geos'.
230  bool singlePickComponent(RE_Render *r,
231  int x, int y,
233  unsigned pickmask,
235  fpreal *depth,
236  const GUI_DetailList *geos,
237  bool enable_occlusion,
238  bool handle_pick_radius);
239  /// Box, lasso or paint select components.
240  /// @param contained only return results completely inside area
241  /// @param interactive if true, only return "visible" results, ignoring
242  /// primitives which rasterize to less than a single pixel.
243  int boxPickComponent(RE_Render *r,
244  const UT_DimRect &area,
245  uint8 *texture,
246  UT_Array<GR_PickRecord> &pick_records,
247  bool sort_records,
248  unsigned pickmask,
250  bool visible_only,
251  bool contained,
252  bool interactive,
253  const GUI_DetailList *geos);
254 
255  // Return the raw pick buffer textures that are used for visible
256  // component picking. These buffer may be used for picking or
257  // rendering purposes.
258  bool getComponentPickBuffers(UT_SharedPtr<RE_Texture> &pickhigh,
259  UT_SharedPtr<RE_Texture> &picklow,
261 
262  bool bindComponentPickBuffers(RE_RenderContext r,
264  bool bind_depth) const;
265 
266  // Return the objects that should be rendered into the pick buffer
267  // for an object level pick
268  void getObjectPickGeos( const GUI_DetailList *looks,
269  UT_Array<GUI_GeoRender *> &out_all_geos,
270  UT_Array<GUI_GeoRender *> &out_xray_geos,
271  UT_Array<GUI_GeoRender *> &out_xray_sec_geos);
272 
273  // Return the objects that should be rendered into the pick buffer
274  // for an component pick
275  void getComponentPickGeos(const GUI_DetailList *looks,
276  unsigned int xray_pickmask,
277  UT_Array<GUI_GeoRender *> &out_all_geos,
278  UT_Array<GUI_GeoRender *> &out_xray_geos);
279 
280  /// @brief Single select a geometry element to snap to.
281  /// Returns a single snap result for components in objects 'geos'.
282  bool singleSnapComponent(RE_Render *r,
283  int x, int y,
284  bool hide_selected, bool enable_occlusion,
285  bool do_current,
286  bool do_xray, bool do_guides,
287  bool extend_floor,
289  UT_Vector2i *result_offset,
290  UT_Array<GR_PickRecord> &near_results,
291  unsigned pickmask, int gravity,
293  const GUI_DetailList *geos=NULL);
294 
295  /// @brief Single select a peanut element to snap to.
296  /// Returns a single snap result for peanuts.
297  bool singleSnapPeanut(RE_Render *r,
298  int x, int y,
299  bool hide_selected, bool enable_occlusion,
300  bool do_xray, bool do_guides,
301  bool extend_floor,
303  UT_Vector2i *result_offset,
304  unsigned pickmask,
306  const GUI_DetailList *geos=NULL);
307 
308  // Currently only for scene graph view.
309  bool snapGeometry(RE_RenderContext r,
310  int x, int y,
311  int pnt_rad, int edge_rad, int face_rad,
312  bool occlusion,
313  bool orient_normals,
314  DM_SnapSelection snap_sel,
315  UT_Vector3D &p,
316  UT_Vector3D &n,
317  int64 serial);
318 
319  /// Call to manually invalidate any cached pick/snap buffers when the
320  /// automatic detection is insufficient.
321  void invalidatePickBuffers();
322 
323  /// Box, lasso or paint select components.
324  /// Render all geometry in the viewport using render mode 'render_type'.
325  GUI_RenderPassFlags renderGeometry(RE_RenderContext r,
326  GR_RenderMode render_type,
327  GR_ShadingPass shade_pass,
328  GR_AlphaPass apass,
329  OP_Bundle *visible_objs = NULL,
331 
332  /// @brief Draw geometry decorations and markers
333  /// Render all decorations. If 'hover_decorations' is true, only the
334  /// locate-style decorations will be drawn.
335  void renderDecorations(RE_RenderContext r,
336  GUI_DisplayOption *dispopt,
337  bool hover_decorations);
338 
339  /// @brief Render geometry corresponding to OP_Nodes or look IDs.
340  /// Exactly one of 'nodes' and 'look_ids' must be null, and
341  /// 'detail_indexes' corresponds to the geometry in the non-null
342  /// array.
343  GUI_RenderPassFlags renderSomeGeometry(
345  int x, int y,
346  const UT_Array<OP_Node*> *nodes,
347  const UT_IntArray *look_ids,
348  const UT_IntArray *detail_indexes,
349  GR_RenderMode render_type,
350  GR_ShadingPass shade_pass,
351  GR_AlphaPass apass,
352  bool do_geometry_setup);
353 
354  /// Render a single geometry using render mode 'render_type'.
355  GUI_RenderPassFlags renderSingleGeo(
357  GUI_GeoRender *gr,
358  GR_RenderMode render_type,
359  GR_ShadingPass shading_pass,
360  GR_AlphaPass ap,
361  bool init_lights,
362  bool treat_uv_viewport_as_3d = false,
364 
365  /// Our floor or construction plane.
366  void renderFloor(RE_RenderContext r, int x, int y);
367  /// Render construction plane in overlayRender.
368  void overlayRenderFloor(RE_RenderContext r, int x, int y);
369  /// Check if the floor still needs to be rendered and then clear it.
371  {
372  bool floor = myDrawFloorTransientFlag;
373  myDrawFloorTransientFlag = false;
374  return floor;
375  }
376 
377  const DM_FloorInterface *getFloorInterface() const
378  { return myFloorInterface.get(); }
379  DM_FloorInterface *getFloorInterface() { return myFloorInterface.get(); }
380 
381  /// Interface to viewport hooks (render and mouse)
382  DM_ViewportHooks &hooks() const { return *myViewportHooks; }
383 
384  bool needsOverlayRender() const
385  { return myNeedsOverlayRender; }
386 
387  bool hasAlphaPass() const { return myHasAlphaBuffers && myHasTransparencyPass; }
388 
389  /// Methods to process mouse movement
390  /// @{
391  bool hasLocates();
392  void handleLocateEvent(UI_Event *e);
393  /// @}
394 
395  /// @brief Access displayed objects in the viewport
396  /// Return a handle to an object displayed in the viewport. Do not cache
397  /// these over several redraws, as they may become invalid. get*Object()'s
398  /// index parameter can be 0 to getNum*Objects()-1.
399  /// @{
400  int getNumOpaqueObjects() const;
401  DM_GeoDetail getOpaqueObject(int index) const;
402 
403  int getNumTransparentObjects() const;
404  DM_GeoDetail getTransparentObject(int index) const;
405 
406  int getNumUnlitObjects() const;
407  DM_GeoDetail getUnlitObject(int index) const;
408 
409  int getNumXRayObjects() const;
410  DM_GeoDetail getXRayObject(int index) const;
411  /// @}
412 
413  /// Returns the current detail within the object, when at SOP/POP/DOP level.
414  DM_GeoDetail getCurrentDetail() const;
415 
416  void initGPUTimers(RE_Render *r);
417  void collectGPUTimers(RE_Render *r);
418 
419  GUI_RotoView getRotoViewType();
420 
421  void markGeoSetup(bool setup,
422  DM_Viewport *setup_port = NULL);
423  bool isGeoSetup() const { return mySetupFlag; }
424 
425  // All lights in the scene, for the material render codepath.
426  void setGlobalLightArray(const UT_Array<OBJ_Ambient *> &l);
427  void setGlobalLightArray(const UT_ValArray<RE_Light*> &l);
428 
429  // Get and set lighting information.
430  bool setupLights(RE_RenderContext r, GUI_DisplayOption *opt);
431  void cleanupLights();
432 
433  GR_LightingPass getLightingPass() const { return myLightingPass; }
434  void setLightingPass(GR_LightingPass p) { myLightingPass=p;}
435 
436  // Returns the approximate memory usage of the viewport at the current size
437  // given hdr on/off, high quality lighting on/off, transparency > low,
438  // and aa at 1,2,4 or 8x.
439  int64 getFramebufferUsageKB(bool hdr, bool hql, bool trans,
440  int aa);
441 
442  // using zt[0] / (Z + zt[1]) will transform zbuffer values into viewspace Z
443  // If light is specified, then the shadowmap range of that light is computed
444  void getZBufferTransform(float zt[2],RE_Light *light=NULL,
445  bool reverse_depth = false);
446 
447  // Handle a change in which geometry is displayed.
448  // For keeping track of what type of UVs to show in UV mode.
449  void handleNewGeometryEvent(UI_Event *e);
450  void updateAttributeOptions(const GU_DetailHandle &gdh);
451 
452  // ---------------------------------------------------------------------
453  // the following methods should be treated as private to DM.
454 
455  /// Methods for starting and stopping events
456  /// in the old performance monitor.
457  void startPerfMonTimer(RE_RenderContext r,
458  RE_GPUTimer &timer,
459  const char *msg) const;
460  void stopPerfMonTimer(RE_RenderContext r,
461  RE_GPUTimer &timer) const;
462 
463  // setup proper winding and culling, returning a set of flags to use for
464  // the cleanup method.
465  int setupBackfaceAndWinding(RE_Render *r,
466  const GUI_DisplayOption *opts);
467  void cleanupBackfaceAndWinding(RE_Render *r,
468  int setup_flags);
469 
470  // resolve the AA Z buffer to a single sample, taking the further sample
471  bool resolveDepthBuffer(RE_Render *r,
472  RE_Texture *aa_depth_tex,
473  RE_Texture *depth_tex) const;
474 
475  int64 getSceneVersion(fpreal t, bool shadow, bool &timedep);
476 
477  // access to parent viewport
478  const DM_Viewport *getDisplay() const { return myDisplay; }
479  DM_Viewport *getDisplay() { return myDisplay; }
480 
481  // for transparency
482  int getTransparencyLayers(RE_RenderContext r,
483  const GUI_DisplayOption *disp);
484  void prepareStencilRouting(RE_RenderContext r,int nsamples);
485  void prepareABufferFront(RE_RenderContext r, int nsamples);
486 
487  void updateTimeDependentLook(fpreal t);
488 
489  bool isToolbarLinked() const; // see .C file note
490 
491  const GUI_DetailPtrList &getDetails() const;
492  const GUI_DetailPtrList &getDetails();
493 
494  void setupViewUniforms(RE_RenderContext rc);
495  void cleanupViewUniforms(RE_RenderContext rc);
496  void setupViewUniformsGL(RE_Render *r);
497  void cleanupViewUniformsGL(RE_Render *r);
498  void setupDrawableCamera(GUI_ViewParameter &view);
499 
500  // equivalent to calling `getLook()->setView()` with extra work for VK compatibility
501  void setupView(GUI_ViewState::GUI_ViewType vt,
502  RE_RenderContext rc,
503  int x, int y, int w, int h);
504 
505  // Helper methods to determine if a GUI_DetailLook, or OBJ_Node, should be
506  // hidden as a view cam object when hiding view cam geometry.
507  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
508  const GUI_DetailLook &look);
509  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
510  const OBJ_Node &node);
511 
512  // For DM_RenderHighQuality.
513  bool needsToDrawFloor() const
514  { return myDrawFloorTransientFlag; }
515  void initFogVolume(RE_Render *r,
516  DM_Viewport *vport,
517  GUI_FogMode fog,
518  const RE_Texture *zdepth) const;
519  RE_Texture *getFogVolumeTexture() const;
520  RE_Texture *getRandomDitherTexture(RE_Render *r);
521 
522  const DM_SceneManager &modeler() const
523  { return mySceneManager; }
524 
525  void renderBackgroundImage(RE_RenderContext r);
526  void renderForegroundImage(RE_RenderContext r);
527 
528  void resolveBeautyColorPass(RE_Render *r,
529  RE_Texture *aa_color,
530  RE_Texture *aa_depth,
531  RE_Texture *aa_nml,
532  bool xray) const;
533 
534  // If true, render to VK images rather than GL-interop VK images.
535  void renderToVulkanImages();
536 
537  void renderVulkan(RE_RenderContext r, UT_Vector2i res);
538 
539  // These only work for Vulkan images (if the above is set to true).
540  UT_UniquePtr<PXL_Raster> extractColorImage(RE_RenderContext r);
541  UT_UniquePtr<PXL_Raster> extractDepthImage(RE_RenderContext r);
542 
544  { return myDisplayAsSubdiv; }
545 
546 #ifdef VULKAN_PRESENTATION
547  // Swapchain
548  bool presentColorImage(RE_RenderContext r, RV_VKSwapchain* sc);
549 #endif
550 
551 #ifdef USE_VULKAN
552  // Ray tracing
553  const UT_Array<GUI_DetailLook *> &getRTLooks();
554 
555 
556  static bool initShaders(RV_Instance* inst);
557  static void cleanupShaders();
558 #endif
559 
560  DM_VPortComposite *getComposite() { return myComposite.get(); }
561  void setComposite(UT_UniquePtr<DM_VPortComposite> composite);
562 
563 #ifdef USE_VULKAN
564  DM_RenderVulkan *vkRender() { return myVKRender.get(); }
565 #endif
566 
567  exint getFramebufferMemory() const;
568 
569 protected:
570  friend class dm_SetupTask;
571 
572 private:
573 
574  RE_RenderContext getVulkanContext(RE_Render *r, int thread_index=0) const;
575 
576  DM_SceneManager &modeler()
577  { return mySceneManager; }
578 
579  const GUI_SceneLook *getLook() const { return mySceneLook.get(); }
580  GUI_SceneLook *getLook() { return mySceneLook.get(); }
581 
582  bool shouldDisplayObject(const DM_Viewport &vport,
583  const GUI_DetailLook *look,
584  OBJ_Node *node);
585 
586  bool shouldVisualizeObject(const DM_Viewport &vport,
587  const GUI_DetailLook *look,
588  OBJ_Node *node);
589 
590  bool shouldShowComponentSelections(const GUI_DetailLook &look,
591  const GUI_DisplayOption &d) const;
592 
593  enum DM_BufferBlend
594  {
595  ACCUM_ADD,
596  ACCUM_REPLACE,
597  ACCUM_ALPHA_BLEND
598  };
599 
600  // prints a message in the viewer (centrally justified) on a given line
601  void renderMessage( RE_RenderContext ren, int x, int y,
602  const char* msg, int line );
603  // renders true viewer name
604  void doRenderCurrentName(RE_RenderContext r, int x, int y);
605  // renders the snapshot label
606  void doRenderSnapshotName(RE_RenderContext r, int x, int y);
607 
608  // prints a message in the viewer for camera (central, bottom justified)
609  void renderCameraMessage( RE_RenderContext ren, int x, int y,
610  const char* msg);
611 
612  // Render a mask over the parts of the viewport outside of the view
613  // subregion.
614  void renderViewMask(RE_RenderContext r, int x, int y);
615 
616  bool resizeBeautyPassBuffer(RE_RenderContext r,
617  int width, int height,
618  bool hdr, bool needs_aa);
619  void destroyBeautyPassBuffer();
620  RE_OGLFramebuffer *getBeautyPassBuffer(bool allow_aa);
621 
622  // initializes the view and projection to a 1:1 pixel transform.
623  void pushIdentityOrthoView(RE_Render *r);
624  void popIdentityOrthoView(RE_Render *r);
625 
626  // Render the viewport name.
627  void doRenderName(RE_RenderContext r, int x, int y,
628  bool snapshot_name = false);
629  // Render the current state information.
630  void doRenderStateStatus(RE_RenderContext r);
631  // Render a mask over the parts of the viewport outside of the view
632  // subregion.
633  void doRenderViewMask(RE_RenderContext r, int x, int y);
634 
635  // Draw the view overview gadget.
636  void doRenderViewOverview(RE_RenderContext r, int x, int y);
637 
638  // Common utility methods to setup lights and the z buffer.
639  void setupForRender(RE_RenderContext ren,
640  bool allow_smooth = true);
641  void cleanupAfterRender(RE_RenderContext ren);
642 
643 
644  void setGammaPass(bool b) { myGammaPass = b?1:0; }
645 
646  void doRenderNoHookUnlitObjects(RE_RenderContext r,
647  int x, int y,
648  bool xray_pass);
649  void doRenderUnlitObjects(RE_RenderContext r, int x, int y);
650 
651  // Render the camera's mask (bars and anything else inside the mask)
652  void doRenderMask(RE_RenderContext r, int, int);
653 
654  // Render outlines
655  void doRenderOutlines(RE_RenderContext r);
656  // Render separate outlines for objects that have them
657  void doRenderSeparateOutline(RE_RenderContext r,
658  const UT_IntArray &indices);
659  void destroySelectionBuffer();
660 
661  void startBeautyPass(RE_RenderContext r,
662  bool allow_aa=true);
663  void endBeautyPass(RE_RenderContext r, bool allow_aa=true);
664  bool isBeautyPassAA(bool allow_aa = true);
665  bool isHeadlightRender(RE_RenderContext r);
666 
667  // helper methods for setting up stereo passes
668  void setupStereo3d(RE_RenderContext r);
669  void setupStereoVR();
670  void cleanupStereo3d(RE_RenderContext r);
671  void interruptStereo(RE_RenderContext r);
672  void resumeStereo(RE_RenderContext r);
673  void setupStereo3dForLeftCamera(RE_RenderContext r,
674  bool uniforms_for_3d);
675  void setupStereo3dForRightCamera(RE_RenderContext r,
676  bool uniforms_for_3d);
677  void updateStereoViewUniforms(RE_RenderContext r, bool left);
678  void assignStereoLeft(RE_RenderContext r,
679  const GUI_ViewState::GUI_ViewType vt);
680  void assignStereoRight(RE_RenderContext r,
681  const GUI_ViewState::GUI_ViewType vt);
682  void assignStereoTop(RE_RenderContext r,
683  const GUI_ViewState::GUI_ViewType vt);
684  void assignStereoBottom(RE_RenderContext r,
685  const GUI_ViewState::GUI_ViewType vt);
686 
687  bool setupTransparentBuffers(RE_RenderContext r, int hdr);
688  void destroyTransparentBuffers();
689 
690  /// Setup framebuffer object for storing the result of composite passes.
691  /// @param use_color_buffer_for_depth if true, attach a second color buffer
692  /// for storing depth instead of a depth buffer.
693  /// @see compositePasses
694  bool setupCompositeBuffers(RE_RenderContext r,
695  bool use_color_buffer_for_depth);
696  /// Destroy composite FBO and related textures.
697  void destroyCompositeBuffers();
698 
699  void renderViewport(RE_RenderContext r, int x, int y);
700  void renderSceneView(RE_RenderContext r, int x, int y);
701 
702  // Render the transparent bars defined by the camera's mask parameters
703  void renderCameraMask(RE_RenderContext r);
704 
705  // Render the object that goes on top of the camera mask
706  void renderCameraMaskOverlay(RE_RenderContext r, int, int);
707 
708  void renderTransparentGeometry(
710  GUI_DisplayOption *dispopt,
711  bool headlight);
712  bool renderHQTransparencyPass(
713  RE_RenderContext r, int x, int y,
714  GUI_DisplayOption *dispopt,
715  const UT_Array<GUI_DetailLook *> *geos = NULL,
716  bool for_xray = false);
717  bool setupHQTransparentBuffers(
718  RE_RenderContext r, int nsamples,
719  bool hdr);
720  void destroyHQTransparentBuffers();
721 
722  void initStencilABuffer(RE_RenderContext r, int nsamples);
723 
724  bool setupUnlitAlphaBuffer(RE_RenderContext r, bool zbuf);
725  void destroyUnlitAlphaBuffer();
726 
727  // Geometry pick code
728  bool createPickBuffer(RE_RenderContext r);
729  bool renderPickBuffer(RE_RenderContext r,
730  bool object_pick,
731  bool enable_occlusion,
732  unsigned int pickmask,
734  const GUI_DetailList *geos,
735  const GR_ObjectPickFlags &pick_flags);
736 
737  // Query the pick buffer. Returns true on a hit.
738  // allow_geo - allow geometry picks (either obj or component
739  // depending on geo_is_object)
740  // allow_handle - allow handle picks
741  // geo_is_object - geometry records are objects instead of
742  // components
743  // geo_ignore_depth - avoid scanning samples looking for a closer
744  // hit (only when !geo_is_object)
745  // geo_prioritize - scan samples looking for a higher priority
746  // component pick (only when !geo_is_object)
747  // floor_prioritize - scan samples looking for a higher priority
748  // floor component pick (only when allow_handle
749  // and does not differentiate between different
750  // floors)
751  // overlap_dist - the distance at which to consider picks to
752  // be essentially overlapping and employ some
753  // heuristics to pick the best one
754  bool pickFromBuffer(RE_RenderContext r,
755  RE_PickBuffer *pick_buffer,
756  int x, int y,
757  bool allow_geo,
758  bool allow_handle,
759  bool geo_is_object,
760  bool geo_ignore_depth,
761  bool geo_prioritize,
762  bool floor_prioritize,
763  int pick_dist,
764  int overlap_dist,
766  UT_Array<GR_PickRecord> *results,
767  UT_Vector2i *result_offset,
768  fpreal *depth,
769  const GUI_DetailList *geos);
770 
771  int filterPickData(int32 *pick_base_data,
772  int32 *pick_component_data,
773  int npicks,
774  UT_Array<GR_PickRecord> &pick_records);
775  int subtractPickData(const UT_Vector3iArray &base,
776  const UT_Vector3iArray &comp,
777  const UT_Array<GR_PickRecord> &outside,
778  UT_Array<GR_PickRecord> &results);
779  void objectPickRender(RE_RenderContext r,
780  unsigned int pickmask,
782  const GUI_DetailList *geos,
783  const GR_ObjectPickFlags &pick_flags);
784  void doObjectBoxPick(RE_RenderContext r,
785  const UT_DimRect &area,
786  UT_Array<GR_PickRecord> &pick_records,
787  bool visible_only,
788  bool invert_mask,
789  bool use_texture,
790  bool clip_edges,
791  const GUI_DetailList *geos);
792 
793  int componentPickRender(RE_RenderContext r,
794  unsigned int pickmask,
795  unsigned int xray_pickmask,
797  const GUI_DetailList *geos,
798  GR_PickStyle pickstyle,
799  bool invert_mask,
800  UT_Array<GR_PickRecord> *pick_rec);
801  int boxPickVisibleComponent(RE_RenderContext r,
802  const UT_DimRect &area,
803  uint8 *texture,
804  UT_Array<GR_PickRecord> &pick_records,
805  unsigned pickmask,
807  const GUI_DetailList *geos,
808  bool contained);
809  int boxPickFrustumComponent(RE_RenderContext r,
810  const UT_DimRect &area,
811  uint8 *texture,
812  UT_Array<GR_PickRecord> &pick_records,
813  unsigned pickmask,
815  const GUI_DetailList *geos,
816  bool visible_only,
817  bool contained);
818 
819 #ifdef USE_VULKAN
820  // helper function called by boxPickObject
821  int boxPickObjectVK(RE_RenderContext r,
822  const UT_DimRect &area,
823  uint8 *texture,
824  UT_Array<GR_PickRecord> &pick_records,
825  bool visible_only,
826  bool wholy_contained,
827  const GUI_DetailList *geos);
828 
829  void doObjectBoxPickVK(RE_RenderContext r,
830  const UT_DimRect &area,
831  UT_Array<GR_PickRecord> &pick_records,
832  bool visible_only,
833  bool invert_mask,
834  bool use_texture,
835  bool clip_edges,
836  const GUI_DetailList *geos);
837 
838  void doPickBufferRenderVK(RE_RenderContext r,
839  bool object_pick,
840  bool enable_occlusion,
841  unsigned int pickmask,
843  const GUI_DetailList *geos,
844  const GR_ObjectPickFlags &pick_flags);
845 
846  void doSnapBufferRenderVK(RE_RenderContext r,
847  unsigned int snapmask,
848  unsigned int xray_snapmask,
850  const GUI_DetailList *geos,
851  bool hide_selected,
852  bool enable_occlusion,
853  bool do_current,
854  bool do_guides,
855  bool extend_floor);
856 
857  void objectPickRenderVK(RE_RenderContext r,
858  unsigned int pickmask,
860  const GUI_DetailList *geos,
861  const GR_ObjectPickFlags &pick_flags);
862 
863  int componentPickRenderVK(RE_RenderContext r,
864  unsigned int pickmask,
865  unsigned int xray_pickmask,
867  const GUI_DetailList *geos,
868  GR_PickStyle pickstyle,
869  bool invert_mask,
870  bool has_pick_map,
871  UT_Array<GR_PickRecord> *pick_rec);
872 
873  int boxPickFrustumComponentVK(RE_RenderContext r,
874  const UT_DimRect &area,
875  uint8 *texture,
876  UT_Array<GR_PickRecord> &pick_records,
877  unsigned pickmask,
879  const GUI_DetailList *geos,
880  bool visible_only,
881  bool contained);
882 
883  void renderOffsetDepthPassVK(RE_RenderContext r,
884  bool skip_obj_sel_looks,
885  bool skip_guide_looks,
886  bool skip_nonsnappable_looks,
887  bool skip_current_look);
888 
889 #endif
890  void renderOffsetDepthPass(RE_RenderContext r,
891  bool skip_obj_sel_looks = false,
892  bool skip_guide_looks = false,
893  bool skip_nonsnappable_looks = false,
894  bool skip_current_look = false);
895  void flattenAlphaPass(RE_RenderContext r,
896  const GUI_DisplayOption *dispopt,
897  int num_layers);
898  // end pick code
899 
900  // Snapping and handle pick code
901  bool createSnapHandleBuffer(RE_RenderContext r);
902  bool renderHandleBuffer(RE_RenderContext r);
903  bool renderSnapBuffer(RE_RenderContext r,
904  unsigned int snapmask,
906  const GUI_DetailList *geos,
907  bool hide_selected,
908  bool enable_occlusion,
909  bool do_current,
910  bool do_xray, bool do_guides,
911  bool extend_floor);
912  // end snapping and handle pick code
913 
914  bool sampleDepth(RE_Render *r, int x, int y, fpreal &z,
915  RE_Texture *depth_texture);
916 
917  bool sampleDepth(RE_RenderContext r, int x, int y, fpreal &z,
918  RV_VKImage *depth_texture);
919 
920  void renderXray(RE_RenderContext r,
921  GUI_DisplayOption *dispopts);
922  void resolveXrayBeautyPass(RE_RenderContext r) const;
923  void renderOnionSkin(RE_RenderContext r,
924  GUI_DisplayOption *dispopts);
925 
926  bool renderBeautyPass(RE_RenderContext r, int x, int y,
927  GUI_DisplayOption *dispopt,
928  bool &needs_lighting);
929  bool renderTransparencyPass(RE_RenderContext r,
930  int x, int y,
931  GUI_DisplayOption *dispopt);
932  bool renderEnvironmentMaps(RE_RenderContext r,
933  bool query_only);
934  void renderEnvMap(RE_RenderContext r,
935  RE_OGLTexture *cubemap,
936  int cubemap_unit) const;
937  void compositePasses(RE_RenderContext r,
938  const GUI_DisplayOption *dispopt,
939  bool skip_postprocessing = false);
940 
941  void normalQualityRender(
943  GUI_DisplayOption *dispopt,
944  GR_AlphaPass alpha_pass,
946  const UT_Array<GUI_DetailLook*> *geos=NULL);
947 
948  bool isUsingHQLighting(RE_RenderContext r,
949  const GUI_DisplayOption *dispopt);
950 
951  void renderOverlappingUV(RE_RenderContext r,
952  GUI_DisplayOption *disp);
953  bool setupOverlappingUVBuffer(RE_RenderContext r,
954  int w, int h);
955  void destroyOverlappingUVBuffer();
956 
957  void renderCoincidentPoints(RE_RenderContext r,
958  GUI_DisplayOption *disp);
959  bool setupCoincidentBuffer(RE_Render *r, int w, int h);
960  void destroyCoincidentBuffer();
961 
962  void subtractFromSelection(UT_Array<GR_PickRecord> &results,
964  exint start_subtracting_at,
966 #ifdef MBSD_COCOA
967  void dmOSXDepthBufferWorkaround(RE_Render *r,
968  RE_Texture *tex);
969 #endif
970  void updateVisibleBoundariesAndViews(int vis_display_sets);
971 
972  void redrawNeeded(UI_Event *);
973 
974  mutable RE_ShaderHandle *myDepthResolveShader;
975 
976  RE_OGLFramebuffer *myBeautyPassBuffer;
977  RE_OGLFramebuffer *myBeautyPassAABuffer;
978  RE_Texture *myBeautyColorTexture;
979  RE_Texture *myBeautyDepthTexture;
980  RE_Texture *myBeautyPassAACTexture;
981  RE_Texture *myBeautyPassAAZTexture;
982  int myBeautyPassSamples;
983  bool myBeautyPassHDR;
984 
985  RE_OGLFramebuffer *myTransparentFBO;
986  RE_Texture *myTransparentColorTex;
987  RE_Texture *myTransparentZTex;
988  bool myTransparentHDR;
989 
990  RE_OGLFramebuffer *mySelectionIDFBO;
991  RE_Texture *mySelectionIDTex;
992  RE_Texture *mySelectionZTex;
993 
994  UT_UniquePtr<RE_Texture> myOutlineColorsTex;
995  UT_Vector4FArray myOutlineColorsArray;
996 
997  UT_UniquePtr<RE_OGLFramebuffer> myOutlineBitmaskFBO;
998  UT_UniquePtr<RE_Texture> myOutlineBitmaskTex;
999 
1000  UT_UniquePtr<DM_VPortComposite> myComposite;
1001  /// The composite FBO is used to write the final composite into textures
1002  /// that we can use for post-processing such as slap comp.
1003  /// It is only used when @c myComposite is set.
1004  UT_UniquePtr<RE_OGLFramebuffer> myCompositeFBO;
1005  UT_UniquePtr<RE_Texture> myCompositeColorTexture;
1006  UT_UniquePtr<RE_Texture> myCompositeDepthTexture;
1007 
1008 #ifdef USE_VULKAN // WIP: make private, and make heleper func
1009  // so access in DM_Viewport insn't needed
1010 public:
1011  UT_UniquePtr<DM_RenderVulkan> myVKRender;
1012  UT_UniquePtr<DM_Detail> myCameraMaskOverlayDetail;
1013 
1014  DM_PostEffects &getPostEffects() { return *myPostEffects; }
1015 private:
1016  // extra data for box picking
1017  UT_UniquePtr<RV_Geometry> myBoxPickObjectGeometryVK;
1018  UT_UniquePtr<RV_VKImage> myBoxPickMaskTextureVK;
1019 
1020  UT_UniquePtr<RV_ShaderVariableSet> myBoxPickSetVK;
1021  UT_UniquePtr<RV_Framebuffer> myBoxPickFramebufferVK;
1022  UT_UniquePtr<RV_VKImage> myImageFallbackVK;
1023  UT_UniquePtr<RV_VKImage> myBoxPickDepthVK;
1024 
1025  UT_Array<GUI_DetailLook *> myRTLooks;
1026 #endif
1027  DM_RenderHighQuality *myHQRender;
1028  DM_PostEffects *myPostEffects;
1029 
1030  RE_Texture *myRandomDitherTexture;
1031  RE_TextureMap *myRandomDitherTextureMap;
1032 
1033  PXL_Lookup myLookup;
1034  UT_String myLUTFile;
1035  UT_String myOCIODisplay;
1036  exint myOCIOSerial;
1037 
1038  bool myIsBeautyPass;
1039  GR_LightingPass myLightingPass;
1040  bool myIsAlphaPass;
1041  bool myUseUnlitMask;
1042  bool myHighQualityMode;
1043  bool myNeedsXRayResolve;
1044  bool myHasGILight;
1045  bool myHasEnvLight;
1046  bool myHasCascadingShadowLight;
1047  bool myNeedsOverlayRender;
1048  uint64 myStandaloneFlag;
1049  int myStereoMode;
1050  GR_DecorationOverride myDecorationOverride;
1051  UT_StringHolder myDisplayedUVAttrib;
1052  bool myHasTransparencyPass = false;
1053  bool myHasAlphaBuffers = false;
1054 
1055  mutable RE_OGLFramebuffer *myDepthResolveFBO;
1056  mutable unsigned int myDepthResolveShaderFailed : 1,
1057  myZCompositeShaderFailed : 1;
1058 
1059  UT_UniquePtr<DM_FloorInterface> myFloorInterface;
1060  UT_IntArray mySetupLookShowSelection;
1061  bool myHasSelectionsShown;
1062  bool myDrawFloorTransientFlag;
1063  int myDecorLocateMask;
1064  int myDecorVisibleMask;
1065  int myGammaPass;
1066 
1067  RE_GPUTimer myBGTimer;
1068  RE_GPUTimer myFGTimer;
1069  RE_GPUTimer myGeoCleanupTimer;
1070  RE_GPUTimer myUnlitTimer;
1071 
1072  DM_ViewportType myType;
1073  int myRenderCount;
1074  RE_OGLContext myInitContext;
1075 
1076  UT_Array<GUI_DetailLookPtr> mySetupLooks;
1077  UT_Array<OBJ_Node *> mySetupObjects;
1078  UT_Array<GUI_DetailLook *> myUnlitLooks;
1079  UT_Array<GUI_DetailLook *> myXRayLooks;
1080  UT_Array<GUI_DetailLook *> myOnionSkinLooks;
1081  UT_Array<GUI_DetailLook *> myTransparentLooks;
1082  UT_Array<OBJ_Node *> myTransparentObjects;
1083 
1084  bool mySavedAntiAliasOption;
1085  UI_XPtr<GUI_SceneLook> mySceneLook;
1086  DM_SceneManager &mySceneManager;
1087  DM_Viewport *myDisplay;
1088  bool mySetupFlag;
1089 
1090  // Buffers for picking geometry.
1091  UT_UniquePtr<dm_PickBuffer> myPickBuffer;
1092  UT_TokenString *myPickBufferTestHash;
1093 
1094  // Extra data for box picking.
1095  RE_ShaderHandle myBoxPickObjectShader;
1096  RE_Geometry *myBoxPickObjectGeometry;
1097  RE_Texture *myBoxPickMaskTexture;
1098 
1099  // Buffers for snapping to components.
1100  UT_UniquePtr<dm_PickBuffer> mySnapHandleBuffer;
1101  UT_TokenString *mySnapHandleBufferTestHash;
1102 
1103  // General position/orientation snapping
1104  DM_SnapBuffer *mySnapBuffer;
1105  bool mySnapHasValidData;
1106 
1107  RE_OGLFramebuffer *myUnlitAlphaFBO;
1108  RE_Texture *myUnlitAlphaTexture;
1109  RE_Texture *myUnlitDepthTexture;
1110 
1111  static RE_ShaderHandle theBeautyCompShader;
1112  static RE_ShaderHandle theBeautyCompAAShader;
1113  static RE_ShaderHandle theBeautyCompHQAlpha4Shader;
1114  static RE_ShaderHandle theBeautyCompHQAlpha4AAShader;
1115  static RE_ShaderHandle theBeautyCompHQAlpha8Shader;
1116  static RE_ShaderHandle theBeautyCompHQAlpha8AAShader;
1117  static RE_ShaderHandle theBeautyCompHQAlpha16Shader;
1118  static RE_ShaderHandle theBeautyCompHQAlpha16AAShader;
1119  static RE_ShaderHandle theDepthCompShader;
1120  static RE_ShaderHandle theDepthComp4Shader;
1121  static RE_ShaderHandle theDepthComp8Shader;
1122  static RE_ShaderHandle theDepthComp16Shader;
1123  static RE_ShaderHandle theColorCorrectCompShader;
1124  static RE_ShaderHandle theAlphaFlatten4Shader;
1125  static RE_ShaderHandle theAlphaFlatten8Shader;
1126  static RE_ShaderHandle theAlphaFlatten16Shader;
1127  static RE_ShaderHandle theUnlitAlphaShader;
1128  static RE_ShaderHandle theUnlitDepthShader;
1129  static RE_ShaderHandle theXRayShader;
1130 
1131  int myDecorLocateRawPos[2];
1132  int myDecorLocatePos[2];
1133  RE_ShaderHandle mySampleDepthShader;
1134 
1135  RE_OGLFramebuffer *myHQTransparentFBO;
1136  RE_Texture *myHQTransparentColorTex;
1137  RE_Texture *myHQTransparentStencil;
1138  bool myHQTransparentHDR;
1139 
1140  UT_UniquePtr<RE_Geometry> myCubeGeo;
1141 
1142  RE_OGLFramebuffer *myCoincidentBuffer;
1143  RE_Texture *myCoincidentTexture;
1144  RE_OGLFramebuffer *myOverlappingUVBuffer;
1145 
1146  UT_UniquePtr<RV_Framebuffer> myCoincidentBufferVK;
1147  UT_UniquePtr<RV_VKImage> myCoincidentTextureVK;
1148  UT_UniquePtr<RV_Framebuffer> myUVOverlapBufferVK;
1149  UT_UniquePtr<RV_VKImage> myUVOverlapTextureVK;
1150  UT_UniquePtr<RV_VKImage> myUVOverlapDepthStencilVK;
1151 
1152  bool myRampUnitPushed;
1153 
1154  RE_RenderWait *myBeautyPassSync;
1155 
1156  RE_GPUTimer myPreRenderTimer;
1157  RE_GPUTimer myPostRenderTimer;
1158  RE_GPUTimer myXRayTimer;
1159  RE_GPUTimer myOnionSkinTimer;
1160  RE_GPUTimer myCompositeTimer;
1161  RE_GPUTimer myBGEnvMapTimer;
1162  RE_GPUTimer myDecorTimer;
1163  RE_GPUTimer myHandleTimer;
1164 
1165  bool myUseHQLighting;
1166  bool myHasPerLookPickPriority;
1167 
1168  DM_ViewportHooks *myViewportHooks;
1169  UT_IntArray myViewportConfig;
1170  UI_Value myRedrawNotify;
1171  int myCurrentObjectID;
1172 
1173  UT_UniquePtr<PY_EvaluationContext> myPyContextUpdateDrawableCamera;
1174  bool myPyUpdateDrawableCameraInit = false;
1175 
1176  bool myDisplayAsSubdiv = false;
1177 };
1178 #endif
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
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:224
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
**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:125
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:134
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:144
constexpr auto set(type rhs) -> int
Definition: core.h:610
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:50
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...
bool hasAlphaPass() const
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:283
GLuint index
Definition: glcorearb.h:786
DM_GeoSortMode
Definition: DM_Defines.h:150
GR_LightingPass
Definition: GR_Defines.h:151
bool isDisplayAsSubdiv()
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:956
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:257