ultimatepp/uppsrc/GLDraw/GLDraw.h
cxl f615f8490e GLDraw: glew added
git-svn-id: svn://ultimatepp.org/upp/trunk@6440 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2013-10-16 18:36:00 +00:00

44 lines
673 B
C++

#ifndef _GlDraw_GlDraw_h_
#define _GlDraw_GlDraw_h_
#include <Draw/Draw.h>
#include "glew.h"
#ifdef flagWINGL
#include "wglew.h"
#endif
#include <GL/gl.h>
namespace Upp {
// #define USE_VBO 1
class GLDraw : public SDraw {
void SetColor(Color c);
uint64 context;
#ifdef USE_VBO
GLuint vbo, tbo;
#endif
public:
virtual void PutImage(Point p, const Image& m, const Rect& src);
virtual void PutRect(const Rect& r, Color color);
void Init(Size sz, uint64 context = 0);
static void ClearCache();
static void ResetCache();
GLDraw() { context = 0; /* vbo = 0; tbo = 0; */ }
~GLDraw();
};
};
#endif