![]() |
VR-Forces 4.8 Class Documentation
|
A helper classes for creating a RTT target, optionally including depth buffer. More...
Public Member Functions | |
| DtGlRenderTexture (const std::string &name, int width, int height, int samples=0, int layers=1, bool useMultiView=false) | |
| create a RTT with a given name, with a given height and width if number of samples is greater than 0 then it will use a multisample render buffer More... | |
| virtual | ~DtGlRenderTexture () |
| DTOR. More... | |
| virtual bool | init (DtGlImageType colorFormat=RGB32F, GLenum minFilter=GL_LINEAR, GLenum wrapMode=GL_CLAMP_TO_EDGE) |
| initialize the RTT with a texture format and sampling/wrapping hints More... | |
| virtual bool | init (unsigned int glColorTexId) |
| Initialize the RTT color from an existing OpenGL Texture. More... | |
| virtual bool | initDepth (DtGlImageType depthFormat=D32) |
| Optionally create a depth texture to go with the RTT that is bound when drawing into. More... | |
| virtual bool | initDepth (unsigned int glDepthTexId) |
| Initialize depth texture from an existing OpenGL texture. More... | |
| virtual void | activateForDrawingInto (bool shouldClear=true, bool setViewport=true) |
| activate this RTT for drawing into. Binds the internal FBO and color/depth targets More... | |
| virtual void | copyFromFramebuffer (unsigned int srcFbo, unsigned int bufferBits) |
| copy the framebuffer specified by srcFbo into the textures in this object. More... | |
| virtual void | copyFromTexture (unsigned int srcTexture, bool isDepth, bool isArray=false, unsigned int srclayer=0, unsigned int layerCount=1) |
| copy the srcTexture into our color texture or depth texture if isDepth is true. More... | |
| virtual void | deactivateForDrawingInto () |
| deactivates the RTT More... | |
| virtual void | bindColorTexture (int unit) |
| bind the color texture to a given texture unit for use as a source texture for rendering More... | |
| virtual void | bindDepthTexture (int unit) |
| bind the depth texture, if it exists, to a given texture unit for use as a source for rendering More... | |
| virtual void | unbindColorTexture (int unit) |
| unbind the color texture (set the currently bound texture to 0 for the specified unit More... | |
| virtual void | unbindDepthTexture (int unit) |
| unbind the depth texture (set the currently bound texture to 0 for the specified unit More... | |
| virtual int | width () const |
| returns width of the RTT More... | |
| virtual int | height () const |
| returns height of the RTT More... | |
| virtual int | layers () const |
| returns layers of the RTT More... | |
| virtual unsigned int | colorId () const |
| returns the OpenGL texture id of the color texture. Must be initialized first otherwise it will return 0. More... | |
| virtual unsigned int | depthId () const |
| returns the OpenGL texture id of the depth texture. Must be initialized first otherwise it will return 0. More... | |
| virtual int | numSamples () const |
| returns the number of multi samples to use with this render to texture More... | |
| virtual bool | useMultiView () const |
| return weather or not multiview is being used More... | |
| virtual bool | usingStencil () const |
| return true if there's a depth texture and it's using a packed stencil format More... | |
| virtual void | setDeleteFbosOnDestruction (bool val) |
| virtual bool | deleteFbosOnDestruction (void) const |
| virtual unsigned int | fbo (void) const |
| virtual unsigned int | multiSampleFbo (void) const |
Protected Member Functions | |
| virtual void | initFBO (const std::string &name) |
| virtual GLenum | getGLInternalTypes (DtGlImageType colorType) |
Private Member Functions | |
| DtGlRenderTexture () | |
| private default constructor More... | |
| DtGlRenderTexture (const DtGlRenderTexture &) | |
| prevent copy-construction More... | |
| DtGlRenderTexture & | operator= (const DtGlRenderTexture &) |
| prevent assignment More... | |
A helper classes for creating a RTT target, optionally including depth buffer.
|
private |
private default constructor
|
private |
prevent copy-construction
| makVrv::DtGlRenderTexture::DtGlRenderTexture | ( | const std::string & | name, |
| int | width, | ||
| int | height, | ||
| int | samples = 0, |
||
| int | layers = 1, |
||
| bool | useMultiView = false |
||
| ) |
create a RTT with a given name, with a given height and width if number of samples is greater than 0 then it will use a multisample render buffer
|
virtual |
DTOR.
|
private |
prevent assignment
|
virtual |
initialize the RTT with a texture format and sampling/wrapping hints
Initialize the RTT color from an existing OpenGL Texture.
Assumes the texture sampling and wrapping hints have already been setup. If DtGlRenderTexture was created with multiple samples, this texture needs to match.
|
virtual |
Optionally create a depth texture to go with the RTT that is bound when drawing into.
Initialize depth texture from an existing OpenGL texture.
Assumes the texture sampling and wrapping hints have already been setup.
|
virtual |
activate this RTT for drawing into. Binds the internal FBO and color/depth targets
|
virtual |
copy the framebuffer specified by srcFbo into the textures in this object.
buffer bits are the GL mask of which buffers to copy (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT for example)
|
virtual |
copy the srcTexture into our color texture or depth texture if isDepth is true.
|
virtual |
deactivates the RTT
|
virtual |
bind the color texture to a given texture unit for use as a source texture for rendering
|
virtual |
bind the depth texture, if it exists, to a given texture unit for use as a source for rendering
|
virtual |
unbind the color texture (set the currently bound texture to 0 for the specified unit
|
virtual |
unbind the depth texture (set the currently bound texture to 0 for the specified unit
|
virtual |
returns width of the RTT
|
virtual |
returns height of the RTT
|
virtual |
returns layers of the RTT
returns the OpenGL texture id of the color texture. Must be initialized first otherwise it will return 0.
returns the OpenGL texture id of the depth texture. Must be initialized first otherwise it will return 0.
|
virtual |
returns the number of multi samples to use with this render to texture
|
virtual |
return weather or not multiview is being used
|
virtual |
return true if there's a depth texture and it's using a packed stencil format
|
virtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |