tinyTextureContext.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef TINYTEXTURECONTEXT_H
  15. #define TINYTEXTURECONTEXT_H
  16. #include "pandabase.h"
  17. #include "textureContext.h"
  18. #include "deletedChain.h"
  19. #include "zgl.h"
  20. ////////////////////////////////////////////////////////////////////
  21. // Class : TinyTextureContext
  22. // Description :
  23. ////////////////////////////////////////////////////////////////////
  24. class EXPCL_TINYDISPLAY TinyTextureContext : public TextureContext {
  25. public:
  26. INLINE TinyTextureContext(PreparedGraphicsObjects *pgo, Texture *tex);
  27. ALLOC_DELETED_CHAIN(TinyTextureContext);
  28. INLINE ~TinyTextureContext();
  29. virtual void evict_lru();
  30. GLTexture _gltex;
  31. public:
  32. static TypeHandle get_class_type() {
  33. return _type_handle;
  34. }
  35. static void init_type() {
  36. TextureContext::init_type();
  37. register_type(_type_handle, "TinyTextureContext",
  38. TextureContext::get_class_type());
  39. }
  40. virtual TypeHandle get_type() const {
  41. return get_class_type();
  42. }
  43. virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  44. private:
  45. static TypeHandle _type_handle;
  46. };
  47. #include "tinyTextureContext.I"
  48. #endif