Merge pull request #1087 from sandstranger/gles1_crash_fix

disable using shaders for gles1 and Android
coverity_scan^2
scrawl 8 years ago committed by GitHub
commit e883528a60

@ -511,11 +511,13 @@ void Water::createSimpleWaterStateSet(osg::Node* node, float alpha)
// use a shader to render the simple water, ensuring that fog is applied per pixel as required.
// this could be removed if a more detailed water mesh, using some sort of paging solution, is implemented.
#if !defined(OPENGL_ES) && !defined(ANDROID)
Resource::SceneManager* sceneManager = mResourceSystem->getSceneManager();
bool oldValue = sceneManager->getForceShaders();
sceneManager->setForceShaders(true);
sceneManager->recreateShaders(node);
sceneManager->setForceShaders(oldValue);
#endif
}
void Water::createShaderWaterStateSet(osg::Node* node, Reflection* reflection, Refraction* refraction)

Loading…
Cancel
Save