15 #ifndef __DM_VPortAgent__
16 #define __DM_VPortAgent__
61 class DM_FloorInterface;
64 class DM_RenderHighQuality;
65 class DM_SceneManager;
68 class DM_ViewportHooks;
69 class DM_VPortComposite;
70 class DM_RenderVulkan;
82 int getUniqueId()
const;
87 bool non_templated_only,
89 const DM_Viewport &viewport)
const;
94 void cleanupViewport();
108 bool isActiveRender()
const;
111 bool isLopsView()
const;
128 OP_Node *currentCamera()
const;
131 void drawBackground(
bool draw);
137 void handleDisplayOptionEvent(
UI_Event *e);
140 void handleViewParameterEvent(
UI_Event *e);
166 bool resolve_aa =
true)
const;
168 bool resolve_aa =
true)
const;
174 int dst_layer)
const;
178 int dst_layer)
const;
193 bool getBeautyPassHDR()
const;
194 void setBeautyPassConsolidate(
bool con);
225 bool wholy_contained,
237 bool enable_occlusion,
238 bool handle_pick_radius);
264 bool bind_depth)
const;
276 unsigned int xray_pickmask,
284 bool hide_selected,
bool enable_occlusion,
286 bool do_xray,
bool do_guides,
291 unsigned pickmask,
int gravity,
299 bool hide_selected,
bool enable_occlusion,
300 bool do_xray,
bool do_guides,
311 int pnt_rad,
int edge_rad,
int face_rad,
321 void invalidatePickBuffers();
337 bool hover_decorations);
352 bool do_geometry_setup);
362 bool treat_uv_viewport_as_3d =
false,
372 bool floor = myDrawFloorTransientFlag;
373 myDrawFloorTransientFlag =
false;
378 {
return myFloorInterface.get(); }
382 DM_ViewportHooks &
hooks()
const {
return *myViewportHooks; }
385 {
return myNeedsOverlayRender; }
387 bool hasAlphaPass()
const {
return myHasAlphaBuffers && myHasTransparencyPass; }
392 void handleLocateEvent(
UI_Event *e);
400 int getNumOpaqueObjects()
const;
403 int getNumTransparentObjects()
const;
406 int getNumUnlitObjects()
const;
409 int getNumXRayObjects()
const;
421 void markGeoSetup(
bool setup,
422 DM_Viewport *setup_port = NULL);
431 void cleanupLights();
439 int64 getFramebufferUsageKB(
bool hdr,
bool hql,
bool trans,
444 void getZBufferTransform(
float zt[2],
RE_Light *light=NULL,
445 bool reverse_depth =
false);
449 void handleNewGeometryEvent(
UI_Event *e);
459 const char *msg)
const;
475 int64 getSceneVersion(
fpreal t,
bool shadow,
bool &timedep);
487 void updateTimeDependentLook(
fpreal t);
489 bool isToolbarLinked()
const;
503 int x,
int y,
int w,
int h);
507 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
509 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
514 {
return myDrawFloorTransientFlag; }
523 {
return mySceneManager; }
535 void renderToVulkanImages();
544 {
return myDisplayAsSubdiv; }
546 #ifdef VULKAN_PRESENTATION
564 DM_RenderVulkan *vkRender() {
return myVKRender.get(); }
567 exint getFramebufferMemory()
const;
570 friend class dm_SetupTask;
576 DM_SceneManager &modeler()
577 {
return mySceneManager; }
579 const GUI_SceneLook *getLook()
const {
return mySceneLook.get(); }
580 GUI_SceneLook *getLook() {
return mySceneLook.get(); }
582 bool shouldDisplayObject(
const DM_Viewport &vport,
586 bool shouldVisualizeObject(
const DM_Viewport &vport,
602 const char* msg,
int line );
618 bool hdr,
bool needs_aa);
619 void destroyBeautyPassBuffer();
628 bool snapshot_name =
false);
640 bool allow_smooth =
true);
644 void setGammaPass(
bool b) { myGammaPass = b?1:0; }
659 void destroySelectionBuffer();
664 bool isBeautyPassAA(
bool allow_aa =
true);
669 void setupStereoVR();
674 bool uniforms_for_3d);
676 bool uniforms_for_3d);
688 void destroyTransparentBuffers();
695 bool use_color_buffer_for_depth);
697 void destroyCompositeBuffers();
708 void renderTransparentGeometry(
712 bool renderHQTransparencyPass(
716 bool for_xray =
false);
717 bool setupHQTransparentBuffers(
720 void destroyHQTransparentBuffers();
725 void destroyUnlitAlphaBuffer();
731 bool enable_occlusion,
732 unsigned int pickmask,
760 bool geo_ignore_depth,
762 bool floor_prioritize,
771 int filterPickData(
int32 *pick_base_data,
772 int32 *pick_component_data,
780 unsigned int pickmask,
794 unsigned int pickmask,
795 unsigned int xray_pickmask,
826 bool wholy_contained,
840 bool enable_occlusion,
841 unsigned int pickmask,
847 unsigned int snapmask,
848 unsigned int xray_snapmask,
852 bool enable_occlusion,
858 unsigned int pickmask,
864 unsigned int pickmask,
865 unsigned int xray_pickmask,
884 bool skip_obj_sel_looks,
885 bool skip_guide_looks,
886 bool skip_nonsnappable_looks,
887 bool skip_current_look);
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);
904 unsigned int snapmask,
908 bool enable_occlusion,
910 bool do_xray,
bool do_guides,
928 bool &needs_lighting);
936 int cubemap_unit)
const;
939 bool skip_postprocessing =
false);
941 void normalQualityRender(
955 void destroyOverlappingUVBuffer();
960 void destroyCoincidentBuffer();
964 exint start_subtracting_at,
970 void updateVisibleBoundariesAndViews(
int vis_display_sets);
982 int myBeautyPassSamples;
983 bool myBeautyPassHDR;
988 bool myTransparentHDR;
1008 #ifdef USE_VULKAN // WIP: make private, and make heleper func
1014 DM_PostEffects &getPostEffects() {
return *myPostEffects; }
1027 DM_RenderHighQuality *myHQRender;
1028 DM_PostEffects *myPostEffects;
1038 bool myIsBeautyPass;
1041 bool myUseUnlitMask;
1042 bool myHighQualityMode;
1043 bool myNeedsXRayResolve;
1046 bool myHasCascadingShadowLight;
1047 bool myNeedsOverlayRender;
1052 bool myHasTransparencyPass =
false;
1053 bool myHasAlphaBuffers =
false;
1056 mutable unsigned int myDepthResolveShaderFailed : 1,
1057 myZCompositeShaderFailed : 1;
1061 bool myHasSelectionsShown;
1062 bool myDrawFloorTransientFlag;
1063 int myDecorLocateMask;
1064 int myDecorVisibleMask;
1084 bool mySavedAntiAliasOption;
1086 DM_SceneManager &mySceneManager;
1087 DM_Viewport *myDisplay;
1104 DM_SnapBuffer *mySnapBuffer;
1105 bool mySnapHasValidData;
1131 int myDecorLocateRawPos[2];
1132 int myDecorLocatePos[2];
1138 bool myHQTransparentHDR;
1152 bool myRampUnitPushed;
1165 bool myUseHQLighting;
1166 bool myHasPerLookPickPriority;
1168 DM_ViewportHooks *myViewportHooks;
1171 int myCurrentObjectID;
1174 bool myPyUpdateDrawableCameraInit =
false;
1176 bool myDisplayAsSubdiv =
false;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
GLsizei GLenum const void * indices
void requestDraw()
Request a deferred redraw.
IMATH_HOSTDEVICE constexpr int floor(T x) IMATH_NOEXCEPT
const DM_Viewport * getDisplay() const
GA_API const UT_StringHolder rot
GLdouble GLdouble GLdouble z
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
PUGI__FN void sort(I begin, I end, const Pred &pred)
**But if you need a result
const DM_FloorInterface * getFloorInterface() const
unsigned long long uint64
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.
DM_ViewportType getViewType() const
The projection type of this viewport.
void setLightingPass(GR_LightingPass p)
GLint GLsizei GLsizei height
GLint GLint GLsizei GLint GLenum GLenum type
ImageBuf OIIO_API sub(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
GA_API const UT_StringHolder trans
constexpr auto set(type rhs) -> int
RV_API void cleanupShaders()
const DM_SceneManager & modeler() const
GLboolean GLboolean GLboolean b
Handle to the main interface of Vulkan.
bool needsToDrawFloor() const
GLint GLint GLsizei GLsizei GLsizei depth
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
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.
GLubyte GLubyte GLubyte GLubyte w
#define DM_VIEWPORT_PERSPECTIVE
GR_LightingPass getLightingPass() const
QOpenGLContext * RE_OGLContext
DM_Viewport * getDisplay()
UT_UniquePtr< TIL_Raster > RasterPtr
GA_API const UT_StringHolder area
Simple interface to building a shader from a .prog file.