#include <msp/gl/blend.h>
+#include <msp/gl/extensions/arb_shader_objects.h>
+#include <msp/gl/programbuilder.h>
+#include <msp/gl/uniform.h>
#include <msp/input/keys.h>
#include <msp/time/units.h>
#include <msp/time/utils.h>
camera.set_orthographic(geom.w, geom.h);
update_camera();
+ if(GL::ARB_shader_objects)
+ {
+ shprog = new GL::Program;
+ GL::ProgramBuilder::StandardFeatures features;
+ features.material = true;
+ features.texture = true;
+ GL::ProgramBuilder(features).add_shaders(*shprog);
+ shprog->link();
+ }
+ else
+ shprog = 0;
+
update_style();
if(mouse)
Root::~Root()
{
+ delete shprog;
if(own_input)
{
delete keyboard;
GL::Bind bind_blend(GL::Blend::alpha());
GL::Renderer renderer(&camera);
+ renderer.set_shader_program(shprog);
Widget::render(renderer);
}
#include <sigc++/trackable.h>
#include <msp/gl/camera.h>
+#include <msp/gl/program.h>
#include <msp/graphics/window.h>
#include <msp/input/keyboard.h>
#include <msp/input/mouse.h>
Time::TimeStamp tooltip_timeout;
Widget *tooltip_target;
Msp::GL::Camera camera;
+ Msp::GL::Program *shprog;
public:
/** Creates a Root widget for a window. The geometry is set to match the