aboutsummaryrefslogtreecommitdiff
path: root/generic/tkZinc.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkZinc.h')
-rw-r--r--generic/tkZinc.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/generic/tkZinc.h b/generic/tkZinc.h
index 361fdd2..5ff75b1 100644
--- a/generic/tkZinc.h
+++ b/generic/tkZinc.h
@@ -34,6 +34,7 @@
#include "Item.h"
#include "List.h"
#include "MapInfo.h"
+#include "glu.h"
typedef struct _ZnTagSearch {
ZnWInfo *wi;
@@ -60,6 +61,25 @@ typedef struct _ZnTagSearch {
ZnList item_stack;
} ZnTagSearch;
+/*
+ * Structure used by the tesselator.
+ */
+typedef struct _ZnCombineData {
+ ZnReal v[2];
+ struct _ZnCombineData *next;
+} ZnCombineData;
+
+typedef struct _ZnTess {
+ GLUtesselator *tess;
+ ZnCombineData *combine_list;
+ int type;
+} ZnTess;
+
+ZnList ZnWorkPoints;
+ZnList ZnWorkXPoints;
+ZnList ZnWorkStrings;
+ZnTess ZnTesselator;
+
#ifdef GL
typedef struct _ZnGLContextEntry {
ZnGLContext context;
@@ -67,7 +87,10 @@ typedef struct _ZnGLContextEntry {
ZnReal max_line_width;
ZnReal max_point_width;
unsigned int max_tex_size;
-#ifdef WIN
+#ifdef _WIN32
+ PIXELFORMATDESCRIPTOR pfd;
+ int ipixel;
+ HWND hwnd; /* Temporary storage between MakeCurrent and Release */
HDC hdc;
#else
XVisualInfo *visual; /* Should these two be managed by screen ? */
@@ -77,8 +100,12 @@ typedef struct _ZnGLContextEntry {
} ZnGLContextEntry;
ZnGLContextEntry *ZnGetGLContext(Display *dpy);
-void ZnGLMakeCurrent(Display *dpy, Tk_Window win);
-void ZnGLSwapBuffers(Display *dpy, Tk_Window win);
+ZnGLContextEntry *ZnGLMakeCurrent(Display *dpy, Tk_Window win);
+#ifdef _WIN32
+void ZnGLReleaseContext(ZnGLContextEntry *ce);
+#else
+#define ZnGLReleaseContext(ce)
+#endif
#endif
int ZnParseCoordList(ZnWInfo *wi, Tcl_Obj *arg, ZnPoint **pts,