It still not working (I debug fbos powered by glslDevil) 

As my RTT loop implements a minimization of a selected channel I also test an 
assumption that ping pong textures would not be required for my use.
I have then wrote an implementation that read/write the same texture.
only one camera attached to a fbo binded on outtexture
and childs are myGeometry2 that perform occlusion queries whose stateset use 
the same outputtexture as input Texture sampler... 


But curiously I have a strange issue: 
It work if I use 1 only occQuery but not with several...
->Debugging fbos with glsldevil shows me a correct execution of the process but 
when i launch it outside the display seems to get stuck 
unless i cout some stuff during display and switch alt-TAB between commandline 
and osgviewer windows:
It's seems that curiously queries results are made up to date only with this 
hack...

Anyone have experienced this kind of  problem?

[quote="mp3butcher"]For the moment I do a silly thing in order to create FBOs 
attached to the current contextID:


I init it at the first drawImplementation call like it:
All vars are pointers in order to be modified inside drawimplementation

Code:
myGeometry::initFBOs{

*_ext=osg::FBOExtensions::instance(contextID,true);
        *fbos=new GLuint[2];

  (*_ext)->glGenRenderbuffersEXT(2, *fbos);
  (*_ext)->glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, (*fbos)[0]);
//Dont know if its needed for my use
//(*  _ext)->glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, 
256, 256);
//(*  _ext)->glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, 
GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, (*fbos)[0]);

  (*_ext)->glFramebufferTexture2DEXT(GL_DRAW_FRAMEBUFFER_EXT, 
GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE, 
_OutTexture2->getTextureObject(contextID)->_id, 0);
  (*_ext)->glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);



  (*_ext)->glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, (*fbos)[1]);
  //(*_ext)->glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, 
256, 256);
  //(*_ext)->glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, 
GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT,(*fbos)[ 1]);
  (*_ext)->glFramebufferTexture2DEXT(GL_DRAW_FRAMEBUFFER_EXT, 
GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE, 
_fimpass->_OutTexture->getTextureObject(contextID)->_id, 0);
  (*_ext)->glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);

}




Am I wrong?


Frederic Bouvier wrote:
> Hi Julien,
> 
> aren't you supposed to attach a texture to the framebuffer ? I don't see a 
> call to glFramebufferTexture2D or something equivalent in your code.
> In OSG term, it's the Camera::attach method that should be called.
> 
> -Fred
 :-*

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28609#28609





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to