mesa: Add missing include guards
[mesa.git] / src / mesa / main / dlist.h
index 7a23208ba5a86d4521241895334ce87dd8cef263..1ac17d5bb09d927d052eba8e50c6a7915b527f57 100644 (file)
 #define DLIST_H
 
 #include <stdio.h>
-#include "main/mtypes.h"
+
+struct gl_context;
+
+/**
+ * Describes the location and size of a glBitmap image in a texture atlas.
+ */
+struct gl_bitmap_glyph
+{
+   unsigned short x, y, w, h;  /**< position and size in the texture */
+   float xorig, yorig;         /**< bitmap origin */
+   float xmove, ymove;         /**< rasterpos move */
+};
+
+
+/**
+ * Describes a set of glBitmap display lists which live in a texture atlas.
+ * The idea is when we see a code sequence of glListBase(b), glCallLists(n)
+ * we're probably drawing bitmap font glyphs.  We try to put all the bitmap
+ * glyphs into one texture map then render the glCallLists as a textured
+ * quadstrip.
+ */
+struct gl_bitmap_atlas
+{
+   bool complete;     /**< Is the atlas ready to use? */
+   bool incomplete;   /**< Did we fail to construct this atlas? */
+
+   unsigned numBitmaps;
+   unsigned texWidth, texHeight;
+   struct gl_texture_object *texObj;
+   struct gl_texture_image *texImage;
+
+   unsigned glyphHeight;
+
+   struct gl_bitmap_glyph *glyphs;
+};
+
+void
+_mesa_delete_bitmap_atlas(struct gl_context *ctx,
+                          struct gl_bitmap_atlas *atlas);
 
 
 GLboolean GLAPIENTRY