cyrille henry wrote:
hello,
i just did an svn update. lots of file have changed. (last update was 21 december) after building gem, i realized that few shaders example did not work any-more. it look to be related with rectangular texture : if you open shader example 1 : simple texture : it work ok with non rectangular texture (but the texture is upside down), but it does not work at all in rectangular mode...
i started to unify as much code as possible and try to reduce all the hacks handling different image orientations and non/rectangular textures. obviously the process is not finished yet :-(
- in the past, linux/w32 acquired pixes (images, video,...) in openGL orientation starting bottom-left (usually by flipping the images manually, since most image-APIs will return them top-left), whereas osx acquired them in top-left orientation and set the "upside-down" flag, thus being more performant (no pixel-wise flipping required) now, Gem will acquire the image in the same way on all OSs (top-left).
- the code was full of special handling for rectangular vs normalized texture coordinates. removing the cruft basically involved setting up a texture transformation matrix that would make the rectangular textures behave the same as normalized textures (mainly this is done by premultiplying the texcoords with a matrix that transforms 0..1 to 0..xsize and the like).
this basically means that now the texcoords should always appear to be 0..1. since the "sampler2DRect" expects texcoords to range from 0..xsize (and similar), it now fails.
hope that could be fixed soon
me too.
fmgasdr IOhannes