2014-04-14 05:20:16 +02:00
|
|
|
#ifndef _LC_CONTEXT_H_
|
|
|
|
#define _LC_CONTEXT_H_
|
|
|
|
|
2014-04-20 03:50:41 +02:00
|
|
|
#include "lc_array.h"
|
|
|
|
|
2014-04-14 05:20:16 +02:00
|
|
|
class lcContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
lcContext();
|
|
|
|
~lcContext();
|
|
|
|
|
2014-04-16 02:29:54 +02:00
|
|
|
void SetDefaultState();
|
|
|
|
|
2014-04-14 05:20:16 +02:00
|
|
|
void SetWorldViewMatrix(const lcMatrix44& WorldViewMatrix);
|
|
|
|
void SetProjectionMatrix(const lcMatrix44& ProjectionMatrix);
|
|
|
|
// void SetColor(const lcVector4& Color);
|
|
|
|
void SetLineWidth(float LineWidth);
|
|
|
|
|
|
|
|
void BindMesh(lcMesh* Mesh);
|
|
|
|
void UnbindMesh();
|
|
|
|
void DrawMeshSection(lcMesh* Mesh, lcMeshSection* Section);
|
2014-04-20 03:50:41 +02:00
|
|
|
void DrawOpaqueMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcRenderMesh>& OpaqueMeshes);
|
|
|
|
void DrawTranslucentMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcRenderMesh>& TranslucentMeshes);
|
2014-04-14 05:20:16 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
GLuint mVertexBufferObject;
|
|
|
|
GLuint mIndexBufferObject;
|
|
|
|
char* mVertexBufferPointer;
|
|
|
|
char* mIndexBufferPointer;
|
|
|
|
char* mVertexBufferOffset;
|
|
|
|
|
|
|
|
lcTexture* mTexture;
|
|
|
|
float mLineWidth;
|
|
|
|
int mMatrixMode;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _LC_CONTEXT_H_
|