Skip to main content

PlottingOpenGL::PolyLineShaders

PlottingOpenGL::PolyLineShaders

Embedded fallback shader source code for the polyline renderer. More…

Attributes

Name
char const * VERTEX_SHADER
char const * GEOMETRY_SHADER
char const * FRAGMENT_SHADER

Detailed Description

Embedded fallback shader source code for the polyline renderer.

These match the interface of WhiskerToolbox/shaders/line.vert and line.frag but are embedded for cases where shader files are not available.

Attributes Documentation

variable VERTEX_SHADER

char const  * VERTEX_SHADER = R"(
#version 410 core

layout(location = 0) in int a_time_index;
layout(location = 1) in float a_value;

uniform int u_view_start_sample;
uniform mat4 u_mvp_matrix;

void main() {
    int rel_sample = a_time_index - u_view_start_sample;
    gl_Position = u_mvp_matrix * vec4(float(rel_sample), a_value, 0.0, 1.0);
}
)";

variable GEOMETRY_SHADER

char const  * GEOMETRY_SHADER;

variable FRAGMENT_SHADER

char const  * FRAGMENT_SHADER = R"(
#version 410 core

uniform vec4 u_color;

out vec4 FragColor;

void main() {
    FragColor = u_color;
}
)";

Updated on 2026-11-13 at 20:25:41 +0000