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);
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);
368 {
return myFloorInterface; }
372 DM_ViewportHooks &
hooks()
const {
return *myViewportHooks; }
375 {
return myNeedsOverlayRender; }
380 void handleLocateEvent(
UI_Event *e);
388 int getNumOpaqueObjects()
const;
391 int getNumTransparentObjects()
const;
394 int getNumUnlitObjects()
const;
397 int getNumXRayObjects()
const;
409 void markGeoSetup(
bool setup,
410 DM_Viewport *setup_port = NULL);
422 {
return myMaterialLights; }
430 int64 getFramebufferUsageKB(
bool hdr,
bool hql,
bool trans,
435 void getZBufferTransform(
float zt[2],
RE_Light *light=NULL);
439 void handleNewGeometryEvent(
UI_Event *e);
449 const char *msg)
const;
465 int64 getSceneVersion(
fpreal t,
bool shadow,
bool &timedep);
477 void updateTimeDependentLook(
fpreal t);
479 bool isToolbarLinked()
const;
492 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
494 static bool shouldHideAsViewCamObject(
const DM_Viewport &vport,
499 {
return myDrawFloorTransientFlag; }
508 {
return mySceneManager; }
519 friend class dm_SetupTask;
525 DM_SceneManager &modeler()
526 {
return mySceneManager; }
528 const GUI_SceneLook *getLook()
const {
return mySceneLook.get(); }
529 GUI_SceneLook *getLook() {
return mySceneLook.get(); }
531 bool shouldDisplayObject(
const DM_Viewport &vport,
535 bool shouldVisualizeObject(
const DM_Viewport &vport,
551 const char* msg,
int line );
558 void renderCameraMessage(
RE_Render *ren,
int x,
int y,
567 bool hdr,
bool needs_aa);
568 void destroyBeautyPassBuffer();
577 bool snapshot_name =
false);
589 bool allow_smooth =
true);
593 void setGammaPass(
bool b) { myGammaPass = b?1:0; }
608 void destroySelectionBuffer();
613 bool isBeautyPassAA(
bool allow_aa =
true);
622 bool uniforms_for_3d);
623 void setupStereo3dForRightCamera(
RE_Render *
r,
624 bool uniforms_for_3d);
636 void destroyTransparentBuffers();
645 void renderCameraMaskOverlay(
RE_Render *,
int,
int);
647 void renderTransparentGeometry(
650 bool renderHQTransparencyPass(
654 bool for_xray =
false);
655 bool setupHQTransparentBuffers(
658 void destroyHQTransparentBuffers();
663 void destroyUnlitAlphaBuffer();
669 bool enable_occlusion,
670 unsigned int pickmask,
698 bool geo_ignore_depth,
700 bool floor_prioritize,
709 int filterPickData(
int32 *pick_base_data,
710 int32 *pick_component_data,
718 unsigned int pickmask,
732 unsigned int pickmask,
733 unsigned int xray_pickmask,
769 bool enable_occlusion,
770 unsigned int pickmask,
776 unsigned int snapmask,
777 unsigned int xray_snapmask,
781 bool enable_occlusion,
786 unsigned int pickmask,
792 unsigned int pickmask,
793 unsigned int xray_pickmask,
812 bool skip_obj_sel_looks,
813 bool skip_guide_looks,
814 bool skip_nonsnappable_looks,
815 bool skip_current_look);
819 bool skip_obj_sel_looks =
false,
820 bool skip_guide_looks =
false,
821 bool skip_nonsnappable_looks =
false,
822 bool skip_current_look =
false);
832 unsigned int snapmask,
836 bool enable_occlusion,
838 bool do_xray,
bool do_guides,
853 bool &needs_lighting);
861 int cubemap_unit)
const;
865 bool has_alpha_buffers);
867 void normalQualityRender(
881 void destroyOverlappingUVBuffer();
886 void destroyCoincidentBuffer();
890 exint start_subtracting_at,
896 void updateVisibleBoundariesAndViews(
int vis_display_sets);
910 int myBeautyPassSamples;
911 bool myBeautyPassHDR;
916 bool myTransparentHDR;
928 #ifdef USE_VULKAN // WIP: make private, and make heleper func
943 DM_RenderHighQuality *myHQRender;
944 DM_PostEffects *myPostEffects;
958 bool myHighQualityMode;
959 bool myNeedsXRayResolve;
962 bool myHasCascadingShadowLight;
963 bool myNeedsOverlayRender;
970 mutable unsigned int myDepthResolveShaderFailed : 1,
971 myZCompositeShaderFailed : 1;
973 DM_FloorInterface *myFloorInterface;
975 bool myHasSelectionsShown;
976 bool myDrawFloorTransientFlag;
977 int myDecorLocateMask;
978 int myDecorVisibleMask;
998 bool mySavedAntiAliasOption;
1000 DM_SceneManager &mySceneManager;
1001 DM_Viewport *myDisplay;
1018 DM_SnapBuffer *mySnapBuffer;
1019 bool mySnapHasValidData;
1043 int myDecorLocateRawPos[2];
1044 int myDecorLocatePos[2];
1050 bool myHQTransparentHDR;
1058 bool myRampUnitPushed;
1071 bool myUseHQLighting;
1072 bool myHasPerLookPickPriority;
1074 DM_ViewportHooks *myViewportHooks;
1077 int myCurrentObjectID;
GLsizei GLenum const void * indices
void requestDraw()
Request a deferred redraw.
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
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.