[PD] GEM mapping units to pixels

altern altern2 at gmail.com
Fri May 11 15:49:27 CEST 2007


hi

I am trying to map GEM units to pixels so that i can position some
videos in the GEM window using pixels values. For this I understand that
i must match the projection values with the window size. So i am doing

dimen 400 300
perspect 0 400 0 300 1 20

and i render all objects at z position 1

translateXYZ 100 100 1

However I am getting a weird result, the units are far smaller that
pixels, so to move a video 100px in the x i need to change it x position
by 300 units or something like this. So I am not sure about what i am
doing wrong, I am familiar with OpenGL but i never played too much with
GEM before so I am still getting into it.

Another small issue is that I would also like to reverse the Y so that
upper left is 0,0 and bottom left would be 0,200 for example, not sure
about how to change this. I guess it is to do with the gemwin settings
but i dont get it right.

thanks

enrike





More information about the Pd-list mailing list