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;
52 class OBJ_Ambient;
53 class GR_PickRecord;
54 class GR_Uniforms;
55 class GUI_DisplayOption;
56 class GUI_GeoRender;
57 class GUI_SceneLook;
58 class GUI_ViewState;
59 class DM_FloorInterface;
60 class dm_PickBuffer;
61 class DM_PostEffects;
62 class DM_RenderHighQuality;
63 class DM_SceneManager;
64 class DM_SnapBuffer;
65 class DM_Viewport;
66 class DM_ViewportHooks;
67 class DM_VPortComposite;
68 
69 #ifdef USE_VULKAN
70 class DM_RenderVulkan;
71 #endif
72 
74 {
75 public:
76  DM_VPortAgent(DM_SceneManager &app,
77  DM_Viewport *display,
78  GUI_ViewState *view,
80  ~DM_VPortAgent() override;
81 
82  /// Each viewport has a unique integer id used to differentiate them.
83  int getUniqueId() const;
84 
85  /// Compute bounding box of the scene.
86  int getBoundingBox(UT_BoundingBox &bbox,
87  const UT_Matrix3R *rot,
88  bool non_templated_only,
89  bool skip_view_cam,
90  const DM_Viewport &viewport) const;
91 
92  /// Called by DM_Viewport to initialize and retire the viewport agent
93  /// when opening and closing. Treat as private.
94  void setupViewport();
95  void cleanupViewport();
96 
97  void refresh() const;
98 
99  /// The projection type of this viewport
100  DM_ViewportType getViewType() const { return myType; }
101 
102  /// For ortho viewports, the projection type (top, front, right, etc)
103  GUI_ViewParameter::axis getHomeAxis() const;
104 
105  /// Projection type, ortho or perspective
106  int isOrtho() const;
107 
108  /// Returns true if user interaction is occuring (drag, tumble, XCF).
109  bool isActiveRender() const;
110 
111  /// Returns true if this is rendering LOPs, and false if Obj,SOPs or DOPs.
112  bool isLopsView() const;
113 
114  /// The view state contains transform, projection and display options
115  const GUI_ViewState &getViewStateRef() const;
116  GUI_ViewState &getViewStateRef();
117 
118  /// Given a look id, and possibly a GUI_DetailList, find the GUI_DetailLook
119  /// with the supplied id.
120  GUI_DetailLookPtr getDetailLook(int look_id, const GUI_DetailList *geos);
121  GUI_DetailLookPtr getDetailLook(int node_id) const;
122  GUI_DetailLookPtr getDetailLookByIndex(int index) const;
123 
124  /// Fetch the detail of the current SOP or POP
125  const GUI_DetailLook*currentDetail() const;
126  GUI_DetailLook *currentDetail();
127 
128  // Return the op node the viewport is looking through (camera or light)
129  OP_Node *currentCamera() const;
130 
131  /// turn on/off the background elements
132  void drawBackground(bool draw);
133 
134  /// Called when loading a new hip file or File>New
135  void resetForNew();
136 
137  /// handle a change in our display options
138  void handleDisplayOptionEvent(UI_Event *e);
139 
140  /// handle a change in our view parameters
141  void handleViewParameterEvent(UI_Event *e);
142 
143  /// render all elements in this viewport
144  void doRender(RE_Render *r, int x, int y);
145 
146  /// render any transient overlay elements in the viewport
147  void overlayRender(RE_Render *r, int x, int y);
148 
149  /// render all handles present in the viewport
150  void renderHandles(RE_RenderContext r, int x, int y,
151  unsigned mask);
152 
153  /// Change the type of the viewport to a different projection or 2D/3D
154  void changeType(UI_Object *by, DM_ViewportType new_type);
155 
156  /// Called when the viewport closes, but is not deleted (such as a pane tab
157  /// switch).
158  void close();
159 
160  /// Request a deferred redraw.
161  void requestDraw() { myRedrawNotify.changed(nullptr); }
162 
163  /// @brief Access the beauty pass textures
164  /// Get a texture containing the color or depth of the beauty pass buffer.
165  /// This texture is always single-sampled.
166  RE_Texture *getBeautyPassTexture(RE_Render *r,
167  bool resolve_aa = true) const;
168  RE_Texture *getBeautyPassDepthTexture(RE_Render *r,
169  bool resolve_aa = true) const;
170 
171  /// copy the beauty pass to 'dst_texture'.
172  bool copyBeautyToTexture(RE_Render *r,
173  const UT_DimRect &src_area,
174  RE_Texture *dst_texture,
175  int dst_layer) const;
176  bool copyBeautyToTexture(RV_Render *r,
177  const UT_DimRect &src_area,
178  RV_VKImage *dst_texture,
179  int dst_layer) const;
180 
182 
183  /// updates and returns the beauty LUT and gamma
184  void updateBeautyLUT(const GUI_DisplayOption &dopt,
185  bool &out_has_LUT,
186  PXL_Lookup *&out_LUT,
187  float &out_gamma);
188  /// Returns the LUT for the beauty pass, if any.
189  PXL_Lookup *getBeautyLUT();
190 
191  UT_UniquePtr<TIL_Raster> getBeautyPassImage(RE_Render *r);
192  UT_UniquePtr<TIL_Raster> getBeautyPassDepthImage(RE_Render *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_Render *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  /// Methods to process mouse movement
388  /// @{
389  bool hasLocates();
390  void handleLocateEvent(UI_Event *e);
391  /// @}
392 
393  /// @brief Access displayed objects in the viewport
394  /// Return a handle to an object displayed in the viewport. Do not cache
395  /// these over several redraws, as they may become invalid. get*Object()'s
396  /// index parameter can be 0 to getNum*Objects()-1.
397  /// @{
398  int getNumOpaqueObjects() const;
399  DM_GeoDetail getOpaqueObject(int index) const;
400 
401  int getNumTransparentObjects() const;
402  DM_GeoDetail getTransparentObject(int index) const;
403 
404  int getNumUnlitObjects() const;
405  DM_GeoDetail getUnlitObject(int index) const;
406 
407  int getNumXRayObjects() const;
408  DM_GeoDetail getXRayObject(int index) const;
409  /// @}
410 
411  /// Returns the current detail within the object, when at SOP/POP/DOP level.
412  DM_GeoDetail getCurrentDetail() const;
413 
414  void initGPUTimers(RE_Render *r);
415  void collectGPUTimers(RE_Render *r);
416 
417  GUI_RotoView getRotoViewType();
418 
419  void markGeoSetup(bool setup,
420  DM_Viewport *setup_port = NULL);
421  bool isGeoSetup() const { return mySetupFlag; }
422 
423  // All lights in the scene, for the material render codepath.
424  void setGlobalLightArray(const UT_Array<OBJ_Ambient *> &l);
425  void setGlobalLightArray(const UT_ValArray<RE_Light*> &l);
426 
427  // Get and set lighting information.
428  bool setupLights(RE_RenderContext r, GUI_DisplayOption *opt);
429  void cleanupLights();
430 
431  GR_LightingPass getLightingPass() const { return myLightingPass; }
432  void setLightingPass(GR_LightingPass p) { myLightingPass=p;}
433 
434  // Returns the approximate memory usage of the viewport at the current size
435  // given hdr on/off, high quality lighting on/off, transparency > low,
436  // and aa at 1,2,4 or 8x.
437  int64 getFramebufferUsageKB(bool hdr, bool hql, bool trans,
438  int aa);
439 
440  // using zt[0] / (Z + zt[1]) will transform zbuffer values into viewspace Z
441  // If light is specified, then the shadowmap range of that light is computed
442  void getZBufferTransform(float zt[2],RE_Light *light=NULL,
443  bool reverse_depth = false);
444 
445  // Handle a change in which geometry is displayed.
446  // For keeping track of what type of UVs to show in UV mode.
447  void handleNewGeometryEvent(UI_Event *e);
448  void updateAttributeOptions(const GU_DetailHandle &gdh);
449 
450  // ---------------------------------------------------------------------
451  // the following methods should be treated as private to DM.
452 
453  /// Methods for starting and stopping events
454  /// in the old performance monitor.
455  void startPerfMonTimer(RE_RenderContext r,
456  RE_GPUTimer &timer,
457  const char *msg) const;
458  void stopPerfMonTimer(RE_RenderContext r,
459  RE_GPUTimer &timer) const;
460 
461  // setup proper winding and culling, returning a set of flags to use for
462  // the cleanup method.
463  int setupBackfaceAndWinding(RE_Render *r,
464  const GUI_DisplayOption *opts);
465  void cleanupBackfaceAndWinding(RE_Render *r,
466  int setup_flags);
467 
468  // resolve the AA Z buffer to a single sample, taking the further sample
469  bool resolveDepthBuffer(RE_Render *r,
470  RE_Texture *aa_depth_tex,
471  RE_Texture *depth_tex) const;
472 
473  int64 getSceneVersion(fpreal t, bool shadow, bool &timedep);
474 
475  // access to parent viewport
476  const DM_Viewport *getDisplay() const { return myDisplay; }
477  DM_Viewport *getDisplay() { return myDisplay; }
478 
479  // for transparency
480  int getTransparencyLayers(RE_RenderContext r,
481  const GUI_DisplayOption *disp);
482  void prepareStencilRouting(RE_RenderContext r,int nsamples);
483  void prepareABufferFront(RE_RenderContext r, int nsamples);
484 
485  void updateTimeDependentLook(fpreal t);
486 
487  bool isToolbarLinked() const; // see .C file note
488 
489  const GUI_DetailPtrList &getDetails() const;
490  const GUI_DetailPtrList &getDetails();
491 
492  void setupViewUniforms(RE_RenderContext rc);
493  void cleanupViewUniforms(RE_RenderContext rc);
494  void setupViewUniformsGL(RE_Render *r);
495  void cleanupViewUniformsGL(RE_Render *r);
496  void setupDrawableCamera(GUI_ViewParameter &view);
497 
498  // Helper methods to determine if a GUI_DetailLook, or OBJ_Node, should be
499  // hidden as a view cam object when hiding view cam geometry.
500  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
501  const GUI_DetailLook &look);
502  static bool shouldHideAsViewCamObject(const DM_Viewport &vport,
503  const OBJ_Node &node);
504 
505  // For DM_RenderHighQuality.
506  bool needsToDrawFloor() const
507  { return myDrawFloorTransientFlag; }
508  void initFogVolume(RE_Render *r,
509  DM_Viewport *vport,
510  GUI_FogMode fog,
511  const RE_Texture *zdepth) const;
512  RE_Texture *getFogVolumeTexture() const;
513  RE_Texture *getRandomDitherTexture(RE_Render *r);
514 
515  const DM_SceneManager &modeler() const
516  { return mySceneManager; }
517 
518  void renderBackgroundImage(RE_RenderContext r);
519  void renderForegroundImage(RE_RenderContext r);
520 
521  void resolveBeautyColorPass(RE_Render *r,
522  RE_Texture *aa_color,
523  RE_Texture *aa_depth,
524  RE_Texture *aa_nml,
525  bool xray) const;
526 
527  // If true, render to VK images rather than GL-interop VK images.
528  void renderToVulkanImages();
529 
530  void renderVulkan(RE_RenderContext r, UT_Vector2i res);
531 
532  // These only work for Vulkan images (if the above is set to true).
533  UT_UniquePtr<PXL_Raster> extractColorImage(RE_RenderContext r);
534  UT_UniquePtr<PXL_Raster> extractDepthImage(RE_RenderContext r);
535 
537  { return myDisplayAsSubdiv; }
538 
539 #ifdef VULKAN_PRESENTATION
540  // Swapchain
541  bool presentColorImage(RE_RenderContext r, RV_VKSwapchain* sc);
542 #endif
543 
544 #ifdef USE_VULKAN
545  // Ray tracing
546  const UT_Array<GUI_DetailLook *> &getRTLooks();
547 
548 
549  static bool initShaders(RV_Instance* inst);
550  static void cleanupShaders();
551 #endif
552 
553  DM_VPortComposite *getComposite() { return myComposite.get(); }
554  void setComposite(UT_UniquePtr<DM_VPortComposite> composite);
555 
556 #ifdef USE_VULKAN
557  DM_RenderVulkan *vkRender() { return myVKRender.get(); }
558 #endif
559 
560  exint getFramebufferMemory() const;
561 
562 protected:
563  friend class dm_SetupTask;
564 
565 private:
566 
567  RE_RenderContext getVulkanContext(RE_Render *r, int thread_index=0) const;
568 
569  DM_SceneManager &modeler()
570  { return mySceneManager; }
571 
572  const GUI_SceneLook *getLook() const { return mySceneLook.get(); }
573  GUI_SceneLook *getLook() { return mySceneLook.get(); }
574 
575  bool shouldDisplayObject(const DM_Viewport &vport,
576  const GUI_DetailLook *look,
577  OBJ_Node *node);
578 
579  bool shouldVisualizeObject(const DM_Viewport &vport,
580  const GUI_DetailLook *look,
581  OBJ_Node *node);
582 
583  bool shouldShowComponentSelections(const GUI_DetailLook &look,
584  const GUI_DisplayOption &d) const;
585 
586  enum DM_BufferBlend
587  {
588  ACCUM_ADD,
589  ACCUM_REPLACE,
590  ACCUM_ALPHA_BLEND
591  };
592 
593  // prints a message in the viewer (centrally justified) on a given line
594  void renderMessage( RE_RenderContext ren, int x, int y,
595  const char* msg, int line );
596  // renders true viewer name
597  void doRenderCurrentName(RE_RenderContext r, int x, int y);
598  // renders the snapshot label
599  void doRenderSnapshotName(RE_Render *r, int x, int y);
600 
601  // prints a message in the viewer for camera (central, bottom justified)
602  void renderCameraMessage( RE_Render *ren, int x, int y,
603  const char* msg);
604 
605  // Render a mask over the parts of the viewport outside of the view
606  // subregion.
607  void renderViewMask(RE_Render *r, int x, int y);
608 
609  bool resizeBeautyPassBuffer(RE_RenderContext r,
610  int width, int height,
611  bool hdr, bool needs_aa);
612  void destroyBeautyPassBuffer();
613  RE_OGLFramebuffer *getBeautyPassBuffer(bool allow_aa);
614 
615  // initializes the view and projection to a 1:1 pixel transform.
616  void pushIdentityOrthoView(RE_Render *r);
617  void popIdentityOrthoView(RE_Render *r);
618 
619  // Render the viewport name.
620  void doRenderName(RE_RenderContext r, int x, int y,
621  bool snapshot_name = false);
622  // Render the current state information.
623  void doRenderStateStatus(RE_Render *r);
624  // Render a mask over the parts of the viewport outside of the view
625  // subregion.
626  void doRenderViewMask(RE_Render *r, int x, int y);
627 
628  // Draw the view overview gadget.
629  void doRenderViewOverview(RE_Render *r, int x, int y);
630 
631  // Common utility methods to setup lights and the z buffer.
632  void setupForRender(RE_RenderContext ren,
633  bool allow_smooth = true);
634  void cleanupAfterRender(RE_RenderContext ren);
635 
636 
637  void setGammaPass(bool b) { myGammaPass = b?1:0; }
638 
639  void doRenderNoHookUnlitObjects(RE_RenderContext r,
640  int x, int y,
641  bool xray_pass);
642  void doRenderUnlitObjects(RE_RenderContext r, int x, int y);
643 
644  // Render the camera's mask (bars and anything else inside the mask)
645  void doRenderMask(RE_Render *r, int, int);
646 
647  // Render outlines
648  void doRenderOutlines(RE_RenderContext r);
649  // Render separate outlines for objects that have them
650  void doRenderSeparateOutline(RE_RenderContext r,
651  const UT_IntArray &indices);
652  void destroySelectionBuffer();
653 
654  void startBeautyPass(RE_RenderContext r,
655  bool allow_aa=true);
656  void endBeautyPass(RE_RenderContext r, bool allow_aa=true);
657  bool isBeautyPassAA(bool allow_aa = true);
658  bool isHeadlightRender(RE_RenderContext r);
659 
660  // helper methods for setting up stereo passes
661  void setupStereo3d(RE_Render *r);
662  void setupStereoVR(RE_Render *r);
663  void cleanupStereo3d(RE_Render *r);
664  void interruptStereo(RE_Render *r);
665  void resumeStereo(RE_Render *r);
666  void setupStereo3dForLeftCamera(RE_Render *r,
667  bool uniforms_for_3d);
668  void setupStereo3dForRightCamera(RE_Render *r,
669  bool uniforms_for_3d);
670  void updateStereoViewUniforms(RE_Render *r, bool left);
671  void assignStereoLeft(RE_Render *r,
672  const GUI_ViewState::GUI_ViewType vt);
673  void assignStereoRight(RE_Render *r,
674  const GUI_ViewState::GUI_ViewType vt);
675  void assignStereoTop(RE_Render *r,
676  const GUI_ViewState::GUI_ViewType vt);
677  void assignStereoBottom(RE_Render *r,
678  const GUI_ViewState::GUI_ViewType vt);
679 
680  bool setupTransparentBuffers(RE_RenderContext r, int hdr);
681  void destroyTransparentBuffers();
682 
683  /// Setup framebuffer object for storing the result of composite passes.
684  /// @param use_color_buffer_for_depth if true, attach a second color buffer
685  /// for storing depth instead of a depth buffer.
686  /// @see compositePasses
687  bool setupCompositeBuffers(RE_RenderContext r,
688  bool use_color_buffer_for_depth);
689  /// Destroy composite FBO and related textures.
690  void destroyCompositeBuffers();
691 
692  void renderViewport(RE_RenderContext r, int x, int y);
693  void renderSceneView(RE_RenderContext r, int x, int y);
694 
695  // Render the transparent bars defined by the camera's mask parameters
696  void renderCameraMask(RE_Render *r);
697 
698  // Render the object that goes on top of the camera mask
699  void renderCameraMaskOverlay(RE_Render *, int, int);
700 
701  void renderTransparentGeometry(
703  GUI_DisplayOption *dispopt,
704  bool headlight);
705  bool renderHQTransparencyPass(
706  RE_RenderContext r, int x, int y,
707  GUI_DisplayOption *dispopt,
708  const UT_Array<GUI_DetailLook *> *geos = NULL,
709  bool for_xray = false);
710  bool setupHQTransparentBuffers(
711  RE_RenderContext r, int nsamples,
712  bool hdr);
713  void destroyHQTransparentBuffers();
714 
715  void initStencilABuffer(RE_RenderContext r, int nsamples);
716 
717  bool setupUnlitAlphaBuffer(RE_RenderContext r, bool zbuf);
718  void destroyUnlitAlphaBuffer();
719 
720  // Geometry pick code
721  bool createPickBuffer(RE_RenderContext r);
722  bool renderPickBuffer(RE_RenderContext r,
723  bool object_pick,
724  bool enable_occlusion,
725  unsigned int pickmask,
727  const GUI_DetailList *geos,
728  const GR_ObjectPickFlags &pick_flags);
729 
730  // Query the pick buffer. Returns true on a hit.
731  // allow_geo - allow geometry picks (either obj or component
732  // depending on geo_is_object)
733  // allow_handle - allow handle picks
734  // geo_is_object - geometry records are objects instead of
735  // components
736  // geo_ignore_depth - avoid scanning samples looking for a closer
737  // hit (only when !geo_is_object)
738  // geo_prioritize - scan samples looking for a higher priority
739  // component pick (only when !geo_is_object)
740  // floor_prioritize - scan samples looking for a higher priority
741  // floor component pick (only when allow_handle
742  // and does not differentiate between different
743  // floors)
744  // overlap_dist - the distance at which to consider picks to
745  // be essentially overlapping and employ some
746  // heuristics to pick the best one
747  bool pickFromBuffer(RE_RenderContext r,
748  RE_PickBuffer *pick_buffer,
749  int x, int y,
750  bool allow_geo,
751  bool allow_handle,
752  bool geo_is_object,
753  bool geo_ignore_depth,
754  bool geo_prioritize,
755  bool floor_prioritize,
756  int pick_dist,
757  int overlap_dist,
759  UT_Array<GR_PickRecord> *results,
760  UT_Vector2i *result_offset,
761  fpreal *depth,
762  const GUI_DetailList *geos);
763 
764  int filterPickData(int32 *pick_base_data,
765  int32 *pick_component_data,
766  int npicks,
767  UT_Array<GR_PickRecord> &pick_records);
768  int subtractPickData(const UT_Vector3iArray &base,
769  const UT_Vector3iArray &comp,
770  const UT_Array<GR_PickRecord> &outside,
771  UT_Array<GR_PickRecord> &results);
772  void objectPickRender(RE_RenderContext r,
773  unsigned int pickmask,
775  const GUI_DetailList *geos,
776  const GR_ObjectPickFlags &pick_flags);
777  void doObjectBoxPick(RE_RenderContext r,
778  const UT_DimRect &area,
779  UT_Array<GR_PickRecord> &pick_records,
780  bool visible_only,
781  bool invert_mask,
782  bool use_texture,
783  bool clip_edges,
784  const GUI_DetailList *geos);
785 
786  int componentPickRender(RE_RenderContext r,
787  unsigned int pickmask,
788  unsigned int xray_pickmask,
790  const GUI_DetailList *geos,
791  GR_PickStyle pickstyle,
792  bool invert_mask,
793  UT_Array<GR_PickRecord> *pick_rec);
794  int boxPickVisibleComponent(RE_RenderContext r,
795  const UT_DimRect &area,
796  uint8 *texture,
797  UT_Array<GR_PickRecord> &pick_records,
798  unsigned pickmask,
800  const GUI_DetailList *geos,
801  bool contained);
802  int boxPickFrustumComponent(RE_RenderContext r,
803  const UT_DimRect &area,
804  uint8 *texture,
805  UT_Array<GR_PickRecord> &pick_records,
806  unsigned pickmask,
808  const GUI_DetailList *geos,
809  bool visible_only,
810  bool contained);
811 
812 #ifdef USE_VULKAN
813  // helper function called by boxPickObject
814  int boxPickObjectVK(RE_RenderContext r,
815  const UT_DimRect &area,
816  uint8 *texture,
817  UT_Array<GR_PickRecord> &pick_records,
818  bool visible_only,
819  bool wholy_contained,
820  const GUI_DetailList *geos);
821 
822  void doObjectBoxPickVK(RE_RenderContext r,
823  const UT_DimRect &area,
824  UT_Array<GR_PickRecord> &pick_records,
825  bool visible_only,
826  bool invert_mask,
827  bool use_texture,
828  bool clip_edges,
829  const GUI_DetailList *geos);
830 
831  void doPickBufferRenderVK(RE_RenderContext r,
832  bool object_pick,
833  bool enable_occlusion,
834  unsigned int pickmask,
836  const GUI_DetailList *geos,
837  const GR_ObjectPickFlags &pick_flags);
838 
839  void doSnapBufferRenderVK(RE_RenderContext r,
840  unsigned int snapmask,
841  unsigned int xray_snapmask,
843  const GUI_DetailList *geos,
844  bool hide_selected,
845  bool enable_occlusion,
846  bool do_current,
847  bool do_guides,
848  bool extend_floor);
849 
850  void objectPickRenderVK(RE_RenderContext r,
851  unsigned int pickmask,
853  const GUI_DetailList *geos,
854  const GR_ObjectPickFlags &pick_flags);
855 
856  int componentPickRenderVK(RE_RenderContext r,
857  unsigned int pickmask,
858  unsigned int xray_pickmask,
860  const GUI_DetailList *geos,
861  GR_PickStyle pickstyle,
862  bool invert_mask,
863  bool has_pick_map,
864  UT_Array<GR_PickRecord> *pick_rec);
865 
866  int boxPickFrustumComponentVK(RE_RenderContext r,
867  const UT_DimRect &area,
868  uint8 *texture,
869  UT_Array<GR_PickRecord> &pick_records,
870  unsigned pickmask,
872  const GUI_DetailList *geos,
873  bool visible_only,
874  bool contained);
875 
876  void renderOffsetDepthPassVK(RE_RenderContext r,
877  bool skip_obj_sel_looks,
878  bool skip_guide_looks,
879  bool skip_nonsnappable_looks,
880  bool skip_current_look);
881 
882 #endif
883  void renderOffsetDepthPass(RE_RenderContext r,
884  bool skip_obj_sel_looks = false,
885  bool skip_guide_looks = false,
886  bool skip_nonsnappable_looks = false,
887  bool skip_current_look = false);
888  void flattenAlphaPass(RE_RenderContext r,
889  const GUI_DisplayOption *dispopt,
890  int num_layers);
891  // end pick code
892 
893  // Snapping and handle pick code
894  bool createSnapHandleBuffer(RE_RenderContext r);
895  bool renderHandleBuffer(RE_RenderContext r);
896  bool renderSnapBuffer(RE_RenderContext r,
897  unsigned int snapmask,
899  const GUI_DetailList *geos,
900  bool hide_selected,
901  bool enable_occlusion,
902  bool do_current,
903  bool do_xray, bool do_guides,
904  bool extend_floor);
905  // end snapping and handle pick code
906 
907  bool sampleDepth(RE_Render *r, int x, int y, fpreal &z,
908  RE_Texture *depth_texture);
909 
910  void renderXray(RE_RenderContext r,
911  GUI_DisplayOption *dispopts);
912  void resolveXrayBeautyPass(RE_RenderContext r) const;
913  void renderOnionSkin(RE_RenderContext r,
914  GUI_DisplayOption *dispopts);
915 
916  bool renderBeautyPass(RE_RenderContext r, int x, int y,
917  GUI_DisplayOption *dispopt,
918  bool &needs_lighting);
919  bool renderTransparencyPass(RE_RenderContext r,
920  int x, int y,
921  GUI_DisplayOption *dispopt);
922  bool renderEnvironmentMaps(RE_RenderContext r,
923  bool query_only);
924  void renderEnvMap(RE_RenderContext r,
925  RE_OGLTexture *cubemap,
926  int cubemap_unit) const;
927  void compositePasses(RE_RenderContext r,
928  const GUI_DisplayOption *dispopt,
929  bool skip_postprocessing = false);
930 
931  void normalQualityRender(
933  GUI_DisplayOption *dispopt,
934  GR_AlphaPass alpha_pass,
936  const UT_Array<GUI_DetailLook*> *geos=NULL);
937 
938  bool isUsingHQLighting(RE_RenderContext r,
939  const GUI_DisplayOption *dispopt);
940 
941  void renderOverlappingUV(RE_RenderContext r,
942  GUI_DisplayOption *disp);
943  bool setupOverlappingUVBuffer(RE_RenderContext r,
944  int w, int h);
945  void destroyOverlappingUVBuffer();
946 
947  void renderCoincidentPoints(RE_RenderContext r,
948  GUI_DisplayOption *disp);
949  bool setupCoincidentBuffer(RE_Render *r, int w, int h);
950  void destroyCoincidentBuffer();
951 
952  void subtractFromSelection(UT_Array<GR_PickRecord> &results,
954  exint start_subtracting_at,
956 #ifdef MBSD_COCOA
957  void dmOSXDepthBufferWorkaround(RE_Render *r,
958  RE_Texture *tex);
959 #endif
960  void updateVisibleBoundariesAndViews(int vis_display_sets);
961 
962  void redrawNeeded(UI_Event *);
963 
964  mutable RE_ShaderHandle *myDepthResolveShader;
965 
966  RE_OGLFramebuffer *myBeautyPassBuffer;
967  RE_OGLFramebuffer *myBeautyPassAABuffer;
968  RE_Texture *myBeautyColorTexture;
969  RE_Texture *myBeautyDepthTexture;
970  RE_Texture *myBeautyPassAACTexture;
971  RE_Texture *myBeautyPassAAZTexture;
972  int myBeautyPassSamples;
973  bool myBeautyPassHDR;
974 
975  RE_OGLFramebuffer *myTransparentFBO;
976  RE_Texture *myTransparentColorTex;
977  RE_Texture *myTransparentZTex;
978  bool myTransparentHDR;
979 
980  RE_OGLFramebuffer *mySelectionIDFBO;
981  RE_Texture *mySelectionIDTex;
982  RE_Texture *mySelectionZTex;
983 
984  UT_UniquePtr<RE_Texture> myOutlineColorsTex;
985  UT_Vector4FArray myOutlineColorsArray;
986 
987  UT_UniquePtr<RE_OGLFramebuffer> myOutlineBitmaskFBO;
988  UT_UniquePtr<RE_Texture> myOutlineBitmaskTex;
989 
991  /// The composite FBO is used to write the final composite into textures
992  /// that we can use for post-processing such as slap comp.
993  /// It is only used when @c myComposite is set.
994  UT_UniquePtr<RE_OGLFramebuffer> myCompositeFBO;
995  UT_UniquePtr<RE_Texture> myCompositeColorTexture;
996  UT_UniquePtr<RE_Texture> myCompositeDepthTexture;
997 
998 #ifdef USE_VULKAN // WIP: make private, and make heleper func
999  // so access in DM_Viewport insn't needed
1000 public:
1001  UT_UniquePtr<DM_RenderVulkan> myVKRender;
1002 
1003  DM_PostEffects &getPostEffects() { return *myPostEffects; }
1004 private:
1005  // extra data for box picking
1006  UT_UniquePtr<RV_Geometry> myBoxPickObjectGeometryVK;
1007  UT_UniquePtr<RV_VKImage> myBoxPickMaskTextureVK;
1008 
1009  UT_UniquePtr<RV_ShaderVariableSet> myBoxPickSetVK;
1010  UT_UniquePtr<RV_Framebuffer> myBoxPickFramebufferVK;
1011  UT_UniquePtr<RV_VKImage> myImageFallbackVK;
1012  UT_UniquePtr<RV_VKImage> myBoxPickDepthVK;
1013 
1014  UT_Array<GUI_DetailLook *> myRTLooks;
1015 #endif
1016  DM_RenderHighQuality *myHQRender;
1017  DM_PostEffects *myPostEffects;
1018 
1019  RE_Texture *myRandomDitherTexture;
1020  RE_TextureMap *myRandomDitherTextureMap;
1021 
1022  PXL_Lookup myLookup;
1023  UT_String myLUTFile;
1024  UT_String myOCIODisplay;
1025  exint myOCIOSerial;
1026 
1027  bool myIsBeautyPass;
1028  GR_LightingPass myLightingPass;
1029  bool myIsAlphaPass;
1030  bool myUseUnlitMask;
1031  bool myHighQualityMode;
1032  bool myNeedsXRayResolve;
1033  bool myHasGILight;
1034  bool myHasEnvLight;
1035  bool myHasCascadingShadowLight;
1036  bool myNeedsOverlayRender;
1037  uint64 myStandaloneFlag;
1038  int myStereoMode;
1039  GR_DecorationOverride myDecorationOverride;
1040  UT_StringHolder myDisplayedUVAttrib;
1041  bool myHasTransparencyPass = false;
1042  bool myHasAlphaBuffers = false;
1043 
1044  mutable RE_OGLFramebuffer *myDepthResolveFBO;
1045  mutable unsigned int myDepthResolveShaderFailed : 1,
1046  myZCompositeShaderFailed : 1;
1047 
1048  UT_UniquePtr<DM_FloorInterface> myFloorInterface;
1049  UT_IntArray mySetupLookShowSelection;
1050  bool myHasSelectionsShown;
1051  bool myDrawFloorTransientFlag;
1052  int myDecorLocateMask;
1053  int myDecorVisibleMask;
1054  int myGammaPass;
1055 
1056  RE_GPUTimer myBGTimer;
1057  RE_GPUTimer myFGTimer;
1058  RE_GPUTimer myGeoCleanupTimer;
1059  RE_GPUTimer myUnlitTimer;
1060 
1061  DM_ViewportType myType;
1062  int myRenderCount;
1063  RE_OGLContext myInitContext;
1064 
1065  UT_Array<GUI_DetailLookPtr> mySetupLooks;
1066  UT_Array<OBJ_Node *> mySetupObjects;
1067  UT_Array<GUI_DetailLook *> myUnlitLooks;
1068  UT_Array<GUI_DetailLook *> myXRayLooks;
1069  UT_Array<GUI_DetailLook *> myOnionSkinLooks;
1070  UT_Array<GUI_DetailLook *> myTransparentLooks;
1071  UT_Array<OBJ_Node *> myTransparentObjects;
1072 
1073  bool mySavedAntiAliasOption;
1074  UI_XPtr<GUI_SceneLook> mySceneLook;
1075  DM_SceneManager &mySceneManager;
1076  DM_Viewport *myDisplay;
1077  bool mySetupFlag;
1078 
1079  // Buffers for picking geometry.
1080  UT_UniquePtr<dm_PickBuffer> myPickBuffer;
1081  UT_TokenString *myPickBufferTestHash;
1082 
1083  // Extra data for box picking.
1084  RE_ShaderHandle myBoxPickObjectShader;
1085  RE_Geometry *myBoxPickObjectGeometry;
1086  RE_Texture *myBoxPickMaskTexture;
1087 
1088  // Buffers for snapping to components.
1089  UT_UniquePtr<dm_PickBuffer> mySnapHandleBuffer;
1090  UT_TokenString *mySnapHandleBufferTestHash;
1091 
1092  // General position/orientation snapping
1093  DM_SnapBuffer *mySnapBuffer;
1094  bool mySnapHasValidData;
1095 
1096  RE_OGLFramebuffer *myUnlitAlphaFBO;
1097  RE_Texture *myUnlitAlphaTexture;
1098  RE_Texture *myUnlitDepthTexture;
1099 
1100  static RE_ShaderHandle theBeautyCompShader;
1101  static RE_ShaderHandle theBeautyCompAAShader;
1102  static RE_ShaderHandle theBeautyCompHQAlpha4Shader;
1103  static RE_ShaderHandle theBeautyCompHQAlpha4AAShader;
1104  static RE_ShaderHandle theBeautyCompHQAlpha8Shader;
1105  static RE_ShaderHandle theBeautyCompHQAlpha8AAShader;
1106  static RE_ShaderHandle theBeautyCompHQAlpha16Shader;
1107  static RE_ShaderHandle theBeautyCompHQAlpha16AAShader;
1108  static RE_ShaderHandle theDepthCompShader;
1109  static RE_ShaderHandle theDepthComp4Shader;
1110  static RE_ShaderHandle theDepthComp8Shader;
1111  static RE_ShaderHandle theDepthComp16Shader;
1112  static RE_ShaderHandle theColorCorrectCompShader;
1113  static RE_ShaderHandle theAlphaFlatten4Shader;
1114  static RE_ShaderHandle theAlphaFlatten8Shader;
1115  static RE_ShaderHandle theAlphaFlatten16Shader;
1116  static RE_ShaderHandle theUnlitAlphaShader;
1117  static RE_ShaderHandle theUnlitDepthShader;
1118  static RE_ShaderHandle theXRayShader;
1119 
1120  int myDecorLocateRawPos[2];
1121  int myDecorLocatePos[2];
1122  RE_ShaderHandle mySampleDepthShader;
1123 
1124  RE_OGLFramebuffer *myHQTransparentFBO;
1125  RE_Texture *myHQTransparentColorTex;
1126  RE_Texture *myHQTransparentStencil;
1127  bool myHQTransparentHDR;
1128 
1129  UT_UniquePtr<RE_Geometry> myCubeGeo;
1130 
1131  RE_OGLFramebuffer *myCoincidentBuffer;
1132  RE_Texture *myCoincidentTexture;
1133  RE_OGLFramebuffer *myOverlappingUVBuffer;
1134 
1135  bool myRampUnitPushed;
1136 
1137  RE_RenderWait *myBeautyPassSync;
1138 
1139  RE_GPUTimer myPreRenderTimer;
1140  RE_GPUTimer myPostRenderTimer;
1141  RE_GPUTimer myXRayTimer;
1142  RE_GPUTimer myOnionSkinTimer;
1143  RE_GPUTimer myCompositeTimer;
1144  RE_GPUTimer myBGEnvMapTimer;
1145  RE_GPUTimer myDecorTimer;
1146  RE_GPUTimer myHandleTimer;
1147 
1148  bool myUseHQLighting;
1149  bool myHasPerLookPickPriority;
1150 
1151  DM_ViewportHooks *myViewportHooks;
1152  UT_IntArray myViewportConfig;
1153  UI_Value myRedrawNotify;
1154  int myCurrentObjectID;
1155 
1156  UT_UniquePtr<PY_EvaluationContext> myPyContextUpdateDrawableCamera;
1157  bool myPyUpdateDrawableCameraInit = false;
1158 
1159  bool myDisplayAsSubdiv = false;
1160 };
1161 #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.
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:48
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: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