Fermat
Public Types | Public Methods | List of all members
RenderingContext Struct Reference

Detailed description

A class encpasulating the entire rendering context

#include <renderer.h>

Inheritance diagram for RenderingContext:
GlutViewer

Public Types

typedef std::shared_ptr< MipMapStorage< HOST_BUFFER > > HostMipMapStoragePtr
 
typedef std::shared_ptr< MipMapStorage< CUDA_BUFFER > > DeviceMipMapStoragePtr
 

Public Methods

 RenderingContext ()
 
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 ()
 
uint32 get_directional_light_count () const
 
const DirectionalLightget_host_directional_lights () const
 
const DirectionalLightget_device_directional_lights () const
 
void set_directional_light_count (const uint32 count)
 
void set_directional_light (const uint32 i, const DirectionalLight &light)
 
uint2 get_res () const
 
float get_aspect_ratio () const
 
void set_aspect_ratio (const float v)
 
float get_exposure () const
 
void set_exposure (const float v)
 
float get_gamma () const
 
void set_gamma (const float v)
 
ShadingMode & get_shading_mode ()
 
FBufferStorageget_frame_buffer ()
 
uint8 * get_device_rgba_buffer ()
 
uint32 get_texture_count () const
 
HostMipMapStoragePtr * get_host_textures ()
 
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
 
TiledSequenceget_sequence ()
 
uint32 register_renderer (const char *name, RendererFactoryFunction factory)
 
cugar::Bbox3f compute_bbox ()
 

Constructor & Destructor Documentation

◆ RenderingContext()

RenderingContext::RenderingContext ( )

constructor

Member Function Documentation

◆ clamp_frame()

void RenderingContext::clamp_frame ( const float  max_value)

clamp the output framebuffer to a given maximum

Parameters
max_value

◆ clear()

void RenderingContext::clear ( )

clear all framebuffers

◆ compute_bbox()

cugar::Bbox3f RenderingContext::compute_bbox ( )

compute the scene's bbox

◆ filter()

void RenderingContext::filter ( const uint32  instance)

perform filtering

Parameters
instancethe sequence instance / frame number in a progressive render

◆ get_aspect_ratio()

float RenderingContext::get_aspect_ratio ( ) const

return the target aspect ratio

◆ get_camera()

Camera& RenderingContext::get_camera ( )

return the camera

◆ get_device_directional_lights()

const DirectionalLight* RenderingContext::get_device_directional_lights ( ) const

return the device-side directional lights

◆ get_device_mesh()

DeviceMeshStorage& RenderingContext::get_device_mesh ( )

return the scene's device-side mesh

◆ get_device_rgba_buffer()

uint8* RenderingContext::get_device_rgba_buffer ( )

return the frame buffer

◆ get_device_texture_views()

MipMapView* RenderingContext::get_device_texture_views ( )

return the scene's device-side textures

◆ get_device_textures()

DeviceMipMapStoragePtr* RenderingContext::get_device_textures ( )

return the scene's device-side textures

◆ get_directional_light_count()

uint32 RenderingContext::get_directional_light_count ( ) const

return the directional light count

◆ get_exposure()

float RenderingContext::get_exposure ( ) const

return the target exposure

◆ get_frame_buffer()

FBufferStorage& RenderingContext::get_frame_buffer ( )

return the frame buffer

◆ get_gamma()

float RenderingContext::get_gamma ( ) const

return the target gamma

◆ get_host_directional_lights()

const DirectionalLight* RenderingContext::get_host_directional_lights ( ) const

return the host-side directional lights

◆ get_host_mesh()

MeshStorage& RenderingContext::get_host_mesh ( )

return the scene's host-side mesh

◆ get_host_texture_views()

MipMapView* RenderingContext::get_host_texture_views ( )

return the scene's host-side textures

◆ get_host_textures()

HostMipMapStoragePtr* RenderingContext::get_host_textures ( )

return the scene's host-side textures

◆ get_mesh_lights()

MeshLightsStorage& RenderingContext::get_mesh_lights ( )

return the scene's device-side mesh emitters

◆ get_renderer()

RendererInterface* RenderingContext::get_renderer ( ) const

return the renderer

◆ get_res()

uint2 RenderingContext::get_res ( ) const

return the target resolution

◆ get_rt_context()

RTContext* RenderingContext::get_rt_context ( ) const

return the ray tracing context

◆ get_sequence()

TiledSequence& RenderingContext::get_sequence ( )

return the sampling sequence

◆ get_shading_mode()

ShadingMode& RenderingContext::get_shading_mode ( )

return the shading mode

◆ get_texture_count()

uint32 RenderingContext::get_texture_count ( ) const

return the number of textures

◆ init()

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

initialize the renderer

◆ multiply_frame()

void RenderingContext::multiply_frame ( const float  scale)

rescale the output framebuffer by a constant

◆ register_renderer()

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

register a new rendering interface type

◆ render()

void RenderingContext::render ( const uint32  instance)

render a frame

Parameters
instancethe sequence instance / frame number in a progressive render

◆ res()

uint2 RenderingContext::res ( ) const

return the current output resolution

◆ rescale_frame()

void RenderingContext::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

◆ set_aspect_ratio()

void RenderingContext::set_aspect_ratio ( const float  v)

set the target exposure

◆ set_directional_light()

void RenderingContext::set_directional_light ( const uint32  i,
const DirectionalLight light 
)

set a directional light

◆ set_directional_light_count()

void RenderingContext::set_directional_light_count ( const uint32  count)

set the number of directional lights

◆ set_exposure()

void RenderingContext::set_exposure ( const float  v)

set the target exposure

◆ set_gamma()

void RenderingContext::set_gamma ( const float  v)

set the target gamma

◆ update_model()

void RenderingContext::update_model ( )

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

◆ update_variances()

void RenderingContext::update_variances ( const uint32  instance)

update the variance estimates

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

◆ view()

RenderingContextView RenderingContext::view ( const uint32  instance)

return a view of the renderer


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