From 0e652cdcfd509fdde56afa2ad7b24dafd50af154 Mon Sep 17 00:00:00 2001 From: lemort Date: Tue, 22 Jan 2008 08:33:42 +0000 Subject: Ajout de l'item viewport qui permet de deleguer le rendu dans une zone rectangulaire a une librairie externe. Pour l'instant, seule l'implementation Windows fonctionne: le rendu est deleguea une DLL qui doit contenir certaines fonctions --- generic/tkZinc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'generic/tkZinc.c') diff --git a/generic/tkZinc.c b/generic/tkZinc.c index d6e5215..5c577e7 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -1533,6 +1533,12 @@ ZincObjCmd(ClientData client_data, /* Main window associated with wi->damaged_area_w = wi->damaged_area_h = 0; /* + * Viewport item management init + */ + wi->nb_of_viewport_items = 0; + + + /* * Text management init. */ wi->text_info.sel_color = NULL; @@ -8805,6 +8811,13 @@ Repair(ZnWInfo *wi) //printf("Repair, scissors: %d\n", ISCLEAR(wi->flags, ZN_CONFIGURE_EVENT)); ce = ZnGLMakeCurrent(wi->dpy, wi); + + // PRE-RENDERING Method. Called for non directAccess viewports and other special effects + // ONLY IF WE HAVE AT LEAST ONE VIEWPORT + if (wi->nb_of_viewport_items > 0) { + wi->top_group->class->PreRender(wi->top_group); + } + glDrawBuffer(GL_BACK); #if defined(GL) && defined(ROTATION) -- cgit v1.1