{
if( running() ) {
quit();
- join();
}
+ join();
commands.remove_all_objects();
delete lock_sync;
delete next_command;
Display *display = command->display;
XLockDisplay(display);
XUnlockDisplay(display);
+ glXMakeContextCurrent(display, None, None, 0);
XCloseDisplay(display);
#endif
}
table_lock->lock("BC_Resources::release_textures");
for(int i = 0; i < pbuffer_ids.total; i++) {
PBufferID *ptr = pbuffer_ids.values[i];
- if(ptr->w == w && ptr->h == h && ptr->glx_pbuffer == glx_pbuffer) {
+ if( ptr->w == w && ptr->h == h && ptr->glx_pbuffer == glx_pbuffer ) {
exists = 1;
break;
}
}
-
if(!exists) {
PBufferID *ptr = new PBufferID(current_window->get_id(),
glx_pbuffer, glx_context, w, h);
table_lock->unlock();
}
-GLXPbuffer BC_Synchronous::get_pbuffer(int w,
- int h,
- int *window_id,
- GLXContext *glx_context)
+GLXPbuffer BC_Synchronous::get_pbuffer(int w, int h, GLXContext *glx_context)
{
table_lock->lock("BC_Resources::release_textures");
for(int i = 0; i < pbuffer_ids.total; i++) {
ptr->window_id == current_window->get_id() ) {
GLXPbuffer result = ptr->glx_pbuffer;
*glx_context = ptr->glx_context;
- *window_id = ptr->window_id;
ptr->in_use = 1;
table_lock->unlock();
return result;
table_lock->lock("BC_Resources::release_textures");
for(int i = 0; i < pbuffer_ids.total; i++) {
PBufferID *ptr = pbuffer_ids.values[i];
- if(ptr->window_id == window_id) {
+ if( ptr->window_id == window_id ) {
ptr->in_use = 0;
}
}