This commit is contained in:
parent
3d8fc3912c
commit
a44030464c
10 changed files with 183 additions and 59 deletions
39
Utils/MapEdit/TexCache.cpp
Normal file
39
Utils/MapEdit/TexCache.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*********************/
|
||||
/*** Texture Cache ***/
|
||||
/*********************/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "gl3d.h"
|
||||
#include <gl\gl.h>
|
||||
#include <gl\glu.h>
|
||||
#include <gl\glut.h>
|
||||
#include <Vector>
|
||||
|
||||
#include "TexCache.h"
|
||||
#include "utils.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
int CTexCache::ProcessTexture(char *TexName)
|
||||
{
|
||||
// TRACE3("%i %s\t%i Tris\n",Id,ThisNode.GetName(),TriCount);
|
||||
int ListSize=TexList.size();
|
||||
|
||||
// Check if Tex exists
|
||||
for (int Count=0;Count<ListSize;Count++)
|
||||
{
|
||||
if (strcmp(TexName,TexList[Count].Name))
|
||||
{
|
||||
return(TexList[Count].TexID);
|
||||
}
|
||||
}
|
||||
sTex NewTex;
|
||||
strcpy(NewTex.Name,TexName);
|
||||
LoadGLTexture(TexName,NewTex.TexID);
|
||||
TexList.push_back(NewTex);
|
||||
|
||||
return(NewTex.TexID);
|
||||
//
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue