forked from eu07/maszyna
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVBO.h
42 lines (39 loc) · 1.02 KB
/
VBO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
#ifndef VBOH
#define VBOH
//---------------------------------------------------------------------------
class CVertNormTex
{
public:
float x; // X wierzcho³ka
float y; // Y wierzcho³ka
float z; // Z wierzcho³ka
float nx; // X wektora normalnego
float ny; // Y wektora normalnego
float nz; // Z wektora normalnego
float u; // U mapowania
float v; // V mapowania
};
class CMesh
{ // wsparcie dla VBO
public:
int m_nVertexCount; // liczba wierzcho³ków
CVertNormTex *m_pVNT;
unsigned int m_nVBOVertices; // numer VBO z wierzcho³kami
CMesh();
~CMesh();
void MakeArray(int n); // tworzenie tablicy z elementami VNT
void BuildVBOs(bool del = true); // zamiana tablic na VBO
void Clear(); // zwolnienie zasobów
bool StartVBO();
void EndVBO();
bool StartColorVBO();
};
#endif