mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
43 lines
1.0 KiB
C++
43 lines
1.0 KiB
C++
/*
|
|
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
|