summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/glwrapper-ogl.h
diff options
context:
space:
mode:
authorIxtli <cg@325i.org>2010-03-12 06:56:44 +0900
committerEnne Walker <ennewalker@users.sourceforge.net>2010-04-24 10:19:44 -0400
commit96377c8e38ae1d751bc7cc2ff82fcfd36faf5e05 (patch)
tree1c64996c73d249fe757cff2a2c358d6246edb8b7 /crawl-ref/source/glwrapper-ogl.h
parentdc2af3903aaf06dcb886af528decf017a3e0c1ce (diff)
downloadcrawl-ref-96377c8e38ae1d751bc7cc2ff82fcfd36faf5e05.tar.gz
crawl-ref-96377c8e38ae1d751bc7cc2ff82fcfd36faf5e05.zip
Made glwrapper use proper dynamic dispatch for modularity.
Diffstat (limited to 'crawl-ref/source/glwrapper-ogl.h')
-rw-r--r--crawl-ref/source/glwrapper-ogl.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/crawl-ref/source/glwrapper-ogl.h b/crawl-ref/source/glwrapper-ogl.h
new file mode 100644
index 0000000000..836550c610
--- /dev/null
+++ b/crawl-ref/source/glwrapper-ogl.h
@@ -0,0 +1,37 @@
+#ifndef OGL_GL_WRAPPER_H
+#define OGL_GL_WRAPPER_H
+
+#ifdef USE_TILE
+#include "glwrapper.h"
+
+#ifdef USE_GL
+class OGLStateManager : public GLStateManager
+{
+public:
+ OGLStateManager();
+
+ // State Manipulation
+ virtual void set(const GLState& state);
+ virtual void pixelstore_unpack_alignment(unsigned int bpp);
+ virtual void reset_view_for_redraw(float x, float y);
+ virtual void reset_view_for_resize(coord_def &m_windowsz);
+ virtual void set_transform( const GLW_3VF *trans = NULL,
+ const GLW_3VF *scale = NULL);
+ virtual void reset_transform();
+ virtual void set_current_color(GLW_3VF &color);
+ virtual void set_current_color(GLW_4VF &color);
+
+ // Drawing GLPrimitives
+ virtual void draw_primitive(const GLPrimitive &prim);
+
+ // Texture-specific functinos
+ virtual void delete_textures(size_t count, unsigned int *textures);
+ virtual void generate_textures(size_t count, unsigned int *textures);
+ virtual void bind_texture(unsigned int texture);
+ virtual void load_texture(unsigned char *pixels, unsigned int width,
+ unsigned int height, MipMapOptions mip_opt);
+};
+
+#endif // USE_GL
+#endif // USE_TILE
+#endif // OGL_GL_WRAPPER_H