mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-20 19:23:06 +00:00
Set RTT FBO format, too.
This commit is contained in:
parent
d4f18c6478
commit
bd685d672d
2 changed files with 6 additions and 1 deletions
|
|
@ -35,7 +35,7 @@ void setQSurfaceFormat()
|
|||
format.setSamples(ds->getMultiSamples());
|
||||
format.setStencilBufferSize(ds->getMinimumNumStencilBits());
|
||||
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
|
||||
format.setAlphaBufferSize(0);
|
||||
format.setAlphaBufferSize(ds->getMinimumNumAlphaBits());
|
||||
QSurfaceFormat::setDefaultFormat(format);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ namespace CSVRender
|
|||
|
||||
mWidget = new osgQOpenGLWidget(this);
|
||||
|
||||
// not the most idiomatic place to do this, but osgQt needs its guts rearranging to do things properly
|
||||
// we *should* be setting this on the default osg::DisplaySettings instance (or relying on the fact that we want the default) or the View's instance
|
||||
// then osgQt should, but doesn't, use that to create a GraphicsTraits instance, and propagate the details from that to Qt for us
|
||||
mWidget->setTextureFormat(GL_RGB8);
|
||||
|
||||
mRenderer = mWidget->getCompositeViewer();
|
||||
osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> window
|
||||
= new osgViewer::GraphicsWindowEmbedded(0, 0, width(), height());
|
||||
|
|
|
|||
Loading…
Reference in a new issue