Panda3D
Loading...
Searching...
No Matches
dxVertexBufferContext9.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 dxVertexBufferContext9.h
10 * @author drose
11 * @date 2005-03-18
12 */
13
14#ifndef DXVERTEXBUFFERCONTEXT9_H
15#define DXVERTEXBUFFERCONTEXT9_H
16
17#include "pandabase.h"
18#include "dxgsg9base.h"
19#include "vertexBufferContext.h"
20#include "deletedChain.h"
21
23
24/**
25 * Caches a GeomVertexArrayData in the DirectX device as a vertex buffer.
26 */
27class EXPCL_PANDADX DXVertexBufferContext9 : public VertexBufferContext {
28public:
32 ALLOC_DELETED_CHAIN(DXVertexBufferContext9);
33
34 virtual void evict_lru();
35
36 LPDIRECT3DVERTEXBUFFER9 _vbuffer;
37 int _fvf;
38
39public:
40 static TypeHandle get_class_type() {
41 return _type_handle;
42 }
43 static void init_type() {
44 VertexBufferContext::init_type();
45 register_type(_type_handle, "DXVertexBufferContext9",
46 VertexBufferContext::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.
A GraphicsStateGuardian for rendering into DirectX9 contexts.
Caches a GeomVertexArrayData in the DirectX device as a vertex buffer.
This is the data for one array of a GeomVertexData structure.
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:81
This is a special class object that holds all the information returned by a particular GSG to indicat...
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.