1
0
Fork 0
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:
AnyOldName3 2025-12-09 17:25:59 +00:00
parent d4f18c6478
commit bd685d672d
2 changed files with 6 additions and 1 deletions

View file

@ -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);
}

View file

@ -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());