GdkGLContext *glcontext = gtk_widget_get_gl_context(widget);
GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable(widget);
-
+ if(view->flush==1)
+ {
/*** OpenGL BEGIN ***/
- if (!gdk_gl_drawable_gl_begin(gldrawable, glcontext))
- return FALSE;
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glLoadIdentity();
- glexpose_main(view); //draw all stuff
+ if (!gdk_gl_drawable_gl_begin(gldrawable, glcontext))
+ return FALSE;
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glLoadIdentity();
+ glexpose_main(view); //draw all stuff
/* Swap buffers */
- if (gdk_gl_drawable_is_double_buffered(gldrawable))
- gdk_gl_drawable_swap_buffers(gldrawable);
- else
- glFlush();
- gdk_gl_drawable_gl_end(gldrawable);
+ if (gdk_gl_drawable_is_double_buffered(gldrawable))
+ gdk_gl_drawable_swap_buffers(gldrawable);
+ else
+ glFlush();
+ gdk_gl_drawable_gl_end(gldrawable);
/*** OpenGL END ***/
- if (view->initFile)
- {
- view->initFile=0;
- if (view->activeGraph == 0)
- close_graph(view,0);
- add_graph_to_viewport_from_file(view->initFileName);
+ if (view->initFile)
+ {
+ view->initFile=0;
+ if (view->activeGraph == 0)
+ close_graph(view,0);
+ add_graph_to_viewport_from_file(view->initFileName);
+ }
}
return TRUE;
char* template_file;
char* glade_file;
char* attr_file;
+ int flush;
#ifdef UNUSED
static int get_temp_coords2(topview* t,int level,int v,double* coord_x,double* coord_y,float *R,float *G,float *B);
#endif
-static int FLUSH=1;
static void color_interpolation(glCompColor srcColor,glCompColor tarColor,glCompColor* color,int levelcount,int level)
{
void drawtopologicalfisheye(topview * t)
{
- if (FLUSH==1)
- {
get_active_frame(t);
drawtopfishnodes(t);
drawtopfishedges(t);
if(!t->animate)
- drawtopfishnodelabels(t);
- FLUSH=0;
- }
+ drawtopfishnodelabels(t);
+
}
t->Nodes[ind].degree = agdegree(g, v, 1, 1);
if (t->Nodes[ind].degree > t->maxnodedegree)
t->maxnodedegree=t->Nodes[ind].degree;
+ view->Topview->Nodes[ind].Label=NULL;
t->Nodes[ind].node_alpha = 1;
for (e = agfstout(g, v); e; e = agnxtout(g, e))
expose_event(view->drawing_area, NULL, NULL);
return 1;
}
- return 0;
+ return 1;
}
void get_data_dir()
view->Topview->Graphdata.selectedEdgesCount=0;
view->Topview->Graphdata.selectedNodes=0;
view->colschms=NULL;
-
+ view->flush=1;
//create fontset