Hallo

I want to grap a part of a scene.

At the moment:

        x = ComplicateCalculationFor Y ...
        y = ComplicateCalculationFor Y ...
        glReadPixels(x, y, width, hight ,  GL_LUMINANCE, 
GL_UNSIGNED_BYTE,                 memory);


now I want do the this with Offscreen Rendering in an FBO and used 
sample 29 as base.
I want grab the rendert Texture from the FBO.

In pure OGL it is easy

        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
        glReadPixels();
        glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

this works fine

but in OSG this seems not to work

    WindowPtr win = mgr->getWindow();
    ::fboVP->bind(win.getCPtr());
     glReadPixels(0, 0, windowWidth-1, windowHeight-1, GL_LUMINANCE, 
GL_UNSIGNED_BYTE, &pixels);
    ::fboVP->stop(win.getCPtr());

this produces:  WARNING:  FBO initalize pre OpenGL Error: invalid operation!
And the read Pixels are empty.

How can I Read the Pixels out of the FBO?


thx for help

eik


-- 
Dipl.-Inf. Eik Deistung
Multimediale Information + Präsentation
ZGDV e.V.                           E-Mail: [EMAIL PROTECTED]
(Computer Graphics Center)          WWW   : http://www.zgdv.de/
Joachim-Jungius-Str. 11             FAX   : +49 381 446088
D-18059 Rostock, Germany            Phone : +49 381 4024-169


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to