mirror of
https://github.com/glest/glest-source.git
synced 2025-08-09 18:06:30 +02:00
- added leak_dumper header all over the place (not yet functional in linux)
- Bugfix for particle cleanup
This commit is contained in:
62
source/shared_lib/include/graphics/buffer.h
Normal file
62
source/shared_lib/include/graphics/buffer.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#ifndef _SHARED_GRAPHICS_BUFFER_H_
|
||||
#define _SHARED_GRAPHICS_BUFFER_H_
|
||||
|
||||
#include <string>
|
||||
#include "leak_dumper.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace Shared{ namespace Graphics{
|
||||
|
||||
// =====================================================
|
||||
// class VertexBuffer
|
||||
// =====================================================
|
||||
|
||||
class VertexBuffer{
|
||||
private:
|
||||
static const int texCoordCount = 8;
|
||||
static const int attribCount = 8;
|
||||
|
||||
private:
|
||||
void *positionPointer;
|
||||
void *normalPointer;
|
||||
|
||||
void *texCoordPointers[texCoordCount];
|
||||
int texCoordCoordCounts[texCoordCount];
|
||||
|
||||
void *attribPointers[attribCount];
|
||||
int attribCoordCounts[attribCount];
|
||||
string attribNames[attribCount];
|
||||
|
||||
public:
|
||||
VertexBuffer();
|
||||
virtual ~VertexBuffer(){};
|
||||
|
||||
virtual void init(int size)= 0;
|
||||
|
||||
void setPositionPointer(void *pointer);
|
||||
void setNormalPointer(void *pointer);
|
||||
void setTexCoordPointer(void *pointer, int texCoordIndex, int coordCount);
|
||||
void setAttribPointer(void *pointer, int attribIndex, int coordCount, const string &name);
|
||||
};
|
||||
|
||||
// =====================================================
|
||||
// class IndexBuffer
|
||||
// =====================================================
|
||||
|
||||
class IndexBuffer{
|
||||
private:
|
||||
void *indexPointer;
|
||||
|
||||
public:
|
||||
IndexBuffer();
|
||||
virtual ~IndexBuffer(){}
|
||||
|
||||
virtual void init(int size)= 0;
|
||||
|
||||
void setIndexPointer(void *pointer);
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user