[PD] GEM mapping units to pixels

altern altern2 at gmail.com
Sun May 13 21:10:52 CEST 2007

> the size  rectangle 1 1 is 2 2.
> in fact, it goes from -1 to 1.
> you can see that in the simple attached patch.
> about the rectangle 10 10 that is not a square : this is exactly what 
> i've got when i don't send the reset after the windows creation.
> on this point Gem does not react exactly the same way on linux than on 
> windows.

ah!... now i see ... so [rectangle 1 1] is equivalent to

     glVertex3f(-1.0, 1.0, 0.0)
     glVertex3f(1.0, 1.0, 0.0)
     glVertex3f(1.0, -1.0, 0.0)
     glVertex3f(-1.0, -1.0, 0.0)

so the final width and height is actually 2 units ... this is a bit 
confusing in the documentation help patch, i mean i know some opengl but 
still when i read width height words i thought about the width and 
height of a rectangle in normal geometry and not opengl postion of the 
vertex location from the current position.

but i think all is clear now.

many thanks for the help !!!


More information about the Pd-list mailing list