mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 19:06:41 +00:00
Merge branch 'fix_toggleborders' into 'master'
Fix ToggleBorders debug view with 'Shaders' lighting method See merge request OpenMW/openmw!792
This commit is contained in:
commit
18a4c81b5c
1 changed files with 3 additions and 3 deletions
|
@ -715,11 +715,10 @@ namespace SceneUtil
|
||||||
{
|
{
|
||||||
static const std::string dummyVertSource = generateDummyShader(mLightManager->getMaxLightsInScene());
|
static const std::string dummyVertSource = generateDummyShader(mLightManager->getMaxLightsInScene());
|
||||||
|
|
||||||
mDummyProgram->addShader(new osg::Shader(osg::Shader::VERTEX, dummyVertSource));
|
|
||||||
mDummyProgram->addBindUniformBlock("LightBufferBinding", static_cast<int>(Shader::UBOBinding::LightBuffer));
|
|
||||||
// Needed to query the layout of the buffer object. The layout specifier needed to use the std140 layout is not reliably
|
// Needed to query the layout of the buffer object. The layout specifier needed to use the std140 layout is not reliably
|
||||||
// available, regardless of extensions, until GLSL 140.
|
// available, regardless of extensions, until GLSL 140.
|
||||||
mLightManager->getOrCreateStateSet()->setAttributeAndModes(mDummyProgram, osg::StateAttribute::ON);
|
mDummyProgram->addShader(new osg::Shader(osg::Shader::VERTEX, dummyVertSource));
|
||||||
|
mDummyProgram->addBindUniformBlock("LightBufferBinding", static_cast<int>(Shader::UBOBinding::LightBuffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
LightManagerStateAttribute(const LightManagerStateAttribute& copy, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY)
|
LightManagerStateAttribute(const LightManagerStateAttribute& copy, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY)
|
||||||
|
@ -763,6 +762,7 @@ namespace SceneUtil
|
||||||
{
|
{
|
||||||
if (!mInitLayout)
|
if (!mInitLayout)
|
||||||
{
|
{
|
||||||
|
mDummyProgram->apply(state);
|
||||||
auto handle = mDummyProgram->getPCP(state)->getHandle();
|
auto handle = mDummyProgram->getPCP(state)->getHandle();
|
||||||
auto* ext = state.get<osg::GLExtensions>();
|
auto* ext = state.get<osg::GLExtensions>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue