Commit 237464bb authored by hybrid's avatar hybrid

Make sure we properly init all matrices in OpenGL.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2883 dfc29bdd-3216-0410-991c-e03cc46cb475
parent d7d497f0
......@@ -573,6 +573,17 @@ bool COpenGLDriver::genericDriverInit(const core::dimension2d<u32>& screenSize,
// Reset The Current Viewport
glViewport(0, 0, screenSize.Width, screenSize.Height);
UserClipPlane.reallocate(MaxUserClipPlanes);
UserClipPlaneEnabled.reallocate(MaxUserClipPlanes);
for (i=0; i<MaxUserClipPlanes; ++i)
{
UserClipPlane.push_back(core::plane3df());
UserClipPlaneEnabled.push_back(false);
}
for (i=0; i<ETS_COUNT; ++i)
setTransform(static_cast<E_TRANSFORMATION_STATE>(i), core::IdentityMatrix);
setAmbientLight(SColorf(0.0f,0.0f,0.0f,0.0f));
#ifdef GL_EXT_separate_specular_color
if (FeatureAvailable[IRR_EXT_separate_specular_color])
......@@ -595,14 +606,6 @@ bool COpenGLDriver::genericDriverInit(const core::dimension2d<u32>& screenSize,
extGlProvokingVertex(GL_FIRST_VERTEX_CONVENTION_EXT);
#endif
UserClipPlane.reallocate(MaxUserClipPlanes);
UserClipPlaneEnabled.reallocate(MaxUserClipPlanes);
for (i=0; i<MaxUserClipPlanes; ++i)
{
UserClipPlane.push_back(core::plane3df());
UserClipPlaneEnabled.push_back(false);
}
// create material renderers
createMaterialRenderers();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment