Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
VideoDX9VertexBuffer.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: VideoDX9VertexBuffer.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Vertex and Index Buffer classes for DirectX 9
13
*/
14
15
#ifndef VideoDX9VertexBuffer_h
16
#define VideoDX9VertexBuffer_h
17
18
#include "
VideoDX9.h
"
19
20
// +--------------------------------------------------------------------+
21
22
class
VideoDX9VertexBuffer
23
{
24
public
:
25
VideoDX9VertexBuffer
(
VideoDX9
* dx9,
26
UINT num_verts,
27
UINT vert_size,
28
DWORD format,
29
DWORD usage);
30
~VideoDX9VertexBuffer
();
31
32
BYTE*
Lock
(UINT count);
33
void
Unlock
();
34
bool
Select
(
int
stream=0);
35
36
UINT
GetNumVerts
()
const
;
37
UINT
GetVertSize
()
const
;
38
UINT
GetNextVert
()
const
;
39
40
private
:
41
VideoDX9
* video;
42
IDirect3DVertexBuffer9* vertex_buffer;
43
44
UINT num_verts;
45
UINT num_locked;
46
UINT vert_size;
47
UINT next_vert;
48
bool
is_dynamic;
49
};
50
51
// +--------------------------------------------------------------------+
52
53
class
VideoDX9IndexBuffer
54
{
55
public
:
56
VideoDX9IndexBuffer
(
VideoDX9
* dx9,
57
UINT num_indices,
58
DWORD usage);
59
~VideoDX9IndexBuffer
();
60
61
WORD*
Lock
(UINT count);
62
void
Unlock
();
63
bool
Select
();
64
65
UINT
GetNumIndices
()
const
;
66
UINT
GetNextIndex
()
const
;
67
68
private
:
69
VideoDX9
* video;
70
IDirect3DIndexBuffer9* index_buffer;
71
72
UINT num_indices;
73
UINT num_locked;
74
UINT next_index;
75
bool
is_dynamic;
76
};
77
78
#endif VideoDX9VertexBuffer_h
79
nGenEx
VideoDX9VertexBuffer.h
Generated on Thu May 31 2012 16:30:59 for Starshatter_Open by
1.8.1