Go to the documentation of this file.
42 #ifndef vtkOpenVRRenderWindow_h
43 #define vtkOpenVRRenderWindow_h
45 #include "vtkRenderingOpenVRModule.h"
46 #include "vtkOpenGLRenderWindow.h"
48 #define SDL_MAIN_HANDLED
69 virtual void Start(
void);
183 vr::IVRSystem *
GetHMD() {
return this->HMD; };
188 void UpdateHMDMatrixPose();
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]; };
236 SDL_Window *WindowId;
253 bool CreateFrameBuffer(
int nWidth,
int nHeight,
265 void SetupDistortion();
266 void RenderDistortion();
274 vr::TrackedDeviceIndex_t unDevice,
275 vr::TrackedDeviceProperty prop,
276 vr::TrackedPropertyError *peError = NULL );
280 vtkOpenVRModel *FindOrLoadRenderModel(
const char *modelName );
283 vtkOpenVRModel *TrackedDeviceToRenderModel[ vr::k_unMaxTrackedDeviceCount ];
284 vr::TrackedDevicePose_t TrackedDevicePose[ vr::k_unMaxTrackedDeviceCount ];
void GetRenderBufferSize(int &width, int &height)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Start()=0
Initialize the rendering process.
GLuint GetLeftResolveBufferId()
virtual void StereoRenderComplete()
Handles work required once both views have been rendered when using stereo rendering.
virtual void * GetGenericParentId()
GLuint m_nRenderFramebufferId
const char * ReportCapabilities()
Get report of capabilities for the render window.
vtkTransform * HMDTransform
void SetNextWindowInfo(char *)
virtual void Finalize()=0
Finalize the rendering process.
virtual int * GetScreenSize()=0
Get the current size of the screen in pixels.
virtual bool IsCurrent()=0
Tells if this window is the current graphics context for the calling thread.
GLuint m_nRenderTextureId
std::vector< vtkOpenVRModel * > VTKRenderModels
vr::TrackedDevicePose_t & GetTrackedDevicePose(vr::TrackedDeviceIndex_t idx)
Get the most recent pose of any tracked devices.
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
FramebufferDesc LeftEyeDesc
void SetParentInfo(char *)
virtual void StereoMidpoint()
Intermediate method performs operations required between the rendering of the left and right eye.
virtual void * GetGenericDrawable()
GLuint GetRightRenderBufferId()
GLuint GetLeftRenderBufferId()
Get the frame buffers used for rendering.
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
virtual void Render()
Ask each renderer owned by this RenderWindow to render its image and synchronize this process.
virtual void * GetGenericContext()
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
GLuint GetRightResolveBufferId()
a simple class to control print indentation
virtual void * GetGenericDisplayId()
virtual void StereoUpdate()
Update system if needed due to stereo rendering.
virtual void SetPosition(int a[2])
virtual void SetFullScreen(int)
Turn on/off rendering full screen window size.
virtual void * GetGenericWindowId()
vr::IVRSystem * GetHMD()
Get the system pointer.
virtual void SetNextWindowId(void *)
vr::IVRRenderModels * OpenVRRenderModels
virtual void CreateAWindow()
Create a not-off-screen window.
virtual int GetEventPending()
Check to see if a mouse button has been pressed or mouse wheel activated.
void SetWindowInfo(char *)
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
virtual void MakeCurrent()=0
Attempt to make this window the current graphics context for the calling thread.
virtual void ReleaseGraphicsResources(vtkRenderWindow *)
Free up any graphics resources associated with this window a value of NULL means the context may alre...
virtual void DestroyWindow()=0
Destroy a not-off-screen window.
virtual void WindowRemap(void)
Remap the rendering window.
vtkOpenGLVertexBufferObject * DistortionVBO
create a window for renderers to draw into
vtkOpenGLHelper Distortion
virtual void SetPosition(int, int)
virtual void Frame()=0
A termination method performed at the end of the rendering process to do things like swapping buffers...
static vtkRenderWindow * New()
Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on,...
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...
GLuint m_nResolveTextureId
virtual void Initialize(void)
Initialize the rendering window.
FramebufferDesc RightEyeDesc
GLuint m_nResolveFramebufferId
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.