Panda3D
Loading...
Searching...
No Matches
dxIndexBufferContext9.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file dxIndexBufferContext9.h
10 * @author drose
11 * @date 2005-03-18
12 */
13
14#ifndef DXINDEXBUFFERCONTEXT9_H
15#define DXINDEXBUFFERCONTEXT9_H
16
17#include "pandabase.h"
18#include "dxgsg9base.h"
19#include "indexBufferContext.h"
20
21/**
22 * Caches a GeomPrimitive in the DirectX device as an index buffer.
23 */
24class EXPCL_PANDADX DXIndexBufferContext9 : public IndexBufferContext {
25public:
26 DXIndexBufferContext9(PreparedGraphicsObjects *pgo, GeomPrimitive *data);
27 virtual ~DXIndexBufferContext9();
28
29 virtual void evict_lru();
30
31 void free_ibuffer();
34 bool upload_data(const GeomPrimitivePipelineReader *reader, bool force);
35
36 IDirect3DIndexBuffer9 *_ibuffer;
37 int _managed;
38
39public:
40 static TypeHandle get_class_type() {
41 return _type_handle;
42 }
43 static void init_type() {
44 IndexBufferContext::init_type();
45 register_type(_type_handle, "DXIndexBufferContext9",
46 IndexBufferContext::get_class_type());
47 }
48 virtual TypeHandle get_type() const {
49 return get_class_type();
50 }
51 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
52
53private:
54 static TypeHandle _type_handle;
55};
56
58
59#endif
virtual void evict_lru()
Evicts the page from the LRU.
bool upload_data(const GeomPrimitivePipelineReader *reader, bool force)
Copies the latest data from the client store to DirectX.
void free_ibuffer()
Free index buffer.
void allocate_ibuffer(DXScreenData &scrn, const GeomPrimitivePipelineReader *reader)
Allocates index buffer memory.
void create_ibuffer(DXScreenData &scrn, const GeomPrimitivePipelineReader *reader)
Creates a new index buffer (but does not upload data to it).
Encapsulates the data from a GeomPrimitive, pre-fetched for one stage of the pipeline.
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...