![]() |
SLProject 4.0.000
|
Wrapper around Oculus Rift and its Frame Buffer Objects. More...
#include <SLGLOculusFB.h>
Public Member Functions | |
| SLGLOculusFB () | |
| ~SLGLOculusFB () | |
| void | bindFramebuffer (SLint scrWidth, SLint scrHeight) |
| void | drawFramebuffer (SLGLProgram *stereoOculusProgram) |
| void | updateSize (SLint scrWidth, SLint scrHeight) |
| SLint | width () |
| SLint | halfWidth () |
| SLint | height () |
| SLuint | texID () |
Private Member Functions | |
| void | dispose () |
| void | generateFBO () |
Private Attributes | |
| SLint | _width |
| SLint | _height |
| Width of the buffer. More... | |
| SLint | _halfWidth |
| Height of the buffer. More... | |
| SLint | _halfHeight |
| Half the width of the buffer. More... | |
| SLuint | _fbID |
| Half the height of the buffer. More... | |
| SLuint | _depthRbID |
| OpenGL id of frame buffer. More... | |
| SLuint | _texID |
| OpenGL id of depth render buffer. More... | |
| SLGLVertexArray | _vao |
| OpenGL id of. More... | |
Wrapper around Oculus Rift and its Frame Buffer Objects.
This class is deprecated since the lib_ovr from Oculus completely changed The lib_ovr that connects the Oculus hardware was removed since it only worked for devkit2 under windows.
| SLGLOculusFB::SLGLOculusFB | ( | ) |
Constructor initializing with default values
| SLGLOculusFB::~SLGLOculusFB | ( | ) |
Destructor calling dispose
Activates the frame buffer. On the first time it calls the updateSize to determine the size and then creates the FBO.
|
private |
Deletes the buffer object
| void SLGLOculusFB::drawFramebuffer | ( | SLGLProgram * | stereoOculusProgram | ) |
Draws the intermediate render target (the texture) into the real framebuffer.
|
private |
Frame Buffer generation. This is called from within updateSize because the frame buffer size has to be calculated first
|
inline |
|
inline |
|
inline |
Updates everything when the screen gets resized:
|
inline |
|
private |
OpenGL id of frame buffer.
|
private |
Half the height of the buffer.
|
private |
Half the width of the buffer.
|
private |
Height of the buffer.
|
private |
Width of the buffer.
|
private |
OpenGL id of depth render buffer.
|
private |
OpenGL id of.
|
private |