not setting texture environment mode when loading a texture
git-svn-id: svn://anubis/misc/TextureCache@216 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
e61910ab9d
commit
93490cb3d1
@ -12,9 +12,6 @@ using namespace std;
|
||||
//#define DEBUG_GL_ERROR
|
||||
#ifdef DEBUG_GL_ERROR
|
||||
#define checkGLError() checkGLErrorLine(__FUNCTION__, __LINE__)
|
||||
#else
|
||||
#define checkGLError()
|
||||
#endif
|
||||
static void checkGLErrorLine(const char * function, int line)
|
||||
{
|
||||
GLenum err = glGetError();
|
||||
@ -25,6 +22,9 @@ static void checkGLErrorLine(const char * function, int line)
|
||||
<< dec << line << endl;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define checkGLError()
|
||||
#endif
|
||||
|
||||
TextureCache::~TextureCache()
|
||||
{
|
||||
@ -41,9 +41,14 @@ GLuint TextureCache::load(const FileLoader::Path & path,
|
||||
return 0;
|
||||
map<string,GLuint>::iterator it = m_cache.find(filename);
|
||||
if (it != m_cache.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
GLuint tex = loadTexture(path, fileLoader, mipmaps, mode, quality);
|
||||
m_cache[filename] = tex;
|
||||
if (tex > 0)
|
||||
{
|
||||
m_cache[filename] = tex;
|
||||
}
|
||||
return tex;
|
||||
}
|
||||
|
||||
@ -121,8 +126,6 @@ GLuint TextureCache::loadTexture(const FileLoader::Path & path,
|
||||
checkGLError();
|
||||
}
|
||||
|
||||
checkGLError();
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode);
|
||||
checkGLError();
|
||||
|
||||
if (mipmaps)
|
||||
|
Loading…
x
Reference in New Issue
Block a user