nanogui: What am I doing wrong? Images not displayed....
Subject:
What am I doing wrong? Images not displayed....
From:
Yan Seiner ####@####.####
Date:
7 Dec 2005 14:53:49 +0000
Message-Id: <4396F764.7000707@seiner.com>
I've go the following piece of code:
window_id = GrNewWindowEx(GR_WM_PROPS_APPWINDOW, title,
GR_ROOT_WINDOW_ID, 0, 0, w, h, GREEN);
GrSelectEvents(window_id,
GR_EVENT_MASK_CLOSE_REQ|GR_EVENT_MASK_EXPOSURE);
GrMapWindow(window_id);
gc_id = GrNewGC();
GrDrawImageToFit(window_id, gc_id, sx,sy, w,h, image_id);
sleep(SLEEPTIME);
GrDestroyWindow(window_id);
GrDestroyGC(gc_id);
GrFreeImage(image_id);
GrClose();
exit(0);
What is supposed to happen is that the image is displayed for SLEEPTIME,
then the viewer exits.
What is happening is that the viewer sleeps for SLEEPTIME on the green
screen, then updates the screen displaying the picture, and then exits....
I must be missing some sort of magical update screen function, but I
can't find it...