OpenInventor Scenes can be rendered to the OffscreenRender who outputs an MLImage.
More...
#include <mlOffscreenRender.h>
|
enum | ImageType { IMG_RGB = 0
, IMG_RGBA
, IMG_RGBA_FLOAT
, NUM_IMAGE_TYPES
} |
| Macro for declaring methods for the runtime system, defined in mlRuntimeSubClass.h. More...
|
|
enum | TransparencyType {
SCREEN_DOOR = SoGLRenderAction::SCREEN_DOOR
, ADD = SoGLRenderAction::ADD
, DELAYED_ADD = SoGLRenderAction::DELAYED_ADD
, SORTED_OBJECT_ADD = SoGLRenderAction::SORTED_OBJECT_ADD
,
BLEND = SoGLRenderAction::BLEND
, DELAYED_BLEND = SoGLRenderAction::DELAYED_BLEND
, SORTED_OBJECT_BLEND = SoGLRenderAction::SORTED_OBJECT_BLEND
, NUM_TRANSPARENCY_TYPES
} |
|
enum | BufferType { AUTO
, PIXEL_BUFFER
, NUM_BUFFER_TYPES
} |
|
OpenInventor Scenes can be rendered to the OffscreenRender who outputs an MLImage.
Definition at line 42 of file mlOffscreenRender.h.
◆ BufferType
◆ ImageType
Macro for declaring methods for the runtime system, defined in mlRuntimeSubClass.h.
Image types
Enumerator |
---|
IMG_RGB | |
IMG_RGBA | |
IMG_RGBA_FLOAT | |
NUM_IMAGE_TYPES | |
Definition at line 50 of file mlOffscreenRender.h.
◆ TransparencyType
Enumerator |
---|
SCREEN_DOOR | |
ADD | |
DELAYED_ADD | |
SORTED_OBJECT_ADD | |
BLEND | |
DELAYED_BLEND | |
SORTED_OBJECT_BLEND | |
NUM_TRANSPARENCY_TYPES | |
Definition at line 58 of file mlOffscreenRender.h.
◆ OffscreenRenderer()
ml::OffscreenRenderer::OffscreenRenderer |
( |
ImageType | imgType = IMG_RGB, |
|
|
const Vector2 & | size = Vector2(64., 64.), |
|
|
int | numInputImages = 0, |
|
|
int | numOutputImages = 1 ) |
◆ ~OffscreenRenderer()
ml::OffscreenRenderer::~OffscreenRenderer |
( |
| ) |
|
|
override |
◆ _activateOffscreenBuffer()
bool ml::OffscreenRenderer::_activateOffscreenBuffer |
( |
| ) |
|
|
protected |
◆ _createFBO()
bool ml::OffscreenRenderer::_createFBO |
( |
const SbVec2s & | | ) |
|
|
protected |
◆ _createOffscreenBuffer()
bool ml::OffscreenRenderer::_createOffscreenBuffer |
( |
| ) |
|
|
protected |
◆ _createPBuffer()
bool ml::OffscreenRenderer::_createPBuffer |
( |
const SbVec2s & | | ) |
|
|
protected |
Creates the pixel buffer.
◆ _deactivateOffscreenBuffer()
void ml::OffscreenRenderer::_deactivateOffscreenBuffer |
( |
| ) |
|
|
protected |
◆ _render()
bool ml::OffscreenRenderer::_render |
( |
bool & | hasSceneAndUpdatedBuffer | ) |
|
|
protected |
◆ _renderToOutImage()
bool ml::OffscreenRenderer::_renderToOutImage |
( |
bool & | hasSceneAndUpdatedBuffer | ) |
|
|
protected |
Render the scene and write it to a main memory buffer. Returns true on success, false otherwise.
◆ _resetOffscreenBuffer()
void ml::OffscreenRenderer::_resetOffscreenBuffer |
( |
| ) |
|
|
protected |
◆ _setMode()
void ml::OffscreenRenderer::_setMode |
( |
| ) |
|
|
protected |
Sets the mode of the pixel buffer according to _curImgType.
◆ _updateBufferType()
void ml::OffscreenRenderer::_updateBufferType |
( |
| ) |
|
|
protected |
◆ activateAttachments()
void ml::OffscreenRenderer::activateAttachments |
( |
| ) |
|
|
override |
◆ calculateOutputImageProperties()
void ml::OffscreenRenderer::calculateOutputImageProperties |
( |
int | outputIndex, |
|
|
PagedImage * | outputImage ) |
|
override |
Determine properties of output image.
◆ calculateOutputSubImage()
void ml::OffscreenRenderer::calculateOutputSubImage |
( |
SubImage * | outSubImg, |
|
|
int | outIndex, |
|
|
SubImage * | inSubImgs ) |
|
override |
Called when a page is calculated.
◆ handleNotification()
void ml::OffscreenRenderer::handleNotification |
( |
Field * | | ) |
|
|
override |
Called when input changes.
◆ takeMemoryImage()
void * ml::OffscreenRenderer::takeMemoryImage |
( |
| ) |
|
Returns the current memory image and creates a new one. The ownership is passed to the caller.
◆ _bgColorFld
ColorField* ml::OffscreenRenderer::_bgColorFld |
|
protected |
◆ _bufferTypeFld
EnumField* ml::OffscreenRenderer::_bufferTypeFld |
|
protected |
◆ _bufferUpToDate
bool ml::OffscreenRenderer::_bufferUpToDate |
|
protected |
◆ _colorFormat
GLenum ml::OffscreenRenderer::_colorFormat |
|
protected |
◆ _colorTextureBuffer
SoGLTexture* ml::OffscreenRenderer::_colorTextureBuffer |
|
protected |
◆ _createStencilBufferFld
BoolField* ml::OffscreenRenderer::_createStencilBufferFld |
|
protected |
◆ _curImgType
The image type of the pBuffer. This is not necessarily identical to the value of _imageTypeFld!
Definition at line 158 of file mlOffscreenRender.h.
◆ _depthComponent
GLuint ml::OffscreenRenderer::_depthComponent |
|
protected |
The depth component actually used. May differ from requested, cause gfx card does not support it.
Definition at line 169 of file mlOffscreenRender.h.
◆ _depthRenderBuffer
SoGLRenderbuffer* ml::OffscreenRenderer::_depthRenderBuffer |
|
protected |
◆ _enableMultiSampling
BoolField* ml::OffscreenRenderer::_enableMultiSampling |
|
protected |
◆ _fbo
SoGLFramebufferObject* ml::OffscreenRenderer::_fbo |
|
protected |
The frame buffer object, is used instead of the pBuffer if available.
Definition at line 161 of file mlOffscreenRender.h.
◆ _fboSupportsNonPowerOfTwoDimensions
bool ml::OffscreenRenderer::_fboSupportsNonPowerOfTwoDimensions |
|
protected |
◆ _frameBufferCompletionTested
bool ml::OffscreenRenderer::_frameBufferCompletionTested |
|
protected |
Flag that indicates that the current color/depth/stencil buffer configuration has been checked and works.
Definition at line 167 of file mlOffscreenRender.h.
◆ _glRenderAction
SoGLRenderAction* ml::OffscreenRenderer::_glRenderAction |
|
protected |
The GL render action needed to traverse the scene attached to this module.
Definition at line 144 of file mlOffscreenRender.h.
◆ _imageTypeFld
EnumField* ml::OffscreenRenderer::_imageTypeFld |
|
protected |
◆ _memImage
unsigned char* ml::OffscreenRenderer::_memImage |
|
protected |
Pointer to memory allocated to hold the content of the offscreen buffer.
Definition at line 176 of file mlOffscreenRender.h.
◆ _memImgBytes
unsigned int ml::OffscreenRenderer::_memImgBytes |
|
protected |
◆ _mode
int ml::OffscreenRenderer::_mode |
|
protected |
◆ _msaaColorBuffer
SoGLRenderbuffer* ml::OffscreenRenderer::_msaaColorBuffer |
|
protected |
◆ _msaaFbo
SoGLFramebufferObject* ml::OffscreenRenderer::_msaaFbo |
|
protected |
◆ _multiSampling
IntField* ml::OffscreenRenderer::_multiSampling |
|
protected |
◆ _offscreenProxy
◆ _pBuffer
SoPBuffer* ml::OffscreenRenderer::_pBuffer |
|
protected |
◆ _pBufferSupportsNonPowerOfTwoDimensions
bool ml::OffscreenRenderer::_pBufferSupportsNonPowerOfTwoDimensions |
|
protected |
◆ _root
SoSeparator node to use as root of the scene, so that the render state is reset after each rendering.
Definition at line 148 of file mlOffscreenRender.h.
◆ _sceneGraphFld
SoNodeField* ml::OffscreenRenderer::_sceneGraphFld |
|
protected |
◆ _sizeFld
Vector2Field* ml::OffscreenRenderer::_sizeFld |
|
protected |
◆ _supportedFld
BoolField* ml::OffscreenRenderer::_supportedFld |
|
protected |
Field variables.
A boolean that tells if the offscreen renderer is supported on the current system
Definition at line 110 of file mlOffscreenRender.h.
◆ _transparencyTypeFld
EnumField* ml::OffscreenRenderer::_transparencyTypeFld |
|
protected |
◆ _updateFld
NotifyField* ml::OffscreenRenderer::_updateFld |
|
protected |
◆ _useFBO
bool ml::OffscreenRenderer::_useFBO |
|
protected |
◆ BufferTypeStrings
Define strings for all image types. These can be used for enum fields.
Definition at line 82 of file mlOffscreenRender.h.
◆ ImageTypeStrings
Define strings for all image types. These can be used for enum fields.
Definition at line 76 of file mlOffscreenRender.h.
◆ TransparencyTypeStrings
Define strings for all transparency types. These can be used for enum fields.
Definition at line 79 of file mlOffscreenRender.h.
The documentation for this class was generated from the following file: