Mercurial > hg > Game > Cerium
view Renderer/Engine/TextureHash.h @ 1047:f87218eed9fc draft
broken texure ( h/w != 2^n ) protection
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 08 Dec 2010 05:38:45 +0900 |
parents | 3bc98f6d31ff |
children | ee481853d5dd |
line wrap: on
line source
#ifndef INCLUDED_TEXTURE_HASH #define INCLUDED_TEXTURE_HASH const int TABLE_SIZE = 8192; struct hashtable{ int tx_id; char* key; }; class TextureHash { public: hashtable *table; TextureHash(void); ~TextureHash(void); int hash_function(const char* image_name); int hash_regist(const char* image_name, int &tx_id); void remove(int id) { table[id].tx_id = -1; } }; #endif