In Blender 2.49 the win width and height were been calculated including an extra pixel (e.g. a fullscreen editor would be (width + 1) by (height + 1) )
In opposite to that, Blender 2.5 window/editor code were fixed to have the exact width,height size.
So although the BGE canvas code was still the same as 2.49 it was producing a wrong result.
I'm also adding some commentaries in the setViewport code. BGE is setting the viewports 1 pixel larger.
the setViewport command is been used as if one should pass (minx, miny, width, height), while it should be (minx, miny, maxx, maxy). I will take care of that later, if any one has extra comments on that, please let me know.
* gameplayer is now probably not going to build without PNG turned ON.
To fix that it would be necessary to use #ifndef NOPNG around the GPC_Canvas::MakeScreenShot.
Since I don't this function it's working in 2.5 yet it's better to wait for that before doing it.
Changed:
row_pointers = new (png_bytep) [(GetHeight() * sizeof(png_bytep))];
to:
row_pointers = new png_bytep [(GetHeight() * sizeof(png_bytep))];
Thanks emil....
Kent