/[gzz]/gzz/gfx/libos/Os-GLX.cxx
ViewVC logotype

Diff of /gzz/gfx/libos/Os-GLX.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by tjl, Sat Jan 18 14:53:08 2003 UTC revision 1.22 by tjl, Sat Jan 25 12:12:51 2003 UTC
# Line 25  Os-GLX.cxx Line 25  Os-GLX.cxx
25   * or GNU/LinuX, whichever you prefer.   * or GNU/LinuX, whichever you prefer.
26   */   */
27    
 #include <GL/gl.h>  
 #include <GL/glx.h>  
 #include <X11/keysym.h>  
   
28  #include <sys/time.h>  #include <sys/time.h>
29  #include <time.h>  #include <time.h>
30  #include <unistd.h>  #include <unistd.h>
31  #include <fcntl.h>  #include <fcntl.h>
32    
 #include <libos/Os.hxx>  
   
 #include </usr/include/gdk-pixbuf-1.0/gdk-pixbuf/gdk-pixbuf.h>  
   
33  #include <vector>  #include <vector>
34  #include <map>  #include <map>
35    
36    #include <GL/gl.h>
37    #include <GL/glx.h>
38    #include <X11/keysym.h>
39    
40    #include </usr/include/gdk-pixbuf-1.0/gdk-pixbuf/gdk-pixbuf.h>
41    
42    #include <libos/Os.hxx>
43  #include <libutil/Debug.hxx>  #include <libutil/Debug.hxx>
44    
45    
46    
47    
48    
49  #define BARF(m) { cerr << m << "\n"; exit(18); }  #define BARF(m) { cerr << m << "\n"; exit(18); }
50    
51    
# Line 362  namespace Os { Line 364  namespace Os {
364          }          }
365    
366          bool setCurrent() {          bool setCurrent() {
367                DBG(dbg) << "setcurrent pixmap "<<pix<<" "<<ws->pxContext<<"\n";
368              bool ret = glXMakeContextCurrent(ws->dpy, pix, pix, ws->pxContext);              bool ret = glXMakeContextCurrent(ws->dpy, pix, pix, ws->pxContext);
369                DBG(dbg) << "setcurrent pixmap ret: "<<ret<<"\n";
370              return ret;              return ret;
371          }          }
372          bool releaseCurrent() {          bool releaseCurrent() {
373                DBG(dbg) << "Releasecurrent pixmap "<<pix<<" "<<ws->pxContext<<"\n";
374              bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL);              bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL);
375                DBG(dbg) << "Releasecurrent pixmap ret: "<<ret<<"\n";
376              return ret;              return ret;
377          }          }
378    
# Line 411  namespace Os { Line 417  namespace Os {
417          }          }
418    
419          bool setCurrent() {          bool setCurrent() {
420                DBG(dbg) << "setcurrent pbuf "<<pbuf<<" "<<ws->pbContext<<"\n";
421              bool ret = glXMakeContextCurrent(ws->dpy, pbuf, pbuf, ws->pbContext);              bool ret = glXMakeContextCurrent(ws->dpy, pbuf, pbuf, ws->pbContext);
422                DBG(dbg) << "setcurrent pbuf ret: "<<ret<<"\n";
423              return ret;              return ret;
424          }          }
425          bool releaseCurrent() {          bool releaseCurrent() {
426                DBG(dbg) << "Releasecurrent pbuf "<<pbuf<<" "<<ws->pbContext<<"\n";
427              bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL);              bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL);
428                DBG(dbg) << "Releasecurrent pbuf ret: "<<ret<<"\n";
429              return ret;              return ret;
430          }          }
431    
# Line 483  namespace Os { Line 493  namespace Os {
493              // GLERR              // GLERR
494              bool ret = glXMakeCurrent(ws->dpy, xw, ws->dbContext);              bool ret = glXMakeCurrent(ws->dpy, xw, ws->dbContext);
495              // GLERR              // GLERR
496              DBG(dbg) << "setcurrent : "<<ret<<"\n";              DBG(dbg) << "setcurrent returned: "<<ret<<"\n";
497              return ret;              return ret;
498          }          }
499    
# Line 493  namespace Os { Line 503  namespace Os {
503              // GLERR              // GLERR
504              bool ret = glXMakeCurrent(ws->dpy, None, NULL);              bool ret = glXMakeCurrent(ws->dpy, None, NULL);
505              // GLERR              // GLERR
506              DBG(dbg) << "release : "<<ret<<"\n";              DBG(dbg) << "release returned: "<<ret<<"\n";
507              return ret;              return ret;
508          }          }
509    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26