aboutsummaryrefslogtreecommitdiff
path: root/generic/tkZinc.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkZinc.c')
-rw-r--r--generic/tkZinc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/generic/tkZinc.c b/generic/tkZinc.c
index b065698..dfa9614 100644
--- a/generic/tkZinc.c
+++ b/generic/tkZinc.c
@@ -981,6 +981,7 @@ ZnGLSwapBuffers(ZnGLContextEntry *ce,
#endif
+#ifdef GL
static void
InitRendering(ZnWInfo *wi)
{
@@ -989,7 +990,6 @@ InitRendering(ZnWInfo *wi)
GLfloat r[2]; /* Min, Max */
GLint i[1];
-#ifdef GL
if (wi->render) {
# ifdef _WIN32
/*
@@ -1163,8 +1163,8 @@ InitRendering(ZnWInfo *wi)
ZnGLReleaseContext(ce);
}
-#endif /* GL */
}
+#endif /* GL */
/*
@@ -7064,7 +7064,9 @@ Event(ClientData client_data, /* Information about widget. */
SET(wi->flags, ZN_CONFIGURE_EVENT);
if (!wi->gc) {
SET(wi->flags, ZN_REALIZED);
+#ifdef GL
InitRendering(wi);
+#endif
/*
* Get the work GC and suppress GraphicExpose
@@ -7938,10 +7940,11 @@ static void
Destroy(char *mem_ptr) /* Info about the widget. */
{
ZnWInfo *wi = (ZnWInfo *) mem_ptr;
- unsigned int num, i;
+ unsigned int num;
Tcl_HashSearch search;
Tcl_HashEntry *entry;
#ifdef GL
+ unsigned int i;
ZnGLContextEntry *ce;
ZnWInfo **wip;
#endif
@@ -8266,10 +8269,10 @@ Repair(ZnWInfo *wi)
ZnTriStrip tristrip;
#ifdef GL
XColor *color;
+ ZnGLContextEntry *ce;
#endif
int int_width = Tk_Width(wi->win);
int int_height = Tk_Height(wi->win);
- ZnGLContextEntry *ce;
/*SET(wi->flags, ZN_CONFIGURE_EVENT);*/
if (wi->render) {