375 |
DBG(dbg) << "setcurrent pixmap "<<pix<<" "<<ws->pxContext<<"\n"; |
DBG(dbg) << "setcurrent pixmap "<<pix<<" "<<ws->pxContext<<"\n"; |
376 |
bool ret = glXMakeContextCurrent(ws->dpy, pix, pix, ws->pxContext); |
bool ret = glXMakeContextCurrent(ws->dpy, pix, pix, ws->pxContext); |
377 |
DBG(dbg) << "setcurrent pixmap ret: "<<ret<<"\n"; |
DBG(dbg) << "setcurrent pixmap ret: "<<ret<<"\n"; |
378 |
throw "Can't draw into pixmap"; |
if(!ret) throw "Can't draw into pixmap"; |
379 |
return ret; |
return ret; |
380 |
} |
} |
381 |
bool releaseCurrent() { |
bool releaseCurrent() { |
382 |
DBG(dbg) << "Releasecurrent pixmap "<<pix<<" "<<ws->pxContext<<"\n"; |
DBG(dbg) << "Releasecurrent pixmap "<<pix<<" "<<ws->pxContext<<"\n"; |
383 |
bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL); |
bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL); |
384 |
DBG(dbg) << "Releasecurrent pixmap ret: "<<ret<<"\n"; |
DBG(dbg) << "Releasecurrent pixmap ret: "<<ret<<"\n"; |
385 |
throw "Can't draw into pixmap"; |
if(!ret)throw "Can't draw into pixmap"; |
386 |
return ret; |
return ret; |
387 |
} |
} |
388 |
|
|
424 |
DBG(dbg) << "setcurrent pbuf "<<pbuf<<" "<<ws->pbContext<<"\n"; |
DBG(dbg) << "setcurrent pbuf "<<pbuf<<" "<<ws->pbContext<<"\n"; |
425 |
bool ret = glXMakeContextCurrent(ws->dpy, pbuf, pbuf, ws->pbContext); |
bool ret = glXMakeContextCurrent(ws->dpy, pbuf, pbuf, ws->pbContext); |
426 |
DBG(dbg) << "setcurrent pbuf ret: "<<ret<<"\n"; |
DBG(dbg) << "setcurrent pbuf ret: "<<ret<<"\n"; |
427 |
throw "Can't draw into pbuf"; |
if(!ret) throw "Can't draw into pbuf"; |
428 |
return ret; |
return ret; |
429 |
} |
} |
430 |
bool releaseCurrent() { |
bool releaseCurrent() { |
431 |
DBG(dbg) << "Releasecurrent pbuf "<<pbuf<<" "<<ws->pbContext<<"\n"; |
DBG(dbg) << "Releasecurrent pbuf "<<pbuf<<" "<<ws->pbContext<<"\n"; |
432 |
bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL); |
bool ret = glXMakeContextCurrent(ws->dpy, None, None, NULL); |
433 |
DBG(dbg) << "Releasecurrent pbuf ret: "<<ret<<"\n"; |
DBG(dbg) << "Releasecurrent pbuf ret: "<<ret<<"\n"; |
434 |
throw "Can't draw into pbuf"; |
if(!ret) throw "Can't draw into pbuf"; |
435 |
return ret; |
return ret; |
436 |
} |
} |
437 |
|
|