gl:eval-coord-1

(gl:eval-coord-1 opengl u)


Description:

glEvalCoord1 evaluates enabled two-dimensional maps at argument u.  glEvalCoord2 does the same for two-dimen-       sional maps using two domain values, u and v.  To define a map, call glMap1 and glMap2; to enable and disable       it, call glEnable and glDisable.

 


Arguments:

         opengl -- opengl instance

              u -- Specifies a value that is the domain coordinate u to the basis function defined in a  previous  glMap1  or

          glMap2 command.


Returns: boolean


Examples:

(define ctrlpoints (objc:vector->nsdata-float (vector (vector -5 -4 0) 

                                                      (vector -2 4 -1) 

                                                      (vector .5 -4 0) 

                                                      (vector 4 4 0))))

(gl:map-1 *gl* *gl:map1-vertex-3* 0.0 1.0 3 4 ctrlpoints)

(gl:enable *gl* *gl:map1-vertex-3*)


(define test

   (lambda (val)

      (gl:clear *gl* (io:binary-or *gl:color-buffer-bit* *gl:depth-buffer-bit*))

      (gl:load-identity *gl*)

      (gl:translate *gl* 0 0 -30)

      (gl:color *gl* 1 1 0 1)

      (gl:begin *gl* *gl:line-strip*)

      (dotimes (i (modulo val 50))

         (gl:eval-coord-1 *gl* (/ i 50)))

      (gl:end *gl*)

      (gl:flush *gl*)

      (callback (+ (now) 500) 'test (+ val 1))))


(test 0)



Back to index