// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bool initialize_glut(int argc, char **argv) { // Create GL context glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE); glutInitWindowSize(g_window_width,g_window_height); g_window_id = glutCreateWindow("Galena"); if(!initialize_gl()) { return false; } // register callbacks glutDisplayFunc(display); glutReshapeFunc(reshape); glutIdleFunc(idle); // create pbo for image XXX should prob be in another initialize_image routine... create_pbo(&g_goal_image_pbo, g_goal_image->get_width(), g_goal_image->get_height(), g_goal_image_data); //create_texture(&g_goal_image_tex, g_goal_image->get_width(), g_goal_image->get_height(), g_goal_image_data); return true; }
void IBackgroundSubtractor_GLSL::initialize(const cv::Mat& oInitImg, const cv::Mat& oROI) { initialize_gl(oInitImg,oROI); }