It tests correctly on my build. I understand a little heartburn with the flipping on load/save of pngs, but it's not arbitrary. GL thinks of images (and other things) in the first quadrant, but most image formats are stored 4th quadrant, where 0,0 is the upper left corner. Honestly, I tend to think of images as laid out this way; but I think now it's pretty clean, there is one coordinate conversion on input and output and everything is right-side up and we are consistent with opengl convention.
-Scott On Wed, Apr 8, 2009 at 1:22 PM, gabor papp <[email protected]> wrote: > > Hmm... could the difference be the order we're defining the quads? my > i was checking the default (build-plane). flipping in x is not a problem > anymore, it was caused by (poly-convert-to-indexed). i'm more concerned > that we flip in y during the png load and now in save. i think the > reversed order is confusing if you do image processing and pixel > operations. > > > What's your testcode look like now? > (clear) > > (show-axis 1) > > (texture (load-texture "textures/flower.png")) > > (define p (build-plane)) > > (with-primitive p > (for ([i (in-range (pdata-size))]) > (printf "~a: p: ~a t: ~a~n" i (pdata-ref "p" i) (pdata-ref "t" i)))) > > > best, > gabor >
