Minor optimization when creating opengl textures
Delay switching back to previous active texture until mipmap generation is done. Avoids 4 GL calls in most cases (not really noticable for speed, but makes reading api-traces of GL calls a bit easier). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5842 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
fd155bead0
commit
53bc690af6
|
@ -104,8 +104,6 @@ public:
|
|||
for (u32 i = 0; i < (*tmpImage).size(); ++i)
|
||||
uploadTexture(true, i, 0, (*tmpImage)[i]->getData());
|
||||
|
||||
Driver->getCacheHandler()->getTextureCache().set(0, prevTexture);
|
||||
|
||||
bool autoGenerateRequired = true;
|
||||
|
||||
for (u32 i = 0; i < (*tmpImage).size(); ++i)
|
||||
|
@ -127,6 +125,9 @@ public:
|
|||
Image.clear();
|
||||
}
|
||||
|
||||
|
||||
Driver->getCacheHandler()->getTextureCache().set(0, prevTexture);
|
||||
|
||||
Driver->testGLError(__LINE__);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue