15 #ifndef __DM_VPortAgent__
16 #define __DM_VPortAgent__
58 class DM_FloorInterface;
61 class DM_RenderHighQuality;
62 class DM_SceneManager;
65 class DM_ViewportHooks;
66 class DM_VPortComposite;
69 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;
186 bool getBeautyPassHDR()
const;
187 void setBeautyPassConsolidate(
bool con);
218 bool wholy_contained,
230 bool enable_occlusion,
231 bool handle_pick_radius);
265 unsigned int xray_pickmask,
273 bool hide_selected,
bool enable_occlusion,
275 bool do_xray,
bool do_guides,
280 unsigned pickmask,
int gravity,
288 bool hide_selected,
bool enable_occlusion,
289 bool do_xray,
bool do_guides,
300 int pnt_rad,
int edge_rad,
int face_rad,
310 void invalidatePickBuffers();
326 bool hover_decorations);
341 bool do_geometry_setup);
351 bool treat_uv_viewport_as_3d =
false,
361 bool floor = myDrawFloorTransientFlag;
362 myDrawFloorTransientFlag =
false;
367 {
return myFloorInterface.get(); }
371 DM_ViewportHooks &
hooks()
const {
return *myViewportHooks; }
374 {
return myNeedsOverlayRender; }
379 void handleLocateEvent(
UI_Event *e);
387 int getNumOpaqueObjects()
const;
390 int getNumTransparentObjects()
const;
393 int getNumUnlitObjects()
const;
396 int getNumXRayObjects()
const;
408 void markGeoSetup(
bool setup,
409 DM_Viewport *setup_port = NULL);
418 void cleanupLights();
421 {
return myMaterialLights; }
429 int64 getFramebufferUsageKB(
bool hdr,
bool hql,
bool trans,
434 void getZBufferTransform(
float zt[2],
RE_Light *light=NULL);
438 void handleNewGeometryEvent(
UI_Event *e);
448 const char *msg)
const;
464 int64 getSceneVersion(
fpreal t,
bool shadow,
bool &timedep);
476 void updateTimeDependentLook(
fpreal t);
478 bool isToolbarLinked()
const;
493 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
495 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
500 {
return myDrawFloorTransientFlag; }
509 {
return mySceneManager; }
521 void renderToVulkanImages();
529 #ifdef VULKAN_PRESENTATION
547 DM_RenderVulkan *vkRender() {
return myVKRender.get(); }
551 friend class dm_SetupTask;
557 DM_SceneManager &modeler()
558 {
return mySceneManager; }
560 const GUI_SceneLook *getLook()
const {
return mySceneLook.get(); }
561 GUI_SceneLook *getLook() {
return mySceneLook.get(); }
563 bool shouldDisplayObject(
const DM_Viewport &vport,
567 bool shouldVisualizeObject(
const DM_Viewport &vport,
583 const char* msg,
int line );
590 void renderCameraMessage(
RE_Render *ren,
int x,
int y,
599 bool hdr,
bool needs_aa);
600 void destroyBeautyPassBuffer();
609 bool snapshot_name =
false);
621 bool allow_smooth =
true);
625 void setGammaPass(
bool b) { myGammaPass = b?1:0; }
640 void destroySelectionBuffer();
645 bool isBeautyPassAA(
bool allow_aa =
true);
655 bool uniforms_for_3d);
656 void setupStereo3dForRightCamera(
RE_Render *
r,
657 bool uniforms_for_3d);
669 void destroyTransparentBuffers();
676 bool use_color_buffer_for_depth);
678 void destroyCompositeBuffers();
687 void renderCameraMaskOverlay(
RE_Render *,
int,
int);
689 void renderTransparentGeometry(
693 bool renderHQTransparencyPass(
697 bool for_xray =
false);
698 bool setupHQTransparentBuffers(
701 void destroyHQTransparentBuffers();
706 void destroyUnlitAlphaBuffer();
712 bool enable_occlusion,
713 unsigned int pickmask,
741 bool geo_ignore_depth,
743 bool floor_prioritize,
752 int filterPickData(
int32 *pick_base_data,
753 int32 *pick_component_data,
761 unsigned int pickmask,
775 unsigned int pickmask,
776 unsigned int xray_pickmask,
807 bool wholy_contained,
821 bool enable_occlusion,
822 unsigned int pickmask,
828 unsigned int snapmask,
829 unsigned int xray_snapmask,
833 bool enable_occlusion,
838 unsigned int pickmask,
844 unsigned int pickmask,
845 unsigned int xray_pickmask,
864 bool skip_obj_sel_looks,
865 bool skip_guide_looks,
866 bool skip_nonsnappable_looks,
867 bool skip_current_look);
871 bool skip_obj_sel_looks =
false,
872 bool skip_guide_looks =
false,
873 bool skip_nonsnappable_looks =
false,
874 bool skip_current_look =
false);
884 unsigned int snapmask,
888 bool enable_occlusion,
890 bool do_xray,
bool do_guides,
905 bool &needs_lighting);
913 int cubemap_unit)
const;
916 bool skip_postprocessing =
false);
918 void normalQualityRender(
932 void destroyOverlappingUVBuffer();
937 void destroyCoincidentBuffer();
941 exint start_subtracting_at,
947 void updateVisibleBoundariesAndViews(
int vis_display_sets);
961 int myBeautyPassSamples;
962 bool myBeautyPassHDR;
967 bool myTransparentHDR;
987 #ifdef USE_VULKAN // WIP: make private, and make heleper func
1004 DM_RenderHighQuality *myHQRender;
1005 DM_PostEffects *myPostEffects;
1015 bool myIsBeautyPass;
1018 bool myUseUnlitMask;
1019 bool myHighQualityMode;
1020 bool myNeedsXRayResolve;
1023 bool myHasCascadingShadowLight;
1024 bool myNeedsOverlayRender;
1029 bool myHasTransparencyPass =
false;
1030 bool myHasAlphaBuffers =
false;
1033 mutable unsigned int myDepthResolveShaderFailed : 1,
1034 myZCompositeShaderFailed : 1;
1038 bool myHasSelectionsShown;
1039 bool myDrawFloorTransientFlag;
1040 int myDecorLocateMask;
1041 int myDecorVisibleMask;
1061 bool mySavedAntiAliasOption;
1063 DM_SceneManager &mySceneManager;
1064 DM_Viewport *myDisplay;
1081 DM_SnapBuffer *mySnapBuffer;
1082 bool mySnapHasValidData;
1111 int myDecorLocateRawPos[2];
1112 int myDecorLocatePos[2];
1118 bool myHQTransparentHDR;
1126 bool myRampUnitPushed;
1139 bool myUseHQLighting;
1140 bool myHasPerLookPickPriority;
1142 DM_ViewportHooks *myViewportHooks;
1145 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...
PUGI__FN void sort(I begin, I end, const Pred &pred)
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
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
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.