15 #ifndef __DM_VPortAgent__
16 #define __DM_VPortAgent__
59 class DM_FloorInterface;
62 class DM_RenderHighQuality;
63 class DM_SceneManager;
66 class DM_ViewportHooks;
67 class DM_VPortComposite;
70 class DM_RenderVulkan;
83 int getUniqueId()
const;
88 bool non_templated_only,
90 const DM_Viewport &viewport)
const;
95 void cleanupViewport();
109 bool isActiveRender()
const;
112 bool isLopsView()
const;
129 OP_Node *currentCamera()
const;
132 void drawBackground(
bool draw);
138 void handleDisplayOptionEvent(
UI_Event *e);
141 void handleViewParameterEvent(
UI_Event *e);
167 bool resolve_aa =
true)
const;
169 bool resolve_aa =
true)
const;
175 int dst_layer)
const;
179 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; }
390 void handleLocateEvent(
UI_Event *e);
398 int getNumOpaqueObjects()
const;
401 int getNumTransparentObjects()
const;
404 int getNumUnlitObjects()
const;
407 int getNumXRayObjects()
const;
419 void markGeoSetup(
bool setup,
420 DM_Viewport *setup_port = NULL);
429 void cleanupLights();
437 int64 getFramebufferUsageKB(
bool hdr,
bool hql,
bool trans,
442 void getZBufferTransform(
float zt[2],
RE_Light *light=NULL,
443 bool reverse_depth =
false);
447 void handleNewGeometryEvent(
UI_Event *e);
457 const char *msg)
const;
473 int64 getSceneVersion(
fpreal t,
bool shadow,
bool &timedep);
485 void updateTimeDependentLook(
fpreal t);
487 bool isToolbarLinked()
const;
500 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
502 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
507 {
return myDrawFloorTransientFlag; }
516 {
return mySceneManager; }
528 void renderToVulkanImages();
537 {
return myDisplayAsSubdiv; }
539 #ifdef VULKAN_PRESENTATION
557 DM_RenderVulkan *vkRender() {
return myVKRender.get(); }
560 exint getFramebufferMemory()
const;
563 friend class dm_SetupTask;
569 DM_SceneManager &modeler()
570 {
return mySceneManager; }
572 const GUI_SceneLook *getLook()
const {
return mySceneLook.get(); }
573 GUI_SceneLook *getLook() {
return mySceneLook.get(); }
575 bool shouldDisplayObject(
const DM_Viewport &vport,
579 bool shouldVisualizeObject(
const DM_Viewport &vport,
595 const char* msg,
int line );
602 void renderCameraMessage(
RE_Render *ren,
int x,
int y,
611 bool hdr,
bool needs_aa);
612 void destroyBeautyPassBuffer();
621 bool snapshot_name =
false);
633 bool allow_smooth =
true);
637 void setGammaPass(
bool b) { myGammaPass = b?1:0; }
652 void destroySelectionBuffer();
657 bool isBeautyPassAA(
bool allow_aa =
true);
667 bool uniforms_for_3d);
668 void setupStereo3dForRightCamera(
RE_Render *
r,
669 bool uniforms_for_3d);
681 void destroyTransparentBuffers();
688 bool use_color_buffer_for_depth);
690 void destroyCompositeBuffers();
699 void renderCameraMaskOverlay(
RE_Render *,
int,
int);
701 void renderTransparentGeometry(
705 bool renderHQTransparencyPass(
709 bool for_xray =
false);
710 bool setupHQTransparentBuffers(
713 void destroyHQTransparentBuffers();
718 void destroyUnlitAlphaBuffer();
724 bool enable_occlusion,
725 unsigned int pickmask,
753 bool geo_ignore_depth,
755 bool floor_prioritize,
764 int filterPickData(
int32 *pick_base_data,
765 int32 *pick_component_data,
773 unsigned int pickmask,
787 unsigned int pickmask,
788 unsigned int xray_pickmask,
819 bool wholy_contained,
833 bool enable_occlusion,
834 unsigned int pickmask,
840 unsigned int snapmask,
841 unsigned int xray_snapmask,
845 bool enable_occlusion,
851 unsigned int pickmask,
857 unsigned int pickmask,
858 unsigned int xray_pickmask,
877 bool skip_obj_sel_looks,
878 bool skip_guide_looks,
879 bool skip_nonsnappable_looks,
880 bool skip_current_look);
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);
897 unsigned int snapmask,
901 bool enable_occlusion,
903 bool do_xray,
bool do_guides,
918 bool &needs_lighting);
926 int cubemap_unit)
const;
929 bool skip_postprocessing =
false);
931 void normalQualityRender(
945 void destroyOverlappingUVBuffer();
950 void destroyCoincidentBuffer();
954 exint start_subtracting_at,
960 void updateVisibleBoundariesAndViews(
int vis_display_sets);
972 int myBeautyPassSamples;
973 bool myBeautyPassHDR;
978 bool myTransparentHDR;
998 #ifdef USE_VULKAN // WIP: make private, and make heleper func
1003 DM_PostEffects &getPostEffects() {
return *myPostEffects; }
1016 DM_RenderHighQuality *myHQRender;
1017 DM_PostEffects *myPostEffects;
1027 bool myIsBeautyPass;
1030 bool myUseUnlitMask;
1031 bool myHighQualityMode;
1032 bool myNeedsXRayResolve;
1035 bool myHasCascadingShadowLight;
1036 bool myNeedsOverlayRender;
1041 bool myHasTransparencyPass =
false;
1042 bool myHasAlphaBuffers =
false;
1045 mutable unsigned int myDepthResolveShaderFailed : 1,
1046 myZCompositeShaderFailed : 1;
1050 bool myHasSelectionsShown;
1051 bool myDrawFloorTransientFlag;
1052 int myDecorLocateMask;
1053 int myDecorVisibleMask;
1073 bool mySavedAntiAliasOption;
1075 DM_SceneManager &mySceneManager;
1076 DM_Viewport *myDisplay;
1093 DM_SnapBuffer *mySnapBuffer;
1094 bool mySnapHasValidData;
1120 int myDecorLocateRawPos[2];
1121 int myDecorLocatePos[2];
1127 bool myHQTransparentHDR;
1135 bool myRampUnitPushed;
1148 bool myUseHQLighting;
1149 bool myHasPerLookPickPriority;
1151 DM_ViewportHooks *myViewportHooks;
1154 int myCurrentObjectID;
1157 bool myPyUpdateDrawableCameraInit =
false;
1159 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...
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.