VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
makVrv::DtImguiDrawable Class Reference
Inheritance diagram for makVrv::DtImguiDrawable:
Inheritance graph
[legend]

Public Member Functions

 DtImguiDrawable (DtDe &de)
 
virtual ~DtImguiDrawable ()
 
virtual void drawImplementation (osg::RenderInfo &info) const
 
virtual void releaseGLObjects (osg::State *state) const
 
virtual void shutdown ()
 
virtual void addUI (DtImguiTweakUI *ui)
 
virtual void removeUI (DtImguiTweakUI *ui)
 
virtual bool readyToRender ()
 
virtual osg::observer_ptr
< osg::Camera > & 
mainCamera ()
 
virtual void setOverrideCamera (osg::Camera *camera)
 
virtual void setMouseX (double x)
 
virtual double mouseX () const
 
virtual void setMouseY (double y)
 
virtual double mouseY () const
 
virtual void setMousePressed (int button, bool pressed)
 
virtual bool mousePressed (int button) const
 
virtual void setMouseWheel (float wheel)
 
virtual float mouseWheel () const
 
virtual void AddInputCharacter (char character)
 
virtual float dpiScale ()
 
virtual void setDpiScale (float scale)
 
virtual void setRenderVirtualCursor (bool enable)
 

Static Public Member Functions

static DtImguiDrawablegetInstance (DtDe &de, DtOsgRenderer *renderer)
 
static DtImguiDrawablegetInstance ()
 
static void resetDpiScaling (DtDe &de, DtOsgRenderer *renderer)
 

Public Attributes

boost::signalslib::signal
< void(osg::RenderInfo &)> 
signal_imguiNewFrame
 

Protected Member Functions

virtual void initImGui ()
 
virtual bool createFontsTexture ()
 
virtual bool createDeviceObjects ()
 
virtual void invalidateDeviceObjects ()
 
virtual void newFrame (osg::RenderInfo &renderInfo)
 
virtual void renderDrawLists (ImDrawData *draw_data, osg::State *state)
 

Protected Attributes

DtDemyDe
 
std::vector< DtImguiTweakUI * > myUiArray
 
DtImGuiEventProcessormyEventProcessor
 
double myTime
 
bool myMousePressed [3]
 
float myMouseWheel
 
double myMouseX
 
double myMouseY
 
GLuint myFontTexture
 
int myShaderHandle
 
int myVertHandle
 
int myFragHandle
 
int myAttribLocationTex
 
int myAttribLocationProjMtx
 
int myAttribLocationPosition
 
int myAttribLocationUV
 
int myAttribLocationColor
 
unsigned int myVboHandle
 
unsigned int myVaoHandle
 
unsigned int myElementsHandle
 
int myInitialized
 
bool myMutableFirstFrame
 
DtGlContextWrapper * myContextIDWrapper
 
osg::observer_ptr< osg::Camera > myMainCamera
 
osg::observer_ptr< osg::Camera > myOverrideCamera
 
unsigned int myLastFrameNum
 
osg::ref_ptr< osg::BlendEquation > myBlendEquation
 
osg::ref_ptr< osg::BlendFunc > myBlendFunc
 
osg::ref_ptr< osg::BlendFunc > myVrBlendFunc
 
bool myLastHdrSetting
 
bool myRenderVirtualCursor
 
std::vector< charmyCharacters
 
float myDpiScale
 
NetworkMonitorGui * myOsgEarthNetworkMonitor
 

Static Protected Attributes

static DtImguiDrawabletheImguiInstance
 

Private Member Functions

 DtImguiDrawable (const DtImguiDrawable &other)
 
DtImguiDrawableoperator= (const DtImguiDrawable &other)
 

Constructor & Destructor Documentation

makVrv::DtImguiDrawable::DtImguiDrawable ( DtDe de)

CTOR.

virtual makVrv::DtImguiDrawable::~DtImguiDrawable ( )
virtual

DTOR.

makVrv::DtImguiDrawable::DtImguiDrawable ( const DtImguiDrawable other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

virtual void makVrv::DtImguiDrawable::drawImplementation ( osg::RenderInfo &  info) const
virtual

draws the imgui overlay

virtual void makVrv::DtImguiDrawable::releaseGLObjects ( osg::State *  state) const
virtual

frees resources on context release

virtual void makVrv::DtImguiDrawable::shutdown ( )
virtual

called by destructor

virtual void makVrv::DtImguiDrawable::addUI ( DtImguiTweakUI ui)
virtual

adds a updater object callback, only really used by shadow system

virtual void makVrv::DtImguiDrawable::removeUI ( DtImguiTweakUI ui)
virtual

removes an updater object callback, only really used by shadow system

virtual bool makVrv::DtImguiDrawable::readyToRender ( )
virtual

needs to be true, based on if system has a pointer to the main camera yet

virtual osg::observer_ptr<osg::Camera>& makVrv::DtImguiDrawable::mainCamera ( )
virtual

needed by the event processor

virtual void makVrv::DtImguiDrawable::setOverrideCamera ( osg::Camera *  camera)
virtual

set an override camera so we can draw after a particular camera/channel

virtual void makVrv::DtImguiDrawable::setMouseX ( double  x)
virtual

event processor helper function

virtual double makVrv::DtImguiDrawable::mouseX ( ) const
virtual
virtual void makVrv::DtImguiDrawable::setMouseY ( double  y)
virtual

event processor helper function

virtual double makVrv::DtImguiDrawable::mouseY ( ) const
virtual
virtual void makVrv::DtImguiDrawable::setMousePressed ( int  button,
bool  pressed 
)
virtual

event processor helper function

virtual bool makVrv::DtImguiDrawable::mousePressed ( int  button) const
virtual
virtual void makVrv::DtImguiDrawable::setMouseWheel ( float  wheel)
virtual

event processor helper function

virtual float makVrv::DtImguiDrawable::mouseWheel ( ) const
virtual
virtual void makVrv::DtImguiDrawable::AddInputCharacter ( char  character)
virtual

called by event handler for keyboard input

virtual float makVrv::DtImguiDrawable::dpiScale ( )
virtual

return the default dpi scale to use

virtual void makVrv::DtImguiDrawable::setDpiScale ( float  scale)
virtual

set the default dpi scale to use (typically set internally)

virtual void makVrv::DtImguiDrawable::setRenderVirtualCursor ( bool  enable)
virtual

render a virtual cursor when it is enabled. Currently only enabled by the scalable plugin. This allows us to interact with imgui even if the rendered view has been changed so the mouse is no longer in the place imgui thinks it is.

static DtImguiDrawable* makVrv::DtImguiDrawable::getInstance ( DtDe de,
DtOsgRenderer renderer 
)
static

Returns the DtImguiDrawable for an instance This function requires the DE to have a valid display. This function will create a DtImGuiDrawable for the instance, if needed.

static DtImguiDrawable* makVrv::DtImguiDrawable::getInstance ( )
static

Returns the DtImguiDrawable for an instance.

static void makVrv::DtImguiDrawable::resetDpiScaling ( DtDe de,
DtOsgRenderer renderer 
)
static

when switch displaymodes like VR we need to reset the DPI scaling

virtual void makVrv::DtImguiDrawable::initImGui ( )
protectedvirtual

init code

virtual bool makVrv::DtImguiDrawable::createFontsTexture ( )
protectedvirtual

init code

virtual bool makVrv::DtImguiDrawable::createDeviceObjects ( )
protectedvirtual

init code

virtual void makVrv::DtImguiDrawable::invalidateDeviceObjects ( )
protectedvirtual

shutdown code

virtual void makVrv::DtImguiDrawable::newFrame ( osg::RenderInfo &  renderInfo)
protectedvirtual

begin draw code

virtual void makVrv::DtImguiDrawable::renderDrawLists ( ImDrawData draw_data,
osg::State *  state 
)
protectedvirtual

actual draw code

DtImguiDrawable& makVrv::DtImguiDrawable::operator= ( const DtImguiDrawable other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

Member Data Documentation

boost::signalslib::signal<void(osg::RenderInfo&)> makVrv::DtImguiDrawable::signal_imguiNewFrame
DtDe& makVrv::DtImguiDrawable::myDe
protected
std::vector<DtImguiTweakUI*> makVrv::DtImguiDrawable::myUiArray
protected
DtImGuiEventProcessor* makVrv::DtImguiDrawable::myEventProcessor
protected
double makVrv::DtImguiDrawable::myTime
protected
bool makVrv::DtImguiDrawable::myMousePressed[3]
protected
float makVrv::DtImguiDrawable::myMouseWheel
protected
double makVrv::DtImguiDrawable::myMouseX
protected
double makVrv::DtImguiDrawable::myMouseY
protected
GLuint makVrv::DtImguiDrawable::myFontTexture
protected
int makVrv::DtImguiDrawable::myShaderHandle
protected
int makVrv::DtImguiDrawable::myVertHandle
protected
int makVrv::DtImguiDrawable::myFragHandle
protected
int makVrv::DtImguiDrawable::myAttribLocationTex
protected
int makVrv::DtImguiDrawable::myAttribLocationProjMtx
protected
int makVrv::DtImguiDrawable::myAttribLocationPosition
protected
int makVrv::DtImguiDrawable::myAttribLocationUV
protected
int makVrv::DtImguiDrawable::myAttribLocationColor
protected
unsigned int makVrv::DtImguiDrawable::myVboHandle
protected
unsigned int makVrv::DtImguiDrawable::myVaoHandle
protected
unsigned int makVrv::DtImguiDrawable::myElementsHandle
protected
int makVrv::DtImguiDrawable::myInitialized
protected
bool makVrv::DtImguiDrawable::myMutableFirstFrame
mutableprotected
DtGlContextWrapper* makVrv::DtImguiDrawable::myContextIDWrapper
protected
osg::observer_ptr<osg::Camera> makVrv::DtImguiDrawable::myMainCamera
protected
osg::observer_ptr<osg::Camera> makVrv::DtImguiDrawable::myOverrideCamera
protected
unsigned int makVrv::DtImguiDrawable::myLastFrameNum
protected
osg::ref_ptr<osg::BlendEquation> makVrv::DtImguiDrawable::myBlendEquation
protected
osg::ref_ptr<osg::BlendFunc> makVrv::DtImguiDrawable::myBlendFunc
protected
osg::ref_ptr<osg::BlendFunc> makVrv::DtImguiDrawable::myVrBlendFunc
protected
bool makVrv::DtImguiDrawable::myLastHdrSetting
protected
bool makVrv::DtImguiDrawable::myRenderVirtualCursor
protected
std::vector<char> makVrv::DtImguiDrawable::myCharacters
protected
float makVrv::DtImguiDrawable::myDpiScale
protected
NetworkMonitorGui* makVrv::DtImguiDrawable::myOsgEarthNetworkMonitor
protected
DtImguiDrawable* makVrv::DtImguiDrawable::theImguiInstance
staticprotected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)