Panda3D
tinyTextureContext.h
1 // Filename: tinyTextureContext.h
2 // Created by: drose (30Apr08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef TINYTEXTURECONTEXT_H
16 #define TINYTEXTURECONTEXT_H
17 
18 #include "pandabase.h"
19 #include "textureContext.h"
20 #include "deletedChain.h"
21 #include "zgl.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : TinyTextureContext
25 // Description :
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_TINYDISPLAY TinyTextureContext : public TextureContext {
28 public:
29  INLINE TinyTextureContext(PreparedGraphicsObjects *pgo, Texture *tex, int view);
30  ALLOC_DELETED_CHAIN(TinyTextureContext);
31 
32  ~TinyTextureContext();
33 
34  virtual void evict_lru();
35 
36  GLTexture _gltex;
37 
38 public:
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  TextureContext::init_type();
44  register_type(_type_handle, "TinyTextureContext",
45  TextureContext::get_class_type());
46  }
47  virtual TypeHandle get_type() const {
48  return get_class_type();
49  }
50  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
51 
52 private:
53  static TypeHandle _type_handle;
54 };
55 
56 #include "tinyTextureContext.I"
57 
58 #endif
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Definition: texture.h:75
This is a special class object that holds all the information returned by a particular GSG to indicat...
virtual void evict_lru()
Evicts the page from the LRU.
A table of objects that are saved within the graphics context for reference by handle later...
Definition: zgl.h:123
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85