anchor.diff:  in vec3 v;
   in vec2 tc1;
   out vec2 v_tc1;
  -        void main() {
  -            gl_Position = P * M * vec4(v, 1);
  -            v_tc1 = vec2(tc1.x, -tc1.y);
  -        }")
  +
  +void main() {
  +     gl_Position = P * M * vec4(v, 1);
  +     v_tc1 = vec2(tc1.x, -tc1.y);
  + }")
   	      
   	      ;; String for the Fragment Shader
   	      ;;   t1    is the texture sampler
  
positive.code: (ql:quickload :clinch)
  (ql:quickload :clinch-freeimage)
  
  (defparameter *quad-mesh*  nil)
  (defparameter *texture-shader* nil)
  (defparameter *texture* nil)
  (defparameter *node* nil)
  (defparameter *projection* nil)
  
  (defparameter *simple-texture-shader* nil)
  
  (defun make-simple-texture-shader ()
    (or *simple-texture-shader*
        (setf *simple-texture-shader*
  
negative.code: 
    ;; Enable a few opengl features. 
    (gl:enable :blend :depth-test :line-smooth :point-smooth :texture-2d :cull-face)
    (%gl:blend-func :src-alpha :one-minus-src-alpha)
    (gl:polygon-mode :front-and-back :fill)
  
    (gl:clear-color 0 0 1 0)
  
    ;; Initialize 
    (init-test))
  
  
  ;; Main loop
  (clinch:defevent clinch:*on-idle* ()
  
    ;; clear the screen
    (gl:clear :color-buffer-bit :depth-buffer-bit)
  
    ;; render the root node which renders everything under it.
    (clinch:render *node* :projection *projection*))
  
  ;; Handler for when the mouse moves...
  (clinch:defevent clinch:*on-mouse-move* (win mouse state x y xrel yrel ts)
    ;;(format t "x:~A y:~A mouse:~A state:~A~%" x y mouse state)
  
    ;; state is an OR'ed array of press mouse buttons.
    (case state
      ;; Left mouse button down: rotate.
      (1 (clinch:rotate *node*
  		      (q:from-fixed-angles (clinch:degrees->radians yrel) (clinch:degrees->radians xrel) 0)))
      
      ;; Mouse wheel down: translate.
      (2 (clinch:translate *node* (clinch:v! (/ xrel 2) (/ yrel -2) 0)))))
  
  
  ;; Resize the window and change the projection matrix.    
  (clinch:defevent clinch:*on-window-resized* (win width height ts)
    (format t "Resized: ~A ~A~%" width height)
    
    (setf *projection* (clinch::make-perspective-transform (clinch:degrees->radians 45)
  							 (/ width height) .1 1000)))
  
  ;; When the mouse wheel moves, translate forward or backward.
  (clinch:defevent clinch:*on-mouse-wheel-move* (win mouse x y ts)
    ;;(format t "win=~A mouse=~A x=~A y=~A ts=~A~%" win mouse x y ts)
    (clinch:translate *node* (clinch:v! 0 0 (/ y 1))))
  
  ;; Create the window and start the app.
  ;; controllers keep the window from restarting, 
  ;; so I removed them for now.
  (clinch:init :init-controllers nil)
  
  
  