PlottingOpenGL::PreviewShaders
PlottingOpenGL::PreviewShaders
Embedded shader source code for the preview renderer.
Attributes
| Name | |
|---|---|
| char const * | VERTEX_SHADER Simple vertex shader for preview geometry. |
| char const * | FRAGMENT_SHADER Simple fragment shader with uniform color. |
Attributes Documentation
variable VERTEX_SHADER
char const * VERTEX_SHADER = R"(
#version 410 core
layout(location = 0) in vec2 a_position;
uniform mat4 u_ortho_matrix;
void main() {
gl_Position = u_ortho_matrix * vec4(a_position, 0.0, 1.0);
}
)";Simple vertex shader for preview geometry.
Takes 2D positions and transforms via an orthographic matrix.
variable FRAGMENT_SHADER
char const * FRAGMENT_SHADER = R"(
#version 410 core
uniform vec4 u_color;
out vec4 FragColor;
void main() {
FragColor = u_color;
}
)";Simple fragment shader with uniform color.
Updated on 2026-11-13 at 20:25:41 +0000