aboutsummaryrefslogtreecommitdiff
path: root/generic/tkZinc.c
diff options
context:
space:
mode:
authorlecoanet2004-05-19 19:36:13 +0000
committerlecoanet2004-05-19 19:36:13 +0000
commit4871f254b3e5759f22b3bb27b382313b0cd35376 (patch)
tree26a56b91deb8df98621dc1b1f6ecf2ead250244e /generic/tkZinc.c
parent592f44de430b047a70cf4b1d9b3365d9f44427b6 (diff)
downloadtkzinc-4871f254b3e5759f22b3bb27b382313b0cd35376.zip
tkzinc-4871f254b3e5759f22b3bb27b382313b0cd35376.tar.gz
tkzinc-4871f254b3e5759f22b3bb27b382313b0cd35376.tar.bz2
tkzinc-4871f254b3e5759f22b3bb27b382313b0cd35376.tar.xz
Changed the extent of some GL ifdef so that the file compile
without GL defined.
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) {