version 1.5 | | version 1.6 |
---|
| | |
#include "vers_id.h" | | #include "vers_id.h" |
#include "error.h" | | #include "error.h" |
#include "event.h" | | #include "event.h" |
| | #ifdef XFREE86_DGA |
| | #include <X11/extensions/xf86dga.h> |
| | #include <X11/extensions/xf86vmode.h> |
| | #endif |
| | |
static int attribs[]={GLX_RGBA,GLX_DOUBLEBUFFER,None}; | | static int attribs[]={GLX_RGBA,GLX_DOUBLEBUFFER,None}; |
| | |
| | |
Window win; | | Window win; |
XVisualInfo *visinfo; | | XVisualInfo *visinfo; |
GLXContext glxcontext; | | GLXContext glxcontext; |
| | static int fullscreen=0; |
| | |
| | int gr_check_fullscreen(void){ |
| | return fullscreen; |
| | } |
| | int gr_toggle_fullscreen(void){ |
| | fullscreen^=1; |
| | // grd_curscreen->sc_mode=0;//hack to get it to reset screen mode |
| | if (gl_initialized){ |
| | if (fullscreen){ |
| | XMoveWindow(dpy,win,0,0); |
| | #ifdef XFREE86_DGA |
| | //make fullscreen |
| | #endif |
| | }else{ |
| | #ifdef XFREE86_DGA |
| | //return to normal |
| | #endif |
| | } |
| | } |
| | return fullscreen; |
| | } |
| | |
void ogl_swap_buffers(void){ | | void ogl_swap_buffers(void){ |
ogl_do_palfx(); | | ogl_do_palfx(); |
| | |
swa.event_mask=ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask| ButtonPressMask | ButtonReleaseMask | PointerMotionMask; | | swa.event_mask=ExposureMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask| ButtonPressMask | ButtonReleaseMask | PointerMotionMask; |
// swa.event_mask=ExposureMask | StructureNotifyMask; | | // swa.event_mask=ExposureMask | StructureNotifyMask; |
win = XCreateWindow(dpy,RootWindow(dpy,visinfo->screen),0,0,x,y,0,visinfo->depth,InputOutput,visinfo->visual,CWBorderPixel|CWColormap|CWEventMask,&swa); | | win = XCreateWindow(dpy,RootWindow(dpy,visinfo->screen),0,0,x,y,0,visinfo->depth,InputOutput,visinfo->visual,CWBorderPixel|CWColormap|CWEventMask,&swa); |
// XStoreName(dpy,win,DESCENT_VERSION " " D1X_DATE); | | XStoreName(dpy,win,DESCENT_VERSION " " D1X_DATE); |
XStoreName(dpy,win,"agry"); | | // XStoreName(dpy,win,"agry"); |
XMapWindow(dpy,win); | | XMapWindow(dpy,win); |
| | |
glXMakeCurrent(dpy,win,glxcontext); | | glXMakeCurrent(dpy,win,glxcontext); |
| | |
#ifdef GII_XWIN | | #ifdef GII_XWIN |
init_gii_xwin(dpy,win); | | init_gii_xwin(dpy,win); |
#endif | | #endif |
| | if (fullscreen) |
| | XMoveWindow(dpy,win,0,0); |
} | | } |
return 0; | | return 0; |
} | | } |