Implemented the beginings of the osgProducer::GraphicsContexImplementation.

Added options into osgprerender for controlling how to do the pre rendering i.e.
--fbo, --pbuffer, --fb --window, and also added the option for controlling the
window size with --width and --height.
This commit is contained in:
Robert Osfield
2005-07-21 19:27:19 +00:00
parent 7776924407
commit 302c58fc93
10 changed files with 277 additions and 131 deletions

View File

@@ -49,8 +49,6 @@ class PBufferTexture2D : public osg::Texture2D
glTexImage2D( GL_TEXTURE_2D, 0,
format, width, height, 0, format, GL_UNSIGNED_BYTE, 0 );
textureObject->setAllocated(true);
std::cout<<"Created texture"<<std::endl;
}
else
{
@@ -58,15 +56,7 @@ class PBufferTexture2D : public osg::Texture2D
static unsigned int frameNum = 0;
if ((frameNum % 100)==0)
{
std::cout<<"binding texture"<<std::endl;
_pbuffer->bindPBufferToTexture( Producer::RenderSurface::FrontBuffer );
}
else
{
std::cout<<"..."<<std::endl;
}
_pbuffer->bindPBufferToTexture( Producer::RenderSurface::FrontBuffer );
++frameNum;
@@ -453,7 +443,7 @@ int main( int argc, char **argv )
}
}
printf( "PBuffer window: 0x%x\n", pbuffer->getWindow() );
printf( "PBuffer window: 0x%x\n", pbuffer->getWindow() );
viewer.getCamera(0)->setClearColor( 0.1f,0.9f,0.3f,1.0f );