42 #ifndef vtkOpenVRRenderWindow_h
43 #define vtkOpenVRRenderWindow_h
45 #include "vtkRenderingOpenVRModule.h"
46 #include "vtkOpenGLRenderWindow.h"
48 #define SDL_MAIN_HANDLED
183 vr::IVRSystem *
GetHMD() {
return this->HMD; };
200 {
return this->LeftEyeDesc.m_nRenderFramebufferId; };
202 {
return this->LeftEyeDesc.m_nResolveFramebufferId; };
204 {
return this->RightEyeDesc.m_nRenderFramebufferId; };
206 {
return this->RightEyeDesc.m_nResolveFramebufferId; };
208 width = this->RenderWidth;
height = this->RenderHeight; };
221 return this->TrackedDevicePose[idx]; };
274 vr::TrackedDeviceIndex_t unDevice,
275 vr::TrackedDeviceProperty prop,
276 vr::TrackedPropertyError *peError = NULL );
283 vtkOpenVRModel *TrackedDeviceToRenderModel[ vr::k_unMaxTrackedDeviceCount ];
284 vr::TrackedDevicePose_t TrackedDevicePose[ vr::k_unMaxTrackedDeviceCount ];
a simple class to control print indentation
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
GLuint GetRightResolveBufferId()
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
void SetParentInfo(char *)
void HideCursor()
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
void SetupDistortion()
Handle lens distortion.
virtual bool IsCurrent()
Tells if this window is the current OpenGL context for the calling thread.
void Clean()
Clean up device contexts, rendering contexts, etc.
void Frame(void)
End the rendering process and display the image.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void DestroyWindow()
Destroy a not-off-screen window.
bool CreateFrameBuffer(int nWidth, int nHeight, FramebufferDesc &framebufferDesc)
virtual void ReleaseGraphicsResources(vtkRenderWindow *)
Free up any graphics resources associated with this window a value of NULL means the context may alre...
virtual void StereoUpdate()
Update the system, if needed, due to stereo rendering.
vr::TrackedDevicePose_t & GetTrackedDevicePose(vr::TrackedDeviceIndex_t idx)
Get the most recent pose of any tracked devices.
virtual void CreateAWindow()
Create a not-off-screen window.
virtual void Finalize(void)
Finalize the rendering window.
void Render()
Overridden to not release resources that would interfere with an external application's rendering.
void UpdateHMDMatrixPose()
Update the HMD pose.
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
virtual void SetPosition(int, int)
Set the position of the window.
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
std::vector< vtkOpenVRModel * > VTKRenderModels
virtual void Start(void)
Begin the rendering process.
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
FramebufferDesc RightEyeDesc
static vtkOpenVRRenderWindow * New()
GLuint GetRightRenderBufferId()
virtual void StereoMidpoint()
Intermediate method performs operations required between the rendering of the left and right eye.
virtual void WindowRemap(void)
Remap the rendering window.
vtkOpenGLHelper Distortion
virtual void * GetGenericParentId()
virtual void SetPosition(int a[2])
GLuint GetLeftResolveBufferId()
virtual void SetFullScreen(int)
Turn on/off rendering full screen window size.
virtual void SetNextWindowId(void *)
virtual void * GetGenericDrawable()
virtual void * GetGenericContext()
virtual void Initialize(void)
Initialize the rendering window.
vtkTransform * HMDTransform
std::string GetTrackedDeviceString(vr::IVRSystem *pHmd, vr::TrackedDeviceIndex_t unDevice, vr::TrackedDeviceProperty prop, vr::TrackedPropertyError *peError=NULL)
void MakeCurrent()
Make this windows OpenGL context the current context.
vtkOpenGLVertexBufferObject * DistortionVBO
virtual void * GetGenericDisplayId()
const char * ReportCapabilities()
Get report of capabilities for the render window.
virtual void SetSize(int, int)
Set the size of the window in pixels.
virtual int GetEventPending()
Check to see if a mouse button has been pressed or mouse wheel activated.
void SetNextWindowInfo(char *)
vr::IVRSystem * GetHMD()
Get the system pointer.
GLuint GetLeftRenderBufferId()
Get the frame buffers used for rendering.
vtkOpenVRModel * FindOrLoadRenderModel(const char *modelName)
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
virtual void * GetGenericWindowId()
void GetRenderBufferSize(int &width, int &height)
virtual int * GetScreenSize()
Get the current size of the screen in pixels.
void SetWindowInfo(char *)
FramebufferDesc LeftEyeDesc
vr::IVRRenderModels * OpenVRRenderModels
create a window for renderers to draw into
virtual void SetPosition(int, int)
GLuint m_nRenderFramebufferId
GLuint m_nRenderTextureId
GLuint m_nResolveTextureId
GLuint m_nResolveFramebufferId