Commit 42a78559 authored by hybrid's avatar hybrid

OpenGL Performance tweaks by GnarlyHotep

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@995 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 00d8624a
......@@ -383,6 +383,8 @@ bool COpenGLDriver::endScene( s32 windowId, core::rect<s32>* sourceRect )
{
CNullDriver::endScene( windowId );
glFlush();
#ifdef _IRR_USE_WINDOWS_DEVICE_
return SwapBuffers(HDc) == TRUE;
#elif defined(_IRR_USE_LINUX_DEVICE_)
......@@ -410,7 +412,7 @@ bool COpenGLDriver::beginScene(bool backBuffer, bool zBuffer, SColor color)
if (backBuffer)
{
f32 inv = 1.0f / 255.0f;
const f32 inv = 1.0f / 255.0f;
glClearColor(color.getRed() * inv, color.getGreen() * inv,
color.getBlue() * inv, color.getAlpha() * inv);
......@@ -659,8 +661,6 @@ void COpenGLDriver::drawVertexPrimitiveList(const void* vertices, u32 vertexCoun
break;
}
glFlush();
if (MultiTextureExtension)
{
if (vType==EVT_TANGENTS)
......@@ -1983,7 +1983,6 @@ void COpenGLDriver::draw3DLine(const core::vector3df& start,
glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
glVertex3f(start.X, start.Y, start.Z);
glColor4ub(color.getRed(), color.getGreen(), color.getBlue(), color.getAlpha());
glVertex3f(end.X, end.Y, end.Z);
glEnd();
}
......
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