Panda3D
dxIndexBufferContext9.h
1 // Filename: dxIndexBufferContext9.h
2 // Created by: drose (18Mar05)
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 DXINDEXBUFFERCONTEXT9_H
16 #define DXINDEXBUFFERCONTEXT9_H
17 
18 #include "pandabase.h"
19 #include "dxgsg9base.h"
20 #include "indexBufferContext.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : DXIndexBufferContext9
24 // Description : Caches a GeomPrimitive in the DirectX device as
25 // an index buffer.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDADX DXIndexBufferContext9 : public IndexBufferContext {
28 public:
30  virtual ~DXIndexBufferContext9();
31 
32  virtual void evict_lru();
33 
34  void free_ibuffer();
35  void allocate_ibuffer(DXScreenData &scrn, const GeomPrimitivePipelineReader *reader);
36  void create_ibuffer(DXScreenData &scrn, const GeomPrimitivePipelineReader *reader);
37  bool upload_data(const GeomPrimitivePipelineReader *reader, bool force);
38 
39  IDirect3DIndexBuffer9 *_ibuffer;
40  int _managed;
41 
42 public:
43  static TypeHandle get_class_type() {
44  return _type_handle;
45  }
46  static void init_type() {
47  IndexBufferContext::init_type();
48  register_type(_type_handle, "DXIndexBufferContext9",
49  IndexBufferContext::get_class_type());
50  }
51  virtual TypeHandle get_type() const {
52  return get_class_type();
53  }
54  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
60 #include "dxIndexBufferContext9.I"
61 
62 #endif
This is a special class object that holds all the information returned by a particular GSG to indicat...
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
Definition: geomPrimitive.h:63
virtual void evict_lru()
Evicts the page from the LRU.
Caches a GeomPrimitive in the DirectX device as an index buffer.
A table of objects that are saved within the graphics context for reference by handle later...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.