/[gzz]/gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/FileSetTextureMemoryConsumer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Mon Jan 13 07:31:35 2003 UTC revision 1.2 by tjl, Tue Jan 14 08:58:17 2003 UTC
# Line 2  Line 2 
2    
3  package gzz.gfx.gl;  package gzz.gfx.gl;
4  import gzz.mem.*;  import gzz.mem.*;
5    import gzz.client.*;
6    
7  /** A memory consumer for a texture which is loaded from a set of files  /** A memory consumer for a texture which is loaded from a set of files
8   * (of different resolutions) at request.   * (of different resolutions) at request.
9   */   */
10  public abstract class FileSetTextureMemoryConsumer extends TextureMemoryConsumer {  public abstract class FileSetTextureMemoryConsumer extends TextureMemoryConsumer {
11    
12        Runnable r_runTexImage = new Runnable() {
13            public void run() { runTexImage(); }
14        };
15        Runnable r_runRequest = new Runnable() {
16            public void run() { runRequest(); }
17        };
18    
19        static final int STATE_IDLE = 0,
20                         STATE_REQUESTED = 1,
21                         STATE_TEXIMAGING = 2;
22    
23      public class File {      public class File {
24          int w, h;          int w, h;
25          String name;          String name;
26      }      }
27    
28        int state;
29    
30        private void runRequest() {
31            state = STATE_TEXIMAGING;
32            // High priority, we're using a lot of memory
33            AbstractUpdateManager.doWhenIdle(r_runRequest, -10);
34        }
35    
36        private void runTexImage() {
37        }
38    
39            
40            
41  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26