- dpy=new Graphics::Display;
-
- Graphics::WindowOptions wopt;
- wopt.width=screen_w;
- wopt.height=screen_h;
- wopt.fullscreen=fullscreen;
- wnd=new Graphics::Window(*dpy, wopt);
-
- Graphics::GLOptions glopt;
- //glopt.multisample=4;
- glc=new Graphics::GLContext(*wnd, glopt);
-
- wnd->signal_close.connect(sigc::bind(sigc::mem_fun(this, &Engineer::exit), 0));
- wnd->signal_button_press.connect(sigc::mem_fun(this, &Engineer::button_press));
- wnd->signal_button_release.connect(sigc::mem_fun(this, &Engineer::button_release));
- wnd->signal_pointer_motion.connect(sigc::mem_fun(this, &Engineer::pointer_motion));
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
- glEnable(GL_COLOR_MATERIAL);
- glDepthFunc(GL_LEQUAL);
- glEnable(GL_BLEND);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
- DataFile::load(ui_res, "engineer.res");
- root=new GLtk::Root(ui_res, *wnd);
- root->set_visible(true);