Added texture format into Traits.

This commit is contained in:
Robert Osfield
2007-06-27 10:12:10 +00:00
parent 8fea401d79
commit c0a8c9dd53
2 changed files with 3 additions and 0 deletions

View File

@@ -71,6 +71,7 @@ class OSG_EXPORT GraphicsContext : public Object
quadBufferStereo(false),
doubleBuffer(false),
target(0),
format(0),
level(0),
face(0),
mipMapGeneration(false),
@@ -110,6 +111,7 @@ class OSG_EXPORT GraphicsContext : public Object
// render to texture
GLenum target;
GLenum format;
unsigned int level;
unsigned int face;
unsigned int mipMapGeneration;

View File

@@ -504,6 +504,7 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
if (renderTargetImplemntation==osg::Camera::PIXEL_BUFFER_RTT)
{
traits->target = attachment._texture.valid() ? attachment._texture->getTextureTarget() : 0;
traits->format = bufferFormat;
traits->level = level;
traits->face = face;
traits->mipMapGeneration = attachment._mipMapGeneration;