9glup_in 
vec4 tex_coord_in;
 
   10glup_in 
vec4 normal_in;
 
   11glup_in highp 
float vertex_id_in;
 
   12glup_out 
float clip_dist;
 
   14glup_out 
vec4 tex_coord;
 
   15glup_flat glup_out glup_id primitive_id;
 
   21void emit_vertex_2(in vec4 p_world, in vec4 p_clip_space, in vec2 offset) {
 
   22    if(glupIsEnabled(GLUP_CLIPPING)) {
 
   24            p_world, GLUP_VS.world_clip_plane
 
   27    gl_Position = p_clip_space / p_clip_space.w ;
 
   28    gl_Position.x += offset.x;
 
   29    gl_Position.y += offset.y;
 
   30    gl_Position.z -= 0.001; 
 
   31    if(glupIsEnabled(GLUP_VERTEX_COLORS)) {
 
   34    if(glupIsEnabled(GLUP_TEXTURING)) {
 
   35        if(glupIsEnabled(GLUP_INDIRECT_TEXTURING)) {
 
   36            tex_coord = tex_coord_in;
 
   38            tex_coord = GLUP_VS.texture_matrix * tex_coord_in;
 
   46    R = 2.0*(GLUP_VS.mesh_width/(GLUP_VS.viewport[2]+GLUP_VS.viewport[3]));
 
   48    vec4 p1_clipspace = GLUP_VS.modelviewprojection_matrix * vertex_in;
 
   49    vec4 p2_clipspace = GLUP_VS.modelviewprojection_matrix * normal_in;
 
   51    p1_ndc = p1_clipspace.xy / p1_clipspace.w;
 
   52    p2_ndc = p2_clipspace.xy / p2_clipspace.w;
 
   54    if(glupIsEnabled(GLUP_PICKING)) {
 
   60            int(vertex_id_in+0.5)/glup_primitive_nb_vertices
 
   63        primitive_id = int(vertex_id_in + 0.5)/glup_primitive_nb_vertices;
 
   70    int v_local_id = glup_mod(
int(vertex_id_in+0.5),4);
 
   73        emit_vertex_2(vertex_in, p1_clipspace,-U-V);
 
   74    } 
else if(v_local_id == 1) {
 
   75        emit_vertex_2(vertex_in, p1_clipspace,-U+V);
 
   76    } 
else if(v_local_id == 2) {
 
   77        emit_vertex_2(normal_in, p2_clipspace, U-V);
 
   79        emit_vertex_2(normal_in, p2_clipspace, U+V);
 
vec3 normalize(vec3 v)
Computes a normalized vector.
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.