[Fluxus] commits + warning

Scott alcoholiday at gmail.com
Sun Mar 22 09:08:50 PDT 2009


Hmm... I picked up the commits and rebuilt, but I'm still seeing the
texture coords flipped.

Here's how I'm testing. The quad on the right is built assuming that
S,T of [0,0] is in the lower left and [1,1] is in the upper right (aka
1st quadrant), and I'm pretty sure the OpenGL convention. The quad on
the left assumes that [0,0] is in the upper left corner and [1,1] is
in the lower right.

(define (build-quad uv-quadrant1)
  (let ([quad (build-polygons 4 'quad-list)])
    (with-primitive quad
		    (if uv-quadrant1
			(begin
			  ;; assumes s,t coordinates are 1rst quadrant
			  (pdata-set! "p" 3 (vector 0 0 0))
			  (pdata-set! "t" 3 (vector 0 0 0))
			  (pdata-set! "p" 2 (vector 0 1 0))
			  (pdata-set! "t" 2 (vector 0 1 0))
			  (pdata-set! "p" 1 (vector 1 1 0))
			  (pdata-set! "t" 1 (vector 1 1 0))
			  (pdata-set! "p" 0 (vector 1 0 0))
			  (pdata-set! "t" 0 (vector 1 0 0))
			  )
			(begin
			  ;; assume s,t coordinates are 4th quad
			  (pdata-set! "p" 0 #( 1 0 0))
			  (pdata-set! "t" 0 #( 1 1 0))
			  (pdata-set! "p" 1 #( 1 1 0))
			  (pdata-set! "t" 1 #( 1 0 0))
			  (pdata-set! "p" 2 #( 0 1 0))
			  (pdata-set! "t" 2 #( 0 0 0))
			  (pdata-set! "p" 3 #( 0 0 0))
			  (pdata-set! "t" 3 #( 0 1 0))
			  ))
		    (recalc-normals quad)
		    )
    quad))
;; assumes 1st quad and looks wrong :(
(define quad-q1 (build-quad #t))
(grab quad-q1)
(translate (vector 1 0 0))
(scale 5)
(hint-wire)
(texture (load-texture "textures/flower.png"))

;; assumes 4th quad and looks right
(define quad-q4 (build-quad #f))
(grab quad-q4)
(translate (vector -5 0 0))
(scale 5)
(hint-wire)
(texture (load-texture "textures/flower.png"))



On Sat, Mar 21, 2009 at 3:05 PM, Dave Griffiths <dave at pawfal.org> wrote:
> Hi all,
>
> I've fixed the planes, texture coords and flipped y rotation.
>
> If you update, existing scripts may change behaviour, so consider
> yourself warned :)
>
> Part of this was fixing the knots on the nurbs plane, so now the surface
> extends up to the control vertices rather than slightly inside. All the
> planes (build-plane, build-seg-plane and build-nurbs-plane) should all
> be coincident now.
>
> Scott, if you could check that things are ok, that would be good.
>
> I think I'll need to fix some of the example scripts too...
>
> cheers,
>
> dave
>
>



More information about the Fluxus mailing list