ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/texcache.c
(Generate patch)

Comparing deliantra/Deliantra-Client/texcache.c (file contents):
Revision 1.1 by root, Tue Jul 4 23:23:32 2006 UTC vs.
Revision 1.2 by root, Tue Jul 4 23:56:34 2006 UTC

6typedef struct { 6typedef struct {
7 GLuint name; 7 GLuint name;
8 int x, y, w, h; 8 int x, y, w, h;
9} tc_area; 9} tc_area;
10 10
11extern int tc_generation;
12
11void tc_get (tc_area *area, int width, int height); 13void tc_get (tc_area *area, int width, int height);
12void tc_put (tc_area *area); 14void tc_put (tc_area *area);
13void tc_clear (); 15void tc_clear ();
14 16
15///////////////////////////////////////////////////////////////////////////// 17/////////////////////////////////////////////////////////////////////////////
16 18
17#include <glib.h> 19#include <glib.h>
20
21int tc_generation;
18 22
19typedef struct tc_texture { 23typedef struct tc_texture {
20 struct tc_texture *next; 24 struct tc_texture *next;
21 GLuint name; 25 GLuint name;
22 int avail; 26 int avail;
43 tc_texture *next = first_texture->next; 47 tc_texture *next = first_texture->next;
44 glDeleteTextures (1, &first_texture->name); 48 glDeleteTextures (1, &first_texture->name);
45 g_slice_free (tc_texture, first_texture); 49 g_slice_free (tc_texture, first_texture);
46 first_texture = next; 50 first_texture = next;
47 } 51 }
52
53 ++tc_generation;
48} 54}
49 55
50void 56void
51tc_get (tc_area *area, int width, int height) 57tc_get (tc_area *area, int width, int height)
52{ 58{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines