I guess you're passing a local variable
Sure! Thanks, yesterday I was tired.. I solved with this two lines:
// Inverts Y-Axis
GetDefaultView().SetFromRect(FloatRect(0,static_cast<float>(myBufferWidth),static_cast<float>(myBufferHeight),0));
SetView(GetDefaultView());
I'd be glad to see your code. I'm especially interested because you're using PBuffers and not FBOs, so you need a high amount of non-portable code.
We focus only on Win32 platforms and I'm not a professional programmer so my RenderImage class has been tested only on Windows XP and Windows Vista.
I made some changes to my RenderImage class today so it should work without any SFML code modification, simply by adding RenderImage.hpp and RenderImage.cpp to the Graphics Project of SFML Solution.
-----------------------------
Here is my code, please feel free to throw it away, modify or use it. I hope it could be of little help.
I'm especially interested because you're using PBuffers and not FBOs
Have PBuffers a better compatibility than FBO?
(
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/opengl/pbuffervsfbo )
My RenderImage references:
http://ati.amd.com/developer/ATIpbuffer.pdf-----------------------------
I also made an example to show RenderImage use, it's included in the rar file.
RenderImage and Example sources here:
http://www.megaupload.com/?d=9C19OO5R-----------------------------
TODO:
Add checking to control that we haven't lost our pbuffer due to a display mode change with:
wglQueryPbufferARB(hPBuffer, WGL_PBUFFER_LOST_ARB, &flag);