Carna  Version 3.0.1
Public Member Functions | Public Attributes | List of all members
Carna::base::FrameRenderer::RenderTextureParams Struct Reference

Specifies how renderTexture is to be performed. More...

#include <FrameRenderer.h>

Public Member Functions

 RenderTextureParams (unsigned int unit)
 Instantiates default configuration. This will simply reproduce the texture that is currently bound to texture unit on a rectangle that covers the whole viewport.
 

Public Attributes

unsigned int unit
 The texture unit that renderTexture will instruct the shader to use.
 
bool useDefaultSampler
 Holds whether a predefined sampler is to be bound to unit before drawing. This predefined sampler uses Sampler::FILTER_LINEAR and Sampler::WRAP_MODE_CLAMP. More...
 
bool useDefaultShader
 The currently set shader will be used for drawing if this is false. If the value is true, the default shader will be bound, that reproduces the texture bound to unit. More...
 
std::string textureUniformName
 Holds the name of the uniform variable defined by the shader that will be used, that will be linked with the specified texture unit. More...
 
float alphaFactor
 If useDefaultShader is true, the alpha values sampled from the texture bound to the specified texture unit will be multiplied with this value. Otherwise this is ignored. More...
 

Detailed Description

Specifies how renderTexture is to be performed.

The texture unit will be linked with the specified shader uniform variable, that is set to colorMap initially.

Definition at line 182 of file FrameRenderer.h.

Member Data Documentation

float Carna::base::FrameRenderer::RenderTextureParams::alphaFactor

If useDefaultShader is true, the alpha values sampled from the texture bound to the specified texture unit will be multiplied with this value. Otherwise this is ignored.

The default value is 1.

Definition at line 222 of file FrameRenderer.h.

std::string Carna::base::FrameRenderer::RenderTextureParams::textureUniformName

Holds the name of the uniform variable defined by the shader that will be used, that will be linked with the specified texture unit.

The default value is colorMap.

Definition at line 213 of file FrameRenderer.h.

bool Carna::base::FrameRenderer::RenderTextureParams::useDefaultSampler

Holds whether a predefined sampler is to be bound to unit before drawing. This predefined sampler uses Sampler::FILTER_LINEAR and Sampler::WRAP_MODE_CLAMP.

The default value is true.

Definition at line 196 of file FrameRenderer.h.

bool Carna::base::FrameRenderer::RenderTextureParams::useDefaultShader

The currently set shader will be used for drawing if this is false. If the value is true, the default shader will be bound, that reproduces the texture bound to unit.

The default value is true.

Definition at line 205 of file FrameRenderer.h.


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