2000-10-27 20:18:30 +02:00
|
|
|
/*********************/
|
|
|
|
/*** Texture Cache ***/
|
|
|
|
/*********************/
|
|
|
|
|
|
|
|
#ifndef __TEXCACHE_HEADER__
|
|
|
|
#define __TEXCACHE_HEADER__
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "gl3d.h"
|
|
|
|
#include <gl\gl.h>
|
|
|
|
#include <gl\glu.h>
|
|
|
|
#include <gl\glut.h>
|
|
|
|
#include <Vector>
|
|
|
|
|
|
|
|
struct sTex
|
|
|
|
{
|
|
|
|
char Name[256];
|
2000-10-27 22:21:39 +02:00
|
|
|
char Path[256];
|
2000-10-27 20:18:30 +02:00
|
|
|
GLuint TexID;
|
2000-10-27 22:21:39 +02:00
|
|
|
int Flags;
|
2000-10-27 20:18:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
class CTexCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2000-10-27 22:21:39 +02:00
|
|
|
int ProcessTexture(char *TexName,char *Path,int Flags);
|
|
|
|
sTex &GetTex(int Id) {return(TexList[Id]);}
|
|
|
|
GLuint GetTexGLId(int Id) {return(TexList[Id].TexID);}
|
2000-10-27 20:18:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
std::vector<sTex> TexList;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
#endif
|