15 #ifndef __DM_VPortAgent__
16 #define __DM_VPortAgent__
58 class DM_FloorInterface;
61 class DM_RenderHighQuality;
62 class DM_SceneManager;
65 class DM_ViewportHooks;
68 class DM_RenderVulkan;
81 int getUniqueId()
const;
86 bool non_templated_only,
88 const DM_Viewport &viewport)
const;
93 void cleanupViewport();
107 bool isActiveRender()
const;
110 bool isLopsView()
const;
127 OP_Node *currentCamera()
const;
130 void drawBackground(
bool draw);
136 void handleDisplayOptionEvent(
UI_Event *e);
139 void handleViewParameterEvent(
UI_Event *e);
165 bool resolve_aa =
true)
const;
167 bool resolve_aa =
true)
const;
173 int dst_layer)
const;
181 bool getBeautyPassHDR()
const;
182 void setBeautyPassConsolidate(
bool con);
213 bool wholy_contained,
225 bool enable_occlusion,
226 bool handle_pick_radius);
260 unsigned int xray_pickmask,
268 bool hide_selected,
bool enable_occlusion,
270 bool do_xray,
bool do_guides,
275 unsigned pickmask,
int gravity,
283 bool hide_selected,
bool enable_occlusion,
284 bool do_xray,
bool do_guides,
295 int pnt_rad,
int edge_rad,
int face_rad,
314 bool wholy_contained,
318 static void cleanupShaders();
323 void invalidatePickBuffers();
339 bool hover_decorations);
350 bool do_geometry_setup);
360 bool treat_uv_viewport_as_3d =
false,
370 bool floor = myDrawFloorTransientFlag;
371 myDrawFloorTransientFlag =
false;
376 {
return myFloorInterface.get(); }
380 DM_ViewportHooks &
hooks()
const {
return *myViewportHooks; }
383 {
return myNeedsOverlayRender; }
388 void handleLocateEvent(
UI_Event *e);
396 int getNumOpaqueObjects()
const;
399 int getNumTransparentObjects()
const;
402 int getNumUnlitObjects()
const;
405 int getNumXRayObjects()
const;
417 void markGeoSetup(
bool setup,
418 DM_Viewport *setup_port = NULL);
427 void cleanupLights();
430 {
return myMaterialLights; }
438 int64 getFramebufferUsageKB(
bool hdr,
bool hql,
bool trans,
443 void getZBufferTransform(
float zt[2],
RE_Light *light=NULL);
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;
502 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
504 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
509 {
return myDrawFloorTransientFlag; }
518 {
return mySceneManager; }
530 void renderToVulkanImages();
539 friend class dm_SetupTask;
545 DM_SceneManager &modeler()
546 {
return mySceneManager; }
548 const GUI_SceneLook *getLook()
const {
return mySceneLook.get(); }
549 GUI_SceneLook *getLook() {
return mySceneLook.get(); }
551 bool shouldDisplayObject(
const DM_Viewport &vport,
555 bool shouldVisualizeObject(
const DM_Viewport &vport,
571 const char* msg,
int line );
578 void renderCameraMessage(
RE_Render *ren,
int x,
int y,
587 bool hdr,
bool needs_aa);
588 void destroyBeautyPassBuffer();
597 bool snapshot_name =
false);
609 bool allow_smooth =
true);
613 void setGammaPass(
bool b) { myGammaPass = b?1:0; }
628 void destroySelectionBuffer();
633 bool isBeautyPassAA(
bool allow_aa =
true);
642 bool uniforms_for_3d);
643 void setupStereo3dForRightCamera(
RE_Render *
r,
644 bool uniforms_for_3d);
656 void destroyTransparentBuffers();
665 void renderCameraMaskOverlay(
RE_Render *,
int,
int);
667 void renderTransparentGeometry(
670 bool renderHQTransparencyPass(
674 bool for_xray =
false);
675 bool setupHQTransparentBuffers(
678 void destroyHQTransparentBuffers();
683 void destroyUnlitAlphaBuffer();
689 bool enable_occlusion,
690 unsigned int pickmask,
718 bool geo_ignore_depth,
720 bool floor_prioritize,
729 int filterPickData(
int32 *pick_base_data,
730 int32 *pick_component_data,
738 unsigned int pickmask,
752 unsigned int pickmask,
753 unsigned int xray_pickmask,
789 bool enable_occlusion,
790 unsigned int pickmask,
796 unsigned int snapmask,
797 unsigned int xray_snapmask,
801 bool enable_occlusion,
806 unsigned int pickmask,
812 unsigned int pickmask,
813 unsigned int xray_pickmask,
832 bool skip_obj_sel_looks,
833 bool skip_guide_looks,
834 bool skip_nonsnappable_looks,
835 bool skip_current_look);
839 bool skip_obj_sel_looks =
false,
840 bool skip_guide_looks =
false,
841 bool skip_nonsnappable_looks =
false,
842 bool skip_current_look =
false);
852 unsigned int snapmask,
856 bool enable_occlusion,
858 bool do_xray,
bool do_guides,
873 bool &needs_lighting);
881 int cubemap_unit)
const;
885 bool has_alpha_buffers);
887 void normalQualityRender(
901 void destroyOverlappingUVBuffer();
906 void destroyCoincidentBuffer();
910 exint start_subtracting_at,
916 void updateVisibleBoundariesAndViews(
int vis_display_sets);
930 int myBeautyPassSamples;
931 bool myBeautyPassHDR;
936 bool myTransparentHDR;
948 #ifdef USE_VULKAN // WIP: make private, and make heleper func
963 DM_RenderHighQuality *myHQRender;
964 DM_PostEffects *myPostEffects;
978 bool myHighQualityMode;
979 bool myNeedsXRayResolve;
982 bool myHasCascadingShadowLight;
983 bool myNeedsOverlayRender;
990 mutable unsigned int myDepthResolveShaderFailed : 1,
991 myZCompositeShaderFailed : 1;
995 bool myHasSelectionsShown;
996 bool myDrawFloorTransientFlag;
997 int myDecorLocateMask;
998 int myDecorVisibleMask;
1018 bool mySavedAntiAliasOption;
1020 DM_SceneManager &mySceneManager;
1021 DM_Viewport *myDisplay;
1038 DM_SnapBuffer *mySnapBuffer;
1039 bool mySnapHasValidData;
1067 int myDecorLocateRawPos[2];
1068 int myDecorLocatePos[2];
1074 bool myHQTransparentHDR;
1082 bool myRampUnitPushed;
1095 bool myUseHQLighting;
1096 bool myHasPerLookPickPriority;
1098 DM_ViewportHooks *myViewportHooks;
1101 int myCurrentObjectID;
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...
const UT_Array< RE_Light * > & getAllLights() const
**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
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
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
DM_FloorInterface * getFloorInterface()
Contains transitional objects to provide some backward compatibility for code that references old GEO...
GLfloat GLfloat GLfloat GLfloat h
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
void sort(I begin, I end, const Pred &pred)
DM_Viewport * getDisplay()
UT_UniquePtr< TIL_Raster > RasterPtr
GA_API const UT_StringHolder area
Simple interface to building a shader from a .prog file.