gramods
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gramods::gmGraphics::RemapperView::Impl Struct Reference
Collaboration diagram for gramods::gmGraphics::RemapperView::Impl:
Collaboration graph
[legend]

Public Member Functions

std::string createFragmentCode ()
 
void renderFullPipeline (ViewSettings settings)
 

Public Attributes

OffscreenRenderTargets render_target
 
RasterProcessor raster_processor
 
bool is_setup = false
 
bool is_functional = false
 
std::vector< std::shared_ptr< View > > views
 
std::shared_ptr< CoordinatesMapperfrom
 
std::shared_ptr< CoordinatesMapperto
 
float view_offset = 0.f
 
float sphere_radius = 1.f
 
Eigen::Matrix3f M_rot = Eigen::Matrix3f::Identity()
 

Static Public Attributes

static const std::string fragment_template_code
 
static const std::string mapper_pattern = "MAPPER;"
 

Member Data Documentation

◆ fragment_template_code

const std::string gramods::gmGraphics::RemapperView::Impl::fragment_template_code
static
Initial value:
=
R"lang=glsl(
#version 330 core
MAPPER;
uniform mat3 M_rot;
uniform sampler2D tex;
in vec2 position;
out vec4 fragColor;
void main() {
vec3 pix_dir;
bool good = mapTo3D(position, pix_dir);
if (!good) {
fragColor = vec4(0, 0, 0, 0);
return;
}
vec2 v_uv;
good = mapTo2D(M_rot * pix_dir, v_uv);
fragColor = texture(tex, 0.5 + 0.5 * v_uv);
}
)lang=glsl"

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