Example #1
0
 void Bound(oglplus::Framebuffer::Target target, F f) {
     fbo.Bind(target);
     onBind(target);
     f();
     onUnbind(target);
     oglplus::DefaultFramebuffer().Bind(target);
 }
Example #2
0
	Example(std::size_t w, std::size_t h)
	 : width(w)
	 , height(h)
	 , font_file("fonts", "FreeSans", ".ttf")
	 , font(font_file)
	{
		using namespace oglplus;

		tex.Bind(TextureTarget::Rectangle);
		fbo.Bind(FramebufferTarget::Read);

		PrepareText();
	}