Public Member Functions
mi::shader_v3::Framebuffer Class Reference

Framebuffer class. More...

#include <shader_framebuffer.h>

List of all members.

Public Member Functions

virtual bool set (const char *buffer, const char *param, const bool value)=0
 set a boolean attribute for a framebuffer
virtual bool set (const char *buffer, const char *param, const float value)=0
 set a float attribute for a framebuffer
virtual bool set (const char *buffer, const char *param, const int value)=0
 set an integer attribute for a framebuffer
virtual bool set (const char *buffer, const char *param, const char *value)=0
 set an integer attribute for a framebuffer
virtual bool get (const char *buffer, const char *param, bool &value) const =0
 get a boolean attribute for a framebuffer
virtual bool get (const char *buffer, const char *param, float &value) const =0
 get a float attribute for a framebuffer
virtual bool get (const char *buffer, const char *param, int &value) const =0
 get an integer attribute for a framebuffer
virtual bool get (const char *buffer, const char *param, const char *&value) const =0
 get a string attribute for a framebuffer
virtual bool get_index (const char *buffer, size_t &index) const =0
 get an index of the framebuffer to be used in mi_fb_put and mi_fb_get functions.
virtual bool reset ()=0
 removes all named buffers. It is not legal to call this method during the rendering process.
virtual void echo (FILE *) const =0
 echoes mi syntax for the framebuffer to the file pointer.
virtual bool get_buffercount (size_t &buffercount) const =0
 get the count of buffers defined.
virtual bool get_buffername (size_t num, const char *&name) const =0
 get the name of buffer num. Note that num is not related to the index returned by get_index
virtual bool remove (const char *buffer)=0
 removes the named buffer. It is not legal to call this method during the rendering process.
virtual bool map_old_index (const unsigned int rc_index, int &index) const =0
 get an index of the framebuffer mapped from the old miRC_IMAGE_* indices. for user framebuffers get_index has to be used.

Detailed Description

Framebuffer class.

The Framebuffer class is a collection of framebuffers used for a frame rendering. It provide an interface to the named framebuffer attributes. It also allows to retrieve the index of the buffer to use it with mi_fb_put and mi_fb_get functions.

All strings are const char. Strings passsed in are copied, and need to be freed by the user. Strings passed out should be copied by the user, since they reference internal data.


Member Function Documentation

virtual bool mi::shader_v3::Framebuffer::get ( const char *  buffer,
const char *  param,
bool &  value 
) const [pure virtual]

get a boolean attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the returned value of the attribute
Returns:
true if an attribute for the given framebuffer with the given name and type is found, false otherwise.
virtual bool mi::shader_v3::Framebuffer::get ( const char *  buffer,
const char *  param,
float &  value 
) const [pure virtual]

get a float attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the returned value of the attribute
Returns:
true if an attribute for the given framebuffer with the given name and type is found, false otherwise.
virtual bool mi::shader_v3::Framebuffer::get ( const char *  buffer,
const char *  param,
int &  value 
) const [pure virtual]

get an integer attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the returned value of the attribute
Returns:
true if an attribute for the given framebuffer with the given name and type is found, false otherwise.
virtual bool mi::shader_v3::Framebuffer::get ( const char *  buffer,
const char *  param,
const char *&  value 
) const [pure virtual]

get a string attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the returned value of the attribute
Returns:
true if an attribute for the given framebuffer with the given name and type is found, false otherwise.
virtual bool mi::shader_v3::Framebuffer::get_buffercount ( size_t &  buffercount) const [pure virtual]

get the count of buffers defined.

Parameters:
buffercountis the number of buffers.
Returns:
false on failure.
virtual bool mi::shader_v3::Framebuffer::get_buffername ( size_t  num,
const char *&  name 
) const [pure virtual]

get the name of buffer num. Note that num is not related to the index returned by get_index

Parameters:
numis the number of the buffer name to return, starting with 0.
nameis the returned buffer name.
Returns:
false on failure.
virtual bool mi::shader_v3::Framebuffer::get_index ( const char *  buffer,
size_t &  index 
) const [pure virtual]

get an index of the framebuffer to be used in mi_fb_put and mi_fb_get functions.

Parameters:
bufferis the name of the framebuffer
indexis the returned index
Returns:
true if an attribute for the given framebuffer with the given name and type is found, false otherwise.
virtual bool mi::shader_v3::Framebuffer::map_old_index ( const unsigned int  rc_index,
int &  index 
) const [pure virtual]

get an index of the framebuffer mapped from the old miRC_IMAGE_* indices. for user framebuffers get_index has to be used.

Parameters:
rc_indexis the old rc index 0 to miRC_IMAGE_USER.
indexis the returned index of the framebuffer
Returns:
true if the rc buffer is available and index was set false otherwise. index is then set to -1
virtual bool mi::shader_v3::Framebuffer::remove ( const char *  buffer) [pure virtual]

removes the named buffer. It is not legal to call this method during the rendering process.

Returns:
true if the operation is successful, false otherwise.
virtual bool mi::shader_v3::Framebuffer::reset ( ) [pure virtual]

removes all named buffers. It is not legal to call this method during the rendering process.

Returns:
true if the operation is successful, false otherwise.
virtual bool mi::shader_v3::Framebuffer::set ( const char *  buffer,
const char *  param,
const bool  value 
) [pure virtual]

set a boolean attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the new value of the attribute
virtual bool mi::shader_v3::Framebuffer::set ( const char *  buffer,
const char *  param,
const float  value 
) [pure virtual]

set a float attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the new value of the attribute
virtual bool mi::shader_v3::Framebuffer::set ( const char *  buffer,
const char *  param,
const int  value 
) [pure virtual]

set an integer attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the new value of the attribute
virtual bool mi::shader_v3::Framebuffer::set ( const char *  buffer,
const char *  param,
const char *  value 
) [pure virtual]

set an integer attribute for a framebuffer

Parameters:
bufferis the name of the framebuffer
paramis the name of the attribute
valueis the new value of the attribute. A copy of the value is stored.

Copyright © 1986, 2013 NVIDIA Corporation