|
From: <axl...@us...> - 2010-05-23 12:38:18
|
Revision: 747
http://hgengine.svn.sourceforge.net/hgengine/?rev=747&view=rev
Author: axlecrusher
Date: 2010-05-23 12:38:12 +0000 (Sun, 23 May 2010)
Log Message:
-----------
Move bind cache init into render
Modified Paths:
--------------
Mercury2/src/Texture.cpp
Modified: Mercury2/src/Texture.cpp
===================================================================
--- Mercury2/src/Texture.cpp 2010-05-23 12:37:21 UTC (rev 746)
+++ Mercury2/src/Texture.cpp 2010-05-23 12:38:12 UTC (rev 747)
@@ -102,6 +102,8 @@
void Texture::Render(const MercuryNode* node)
{
+ if ( !m_lastBound ) InitiateBindCache();
+
if (GetLoadState() == LOADED)
{
printf( "Rendering Texture (%s), but state is: %d\n", m_path.c_str(), GetLoadState() );
@@ -109,6 +111,9 @@
SetLoadState(NONE);
//force rebind since we were used before
if (m_lastBound[m_numActiveTextures] == this) m_lastBound[m_numActiveTextures] = NULL;
+
+// for (uint8_t i = 0; i <= m_numActiveTextures; i++)
+// if (m_lastBound[i] == this) m_lastBound[i] = NULL;
}
BindTexture();
}
@@ -159,7 +164,7 @@
void Texture::BindTexture()
{
- if ( !m_lastBound ) InitiateBindCache();
+// if ( !m_lastBound ) InitiateBindCache();
if (m_numActiveTextures >= m_maxActiveTextures) return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|