Hi all,
I'm using openSG 1.8 ( dailybuild 9 Nov 2009 ) for a personal project 
but I have some issues.
I'm using two FBOs to calculate some values with a "ping pong approach": 
the outputs of the first FBO are the inputs of the second and viceversa.
The output of each FBOs is written on two different texture for a total 
of 4 texture. If these texture are "small" ( 8x8 or 16x16 ) everything works
and I get consistent results. But if gave them a bigger texture ( 
1024x1024 ) whenever I render the FBOs openSG gives me some warning, and
the results are garbage.

Here is the small piece of code that produces the errors:

//Render initialization pass
beginEditCP( m_MainDistanceShader );
     m_MainDistanceShader->setUniformParameter( "initializationPass", 
true );
endEditCP( m_MainDistanceShader);

m_MainDistanceMapFBO->render( action );
std::cout << "\nDistance maps initialization complete!\n";

beginEditCP( MainDistanceShader );
     MainDistanceShader ->setUniformParameter( "initializationPass", 
false );
endEditCP( MainDistanceShader );

//Render remaining passes
int max_dimension = osgMax<int>( m_SourceWindow->getWidth(), 
m_SourceWindow->getHeight() );
int num_passes = osglog( max_dimension )/ osglog(  srch_wnd ) + 1;
for( int pass = 0; pass < num_passes; pass += 2 )
{
     m_SecondaryDistanceMapFBO->render( action );
     m_MainDistanceMapFBO->render( action )
}
std::cout << "\nDistance maps rendering complete!";

And here is the output:

Distance maps initialization complete!
WARNING:  8cd9: framebuffer FRAMEBUFFER_DIMENSIONS
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,1788): 
TextureChunk::activate precheck failed: (null) (0x506)
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,2411): 
TextureChunk::deactivate precheck failed: (null) (0x506)
WARNING:  8cd9: framebuffer FRAMEBUFFER_DIMENSIONS
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,1788): 
TextureChunk::activate precheck failed: (null) (0x506)
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,2411): 
TextureChunk::deactivate precheck failed: (null) (0x506)
WARNING:  8cd9: framebuffer FRAMEBUFFER_DIMENSIONS
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,1788): 
TextureChunk::activate precheck failed: (null) (0x506)
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,2411): 
TextureChunk::deactivate precheck failed: (null) (0x506)
WARNING:  8cd9: framebuffer FRAMEBUFFER_DIMENSIONS
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,1788): 
TextureChunk::activate precheck failed: (null) (0x506)
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,2411): 
TextureChunk::deactivate precheck failed: (null) (0x506)
WARNING:  8cd9: framebuffer FRAMEBUFFER_DIMENSIONS
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,1788): 
TextureChunk::activate precheck failed: (null) (0x506)
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,2411): 
TextureChunk::deactivate precheck failed: (null) (0x506)
WARNING:  8cd9: framebuffer FRAMEBUFFER_DIMENSIONS
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,1788): 
TextureChunk::activate precheck failed: (null) (0x506)
WARNING:  
(f:\devel\opensg\source\system\state\osgtexturechunk.cpp,2411): 
TextureChunk::deactivate precheck failed: (null) (0x506)
Distance maps rendering complete!

FYI, the texture I'm using is 496x736, while srch_wnd is 4. The number 
of passes is 6 ( including the initialization pass ). As you can see 
everytime one of the FBOs is rendered I got three different warnings.
Any idea on how to fix that?

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to