mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-20 17:53:07 +00:00
Merge branch 'explicitly-no-alpha' into 'master'
Ask for zero alpha bits for the CS Closes #8270 See merge request OpenMW/openmw!4842
This commit is contained in:
commit
3dedc5e735
2 changed files with 8 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ void setQSurfaceFormat()
|
||||||
format.setSamples(ds->getMultiSamples());
|
format.setSamples(ds->getMultiSamples());
|
||||||
format.setStencilBufferSize(ds->getMinimumNumStencilBits());
|
format.setStencilBufferSize(ds->getMinimumNumStencilBits());
|
||||||
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
|
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
|
||||||
|
format.setAlphaBufferSize(ds->getMinimumNumAlphaBits());
|
||||||
QSurfaceFormat::setDefaultFormat(format);
|
QSurfaceFormat::setDefaultFormat(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,13 @@ namespace CSVRender
|
||||||
|
|
||||||
mWidget = new osgQOpenGLWidget(this);
|
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 (or relying on the fact that we want the default value) on the default
|
||||||
|
// osg::DisplaySettings instance 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();
|
mRenderer = mWidget->getCompositeViewer();
|
||||||
osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> window
|
osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> window
|
||||||
= new osgViewer::GraphicsWindowEmbedded(0, 0, width(), height());
|
= new osgViewer::GraphicsWindowEmbedded(0, 0, width(), height());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue