2013-03-13 07:22:35 +00:00
|
|
|
#ifndef _GL_PRIMITIVE_RENDERER_H
|
|
|
|
#define _GL_PRIMITIVE_RENDERER_H
|
|
|
|
|
|
|
|
#include "OpenGLInclude.h"
|
|
|
|
|
|
|
|
class GLPrimitiveRenderer
|
|
|
|
{
|
|
|
|
int m_screenWidth;
|
|
|
|
int m_screenHeight;
|
|
|
|
|
|
|
|
struct PrimInternalData* m_data;
|
|
|
|
|
|
|
|
void loadBufferData();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
GLPrimitiveRenderer(int screenWidth, int screenHeight);
|
|
|
|
virtual ~GLPrimitiveRenderer();
|
|
|
|
|
|
|
|
void drawRect(float x0, float y0, float x1, float y1, float color[4]);
|
2013-05-25 08:45:43 +00:00
|
|
|
void drawTexturedRect(float x0, float y0, float x1, float y1, float color[4], float u0,float v0, float u1, float v1, int useRGBA=0);
|
2013-03-13 07:22:35 +00:00
|
|
|
void drawLine();//float from[4], float to[4], float color[4]);
|
|
|
|
void setScreenSize(int width, int height);
|
|
|
|
|
|
|
|
PrimInternalData* getData()
|
|
|
|
{
|
|
|
|
return m_data;
|
|
|
|
}
|
2013-07-01 06:19:14 +00:00
|
|
|
|
2013-03-13 07:22:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif//_GL_PRIMITIVE_RENDERER_H
|
|
|
|
|