8#ifndef GLUP_NO_GL_CLIPPING 
    9in 
float gl_ClipDistance[];
 
   13    vec4 vertex_clip_space;
 
   27#ifndef GLUP_NO_GL_CLIPPING 
   28    if(glupIsEnabled(GLUP_CLIPPING) && (gl_ClipDistance[0] < 0.0)) {
 
   38        2.0 * ( (gl_FragCoord.x - GLUP.viewport[0]) / GLUP.viewport[2] - 0.5),
 
   39        2.0 * ( (gl_FragCoord.y - GLUP.viewport[1]) / GLUP.viewport[3] - 0.5)
 
   42    vec2 U = p2_ndc - p1_ndc;
 
   43    vec2 V1 = p_ndc - p1_ndc;
 
   44    vec2 V2 = p_ndc - p2_ndc;
 
   46    if(
dot(V1,U) < 0 && 
dot(V1,V1) > R*R) {
 
   50    if(
dot(V2,U) > 0 && 
dot(V2,V2) > R*R) {
 
   54    if(glupIsEnabled(GLUP_PRIMITIVE_FILTERING)) {
 
   55        glup_primitive_filter(gl_PrimitiveID);
 
   58    if(glupIsEnabled(GLUP_PICKING)) {
 
   59        glup_FragColor = glup_picking(gl_PrimitiveID);
 
   64    if(glupIsEnabled(GLUP_VERTEX_COLORS)) {
 
   65        result = FragmentIn.color;
 
   67        result = GLUP.mesh_color;
 
   70    if(glupIsEnabled(GLUP_TEXTURING) && !glupIsEnabled(GLUP_NORMAL_MAPPING)) {
 
   71        result = glup_texturing(result, FragmentIn.tex_coord);
 
   73    glup_FragColor = result;
 
T dot(const vecng< 3, T > &v1, const vecng< 3, T > &v2)
Computes the dot product of 2 vectors.   vecng
vecng< 4, Numeric::float64 > vec4
Represents points and vectors in 4d.
vecng< 2, Numeric::float64 > vec2
Represents points and vectors in 2d.