voxspatium/src/planet/PlanetIndexBuffer.h

28 lines
615 B
C++

#ifndef __PLANETINDEXBUFFER_H__
#define __PLANETINDEXBUFFER_H__
#include "util/Common.h"
struct PIB {
GLuint ebo;
std::vector<uint> indices;
};
enum PlanetBufferIndex {
Base, FixR, FixL, FixB, FixT, FixTR, FixTL, FixBR, FixBL
};
class PlanetIndexBuffer {
public:
PlanetIndexBuffer(unsigned int resolution);
~PlanetIndexBuffer();
PIB* getBuffer(PlanetBufferIndex idx);
private:
void createBuffer(PlanetBufferIndex idx, bool fanTop = false, bool fanRight = false, bool fanLeft = false, bool fanBottom = false);
PIB* m_buffers[9];
unsigned int m_resolution;
};
#endif // __PLANETINDEXBUFFER_H__