Fermat
Public Types | Public Methods | Public Members | List of all members
RenderingContextImpl Struct Reference

Detailed description

A class encpasulating the entire rendering context

#include <renderer_impl.h>

Public Types

typedef RenderingContext::HostMipMapStoragePtr HostMipMapStoragePtr
 
typedef RenderingContext::DeviceMipMapStoragePtr DeviceMipMapStoragePtr
 
typedef DomainBuffer< HOST_BUFFER, DirectionalLightHostDirectionalLightVector
 
typedef DomainBuffer< CUDA_BUFFER, DirectionalLightDeviceDirectionalLightVector
 

Public Methods

 RenderingContextImpl (RenderingContext *_context)
 
void init (int argc, char **argv)
 
void render (const uint32 instance)
 
void clear ()
 
void multiply_frame (const float scale)
 
void rescale_frame (const uint32 instance)
 
void clamp_frame (const float max_value)
 
void update_variances (const uint32 instance)
 
void update_model ()
 
void filter (const uint32 instance)
 
uint2 res () const
 
RenderingContextView view (const uint32 instance)
 
Cameraget_camera ()
 
uint2 get_res () const
 
float get_aspect_ratio () const
 
float get_exposure () const
 
float get_gamma () const
 
FBufferStorageget_frame_buffer ()
 
std::vector< HostMipMapStoragePtr > & get_host_textures ()
 
std::vector< DeviceMipMapStoragePtr > & get_device_textures ()
 
MipMapViewget_host_texture_views ()
 
MipMapViewget_device_texture_views ()
 
MeshStorageget_host_mesh ()
 
DeviceMeshStorageget_device_mesh ()
 
MeshLightsStorageget_mesh_lights ()
 
RTContextget_rt_context () const
 
RendererInterfaceget_renderer () const
 
uint32 register_renderer (const char *name, RendererFactoryFunction factory)
 
uint32 load_plugin (const char *plugin_name)
 
cugar::Bbox3f compute_bbox ()
 

Public Members

RenderingContextm_this
 
unsigned int m_res_x
 X resolution.
 
unsigned int m_res_y
 Y resolution.
 
float m_aspect
 aspect ratio
 
float m_exposure
 exposure
 
float m_gamma
 gamma
 
float m_shading_rate
 shading rate
 
ShadingMode m_shading_mode
 shading mode
 
MeshStorage m_mesh
 host-side scene mesh representation
 
DeviceMeshStorage m_mesh_d
 device-side scene mesh representation
 
MeshLightsStorage m_mesh_lights
 mesh lights
 
RTContextm_rt_context
 internal optix ray tracing context
 
Camera m_camera
 camera
 
DirectionalLight m_light
 
HostDirectionalLightVector m_dir_lights_h
 host-side directional lights
 
DeviceDirectionalLightVector m_dir_lights_d
 device-side directional lights
 
uint32 m_renderer_type
 rendering engine type
 
RendererInterfacem_renderer
 rendering engine
 
std::vector< HostMipMapStoragePtr > m_textures_h
 host-side textures
 
std::vector< DeviceMipMapStoragePtr > m_textures_d
 device-side textures
 
DomainBuffer< HOST_BUFFER, MipMapViewm_texture_views_h
 host-side texture views
 
DomainBuffer< CUDA_BUFFER, MipMapViewm_texture_views_d
 device-side texture views
 
DomainBuffer< CUDA_BUFFER, float4 > m_ltc_M
 LTC coefficients.
 
DomainBuffer< CUDA_BUFFER, float4 > m_ltc_Minv
 LTC coefficients.
 
DomainBuffer< CUDA_BUFFER, float > m_ltc_A
 LTC coefficients.
 
uint32 m_ltc_size
 LTC coefficients.
 
DomainBuffer< CUDA_BUFFER, float > m_glossy_reflectance
 glossy reflectance/albedo profile
 
FBufferStorage m_fb
 output framebuffer storage
 
FBufferChannelStorage m_fb_temp [4]
 temporary framebuffer storage
 
DomainBuffer< CUDA_BUFFER, float > m_var
 variance framebuffer storage
 
DomainBuffer< CUDA_BUFFER, uint8 > m_rgba
 output 8-bit rgba storage
 
TiledSequence m_sequence
 a tiled sequence
 
std::vector< std::string > m_renderer_names
 plugin renderer names
 
std::vector< RendererFactoryFunction > m_renderer_factories
 plugin renderer factories
 
std::vector< DLLm_plugins
 plugin DLLs
 

Constructor & Destructor Documentation

◆ RenderingContextImpl()

RenderingContextImpl::RenderingContextImpl ( RenderingContext _context)
inline

constructor

Member Function Documentation

◆ clamp_frame()

void RenderingContextImpl::clamp_frame ( const float  max_value)

clamp the output framebuffer to a given maximum

Parameters
max_value

◆ clear()

void RenderingContextImpl::clear ( )

clear all framebuffers

◆ compute_bbox()

cugar::Bbox3f RenderingContextImpl::compute_bbox ( )

compute the scene's bbox

◆ filter()

void RenderingContextImpl::filter ( const uint32  instance)

perform filtering

Parameters
instancethe sequence instance / frame number in a progressive render

◆ get_aspect_ratio()

float RenderingContextImpl::get_aspect_ratio ( ) const
inline

return the target aspect ratio

◆ get_camera()

Camera& RenderingContextImpl::get_camera ( )
inline

return the camera

◆ get_device_mesh()

DeviceMeshStorage& RenderingContextImpl::get_device_mesh ( )
inline

return the scene's device-side mesh

◆ get_device_texture_views()

MipMapView* RenderingContextImpl::get_device_texture_views ( )
inline

return the scene's device-side textures

◆ get_device_textures()

std::vector<DeviceMipMapStoragePtr>& RenderingContextImpl::get_device_textures ( )
inline

return the scene's device-side textures

◆ get_exposure()

float RenderingContextImpl::get_exposure ( ) const
inline

return the target exposure

◆ get_frame_buffer()

FBufferStorage& RenderingContextImpl::get_frame_buffer ( )
inline

return the frame buffer

◆ get_gamma()

float RenderingContextImpl::get_gamma ( ) const
inline

return the target gamma

◆ get_host_mesh()

MeshStorage& RenderingContextImpl::get_host_mesh ( )
inline

return the scene's host-side mesh

◆ get_host_texture_views()

MipMapView* RenderingContextImpl::get_host_texture_views ( )
inline

return the scene's host-side textures

◆ get_host_textures()

std::vector<HostMipMapStoragePtr>& RenderingContextImpl::get_host_textures ( )
inline

return the scene's host-side textures

◆ get_mesh_lights()

MeshLightsStorage& RenderingContextImpl::get_mesh_lights ( )
inline

return the scene's device-side mesh emitters

◆ get_renderer()

RendererInterface* RenderingContextImpl::get_renderer ( ) const
inline

return the renderer

◆ get_res()

uint2 RenderingContextImpl::get_res ( ) const
inline

return the target resolution

◆ get_rt_context()

RTContext* RenderingContextImpl::get_rt_context ( ) const
inline

return the ray tracing context

◆ init()

void RenderingContextImpl::init ( int  argc,
char **  argv 
)

initialize the renderer

◆ load_plugin()

uint32 RenderingContextImpl::load_plugin ( const char *  plugin_name)

load a plugin

◆ multiply_frame()

void RenderingContextImpl::multiply_frame ( const float  scale)

rescale the output framebuffer by a constant

◆ register_renderer()

uint32 RenderingContextImpl::register_renderer ( const char *  name,
RendererFactoryFunction  factory 
)

register a new rendering interface type

◆ render()

void RenderingContextImpl::render ( const uint32  instance)

render a frame

Parameters
instancethe sequence instance / frame number in a progressive render

◆ res()

uint2 RenderingContextImpl::res ( ) const
inline

return the current output resolution

◆ rescale_frame()

void RenderingContextImpl::rescale_frame ( const uint32  instance)

rescale the output framebuffer by n/(n-1)

Parameters
instancethe sequence instance / frame number in a progressive render, used for rescaling

◆ update_model()

void RenderingContextImpl::update_model ( )

update the internal data-structures (e.g. BVHs) associated to the geometry

◆ update_variances()

void RenderingContextImpl::update_variances ( const uint32  instance)

update the variance estimates

Parameters
instancethe sequence instance / frame number in a progressive render, used for rescaling

◆ view()

RenderingContextView RenderingContextImpl::view ( const uint32  instance)

return a view of the renderer


The documentation for this struct was generated from the following file: