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

Public Member Functions

void renderFullPipeline (ViewSettings settings)
 
void setup ()
 
void processEye (ViewSettings settings, vr::IVRCompositor *compositor, vr::EVREye eye)
 

Public Attributes

bool is_setup = false
 
bool is_functional = false
 
size_t show_eye = 0
 
std::shared_ptr< gmCore::OpenVRopenvr
 
uint32_t render_width = 1920
 
uint32_t render_height = 1080
 
OffscreenRenderTargets render_target
 
RasterProcessor raster_processor
 
size_t cache_frame_number = std::numeric_limits<size_t>::max()
 

Static Public Attributes

static const std::string fragment_code
 

Member Data Documentation

◆ fragment_code

const std::string gramods::gmGraphics::HmdView::Impl::fragment_code
static
Initial value:
=
R"lang=glsl(
#version 330 core
uniform sampler2D tex_left;
uniform sampler2D tex_right;
uniform int show_eye;
in vec2 position;
out vec4 fragColor;
void main() {
if (show_eye == 0) {
fragColor = texture(tex_left, position * 0.5 + 0.5);
} else if (show_eye == 1) {
fragColor = texture(tex_right, position * 0.5 + 0.5);
} else {
if (position.x < 0) {
fragColor = texture(tex_left, position * vec2(1.0, 0.5) + vec2(1.0, 0.5));
} else {
fragColor = texture(tex_right, position * vec2(1.0, 0.5) + vec2(0.0, 0.5));
}
}
}
)lang=glsl"

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