Added texture format into Traits.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user