… i’ve subclassed the OpenGLComponent function to something like this ( and enable snapshots of opengl screens ). The only thing is (apart from the fact that the image is flipped vertically, but this is not the problem) if i compile and run this at work (win2k sp4) i get the image correctly, but if i recompile at home (on xp sp2) i get a black screen even if there are a lot of opengl stuff moving.
here is the code:
[code] if (makeCurrentContextActive())
int width = getWidth();
int height = getHeight();
int lineStride, pixelStride;
shotImage = new Image(Image::RGB,width,height,true); uint8* data = shotImage->lockPixelDataReadWrite (0,0,width,height,lineStride,pixelStride); glReadPixels(0,0,width,height,GL_RGB,GL_UNSIGNED_BYTE,data); shotImage->releasePixelDataReadWrite(data); }[/code]
what could be ?