11 void imtk_post_redisplay(void)
20 glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TRANSFORM_BIT);
22 glDisable(GL_DEPTH_TEST);
23 glDisable(GL_STENCIL_TEST);
24 glDisable(GL_ALPHA_TEST);
25 glDisable(GL_TEXTURE_1D);
26 glDisable(GL_TEXTURE_2D);
27 glDisable(GL_CULL_FACE);
28 glDisable(GL_SCISSOR_TEST);
29 glDisable(GL_LIGHTING);
31 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
34 imtk_get_viewport(&width, &height);
36 glMatrixMode(GL_PROJECTION);
39 glTranslatef(-1, 1, 0);
40 glScalef(2.0 / width, -2.0 / height, 1.0);
42 glMatrixMode(GL_MODELVIEW);
49 glMatrixMode(GL_PROJECTION);
51 glMatrixMode(GL_MODELVIEW);
57 void imtk_label(const char *str, int x, int y)
59 if(x == IMTK_AUTO || y == IMTK_AUTO) {
60 imtk_layout_get_pos(&x, &y);
63 glColor4fv(imtk_get_color(IMTK_TEXT_COLOR));
64 imtk_draw_string(x, y + 14, str);
65 imtk_layout_advance(imtk_string_size(str), 12);