version 1.3 | | version 1.4 |
---|
| | |
glClear(GL_COLOR_BUFFER_BIT); | | glClear(GL_COLOR_BUFFER_BIT); |
} | | } |
int ogl_init_window(int x, int y){ | | int ogl_init_window(int x, int y){ |
ogl_destroy_window();//destroy current window before making a new one | | if (gl_initialized){ |
| | XResizeWindow(dpy,win,x,y); |
| | glViewport(0,0,x,y); |
| | }else { |
glxcontext=glXCreateContext(dpy,visinfo,0,GL_TRUE); | | glxcontext=glXCreateContext(dpy,visinfo,0,GL_TRUE); |
| | // ogl_destroy_window();//destroy current window before making a new one |
| | |
//create colormap | | //create colormap |
swa.colormap=XCreateColormap(dpy,RootWindow(dpy,visinfo->screen),visinfo->visual,AllocNone); | | swa.colormap=XCreateColormap(dpy,RootWindow(dpy,visinfo->screen),visinfo->visual,AllocNone); |
| | |
#ifdef GII_XWIN | | #ifdef GII_XWIN |
init_gii_xwin(dpy,win); | | init_gii_xwin(dpy,win); |
#endif | | #endif |
| | } |
return 0; | | return 0; |
} | | } |
void ogl_destroy_window(void){ | | void ogl_destroy_window(void){ |