eos 1.4.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
eos::render::SoftwareRenderer< VertexShaderType, FragmentShaderType > Class Template Reference

X. More...

#include <SoftwareRenderer.hpp>

Public Member Functions

 SoftwareRenderer (int viewport_width, int viewport_height)
 
 SoftwareRenderer (const SoftwareRenderer &rhs)=delete
 
SoftwareRendereroperator= (const SoftwareRenderer &)=delete
 
template<typename T >
core::Image4u render (const core::Mesh &mesh, const Eigen::Matrix4< T > &model_view_matrix, const Eigen::Matrix4< T > &projection_matrix, const cpp17::optional< Texture > &texture=cpp17::nullopt)
 Todo.
 
void clear_buffers ()
 Resets the colour and depth buffers.
 

Public Attributes

cpp17::optional< Texturetexture = cpp17::nullopt
 
bool enable_backface_culling = false
 
bool enable_near_clipping = true
 
Rasterizer< FragmentShaderType > rasterizer
 

Detailed Description

template<typename VertexShaderType, typename FragmentShaderType>
class eos::render::SoftwareRenderer< VertexShaderType, FragmentShaderType >

X.

Longer.

Template Parameters
VertexShaderTypevs-type.
FragmentShaderTypefs-type.

Member Function Documentation

◆ clear_buffers()

template<typename VertexShaderType , typename FragmentShaderType >
void eos::render::SoftwareRenderer< VertexShaderType, FragmentShaderType >::clear_buffers ( )
inline

Resets the colour and depth buffers.

If multiple images are rendered, then this function can be called before rendering a new image, depending on the desired behaviour.

◆ render()

template<typename VertexShaderType , typename FragmentShaderType >
template<typename T >
core::Image4u eos::render::SoftwareRenderer< VertexShaderType, FragmentShaderType >::render ( const core::Mesh mesh,
const Eigen::Matrix4< T > &  model_view_matrix,
const Eigen::Matrix4< T > &  projection_matrix,
const cpp17::optional< Texture > &  texture = cpp17::nullopt 
)
inline

Todo.

Todo. The returned framebuffer cv::Mat is a smart-pointer to the colorbuffer object inside SoftwareRenderer, and will be overwritten on the next call to render(). If you want a copy, use .clone()! Note: This comment is sort-of obsolete as of Jan 2019, when we switched this code to eos::core::Image.

Parameters
[in]meshThe mesh to render.
[in]model_view_matrixThe mesh to render.
[in]projection_matrixThe mesh to render.
[in]textureThe mesh to render. @ return The framebuffer (colourbuffer) with the rendered object.

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