Skip to content

Commit 3dedc5e

Browse files
committed
Merge branch 'explicitly-no-alpha' into 'master'
Ask for zero alpha bits for the CS Closes #8270 See merge request OpenMW/openmw!4842
2 parents 538ad52 + e91f5a5 commit 3dedc5e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

apps/opencs/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ void setQSurfaceFormat()
3535
format.setSamples(ds->getMultiSamples());
3636
format.setStencilBufferSize(ds->getMinimumNumStencilBits());
3737
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
38+
format.setAlphaBufferSize(ds->getMinimumNumAlphaBits());
3839
QSurfaceFormat::setDefaultFormat(format);
3940
}
4041

apps/opencs/view/render/scenewidget.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ namespace CSVRender
7272

7373
mWidget = new osgQOpenGLWidget(this);
7474

75+
// Not the most idiomatic place to do this, but osgQt needs its guts rearranging to do things properly.
76+
// We *should* be setting this (or relying on the fact that we want the default value) on the default
77+
// osg::DisplaySettings instance or the View's instance.
78+
// Then osgQt should, but doesn't, use that to create a GraphicsTraits instance, and propagate the details from
79+
// that to Qt for us.
80+
mWidget->setTextureFormat(GL_RGB8);
81+
7582
mRenderer = mWidget->getCompositeViewer();
7683
osg::ref_ptr<osgViewer::GraphicsWindowEmbedded> window
7784
= new osgViewer::GraphicsWindowEmbedded(0, 0, width(), height());

0 commit comments

Comments
 (0)