{
this->agui = agui;
original = 0;
+ modify_edl = 0;
folder = 0;
}
{
close_window();
this->original = folder;
- agui->mwindow->edl->add_user();
+ this->modify_edl = agui->mwindow->edl;
+ this->modify_edl->add_user();
this->folder = new BinFolder(*folder);
this->wx = x; this->wy = y;
this->ww = w; this->wh = h;
}
delete folder; folder = 0;
original = 0;
- agui->mwindow->edl->remove_user();
+ modify_edl->remove_user();
}
void ModifyFolderThread::handle_close_event(int result)
#include "awindowgui.inc"
#include "binfolder.inc"
#include "datatype.h"
+#include "edl.inc"
#include "filesystem.h"
#include "guicast.h"
#include "indexable.h"
AWindowGUI *agui;
BinFolder *original, *folder;
ModifyFolderGUI *window;
+ EDL *modify_edl;
};
session->copy(edl->session);
}
- if( !session_only ) {
+ if( session_only <= 0 ) {
local_session->copy_from(edl->local_session);
}
}
char string[BCTEXTLEN];
new_edl->create_objects();
- new_edl->copy_session(edl);
+ new_edl->copy_session(edl, -1);
new_file->set_program(edl->session->program_no);
sprintf(string, _("Loading %s"), new_asset->path);
glColor4f(1, 1, 1, 1);
glDisable(GL_BLEND);
- if(command->frame) {
-// Render to PBuffer
- command->frame->enable_opengl();
- command->frame->set_opengl_state(VFrame::SCREEN);
- canvas_w = command->frame->get_w();
- canvas_h = command->frame->get_h();
- }
- else {
-// Render to canvas
- canvas_w = window->get_w();
- canvas_h = window->get_h();
- }
-
//printf("Playback3D::overlay_sync 1 %d\n", command->input->get_opengl_state());
switch( command->input->get_opengl_state() ) {
case VFrame::SCREEN:
command->input->enable_opengl();
command->input->screen_to_texture();
- if(command->frame)
- command->frame->enable_opengl();
- else
- window->enable_opengl();
break;
default:
printf("Playback3D::overlay_sync unknown state\n");
break;
}
+ if(command->frame) {
+// Render to PBuffer
+ command->frame->enable_opengl();
+ command->frame->set_opengl_state(VFrame::SCREEN);
+ canvas_w = command->frame->get_w();
+ canvas_h = command->frame->get_h();
+ }
+ else {
+// Render to canvas
+ window->enable_opengl();
+ canvas_w = window->get_w();
+ canvas_h = window->get_h();
+ }
+
const char *shader_stack[16];
memset(shader_stack,0, sizeof(shader_stack));
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->glx_pbuffer == pbuffer ) {
ptr->in_use = 0;
}
}
this->h = h;
this->colormodel = colormodel;
texture_id = -1;
- texture_id = -1;
texture_w = 0;
texture_h = 0;
texture_components = 0;
#ifdef HAVE_GL
int prev_id = -1;
glGetIntegerv(GL_ACTIVE_TEXTURE, &prev_id);
- glActiveTexture(this->texture_id);
+ glActiveTexture(GL_TEXTURE31);
+ glBindTexture(GL_TEXTURE_2D, texture_id);
+ glEnable(GL_TEXTURE_2D);
int w = get_texture_w(), h = get_texture_h();
- uint8_t img[w*h*3];
+ uint8_t *img = new uint8_t[w*h*3];
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, img);
write_ppm(img, w, h, "%s", fn);
+ delete img;
glActiveTexture(prev_id);
#endif
}
void VFrame::create_pbuffer()
{
- if(pbuffer &&
- pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id())
+ if( pbuffer && (pbuffer->w != get_w() || pbuffer->h != get_h() ||
+ pbuffer->window_id != BC_WindowBase::get_synchronous()->current_window->get_id() ) )
{
delete pbuffer;
pbuffer = 0;