internal void apply(Shader shader, string targetName) { Fbo target = getBuffer(targetName); target.updateTexture(delegate() { Shader.Bind(shader); FullscreenQuad.render(null, target.Width, target.Height); Shader.Unbind(); }); }
protected override void doProvide(RenderArgs ra) { if (sh != null) { Shader.Bind(sh); } callCommands(); // lets call the commands FullscreenQuad.render(null, Target.Width, Target.Height); if (sh != null) { Shader.Unbind(); } }
protected override void Subscribed() { var(services, builder) = IsometricSetup.SetupEngine(Exchange, IsometricLabyrinthLoader.DefaultWidth, IsometricLabyrinthLoader.DefaultHeight, IsometricLabyrinthLoader.DefaultBaseHeight, IsometricLabyrinthLoader.DefaultTilesPerRow, _cmdLine.Backend, _cmdLine.UseRenderDoc, new Rectangle(0, 0, IsometricLabyrinthLoader.DefaultWidth * IsometricLabyrinthLoader.DefaultTilesPerRow, IsometricLabyrinthLoader.DefaultHeight * 10)); var config = Resolve <IGeneralConfig>(); services .Add(new InputManager().RegisterMouseMode(MouseMode.Normal, new NormalMouseMode())) .Add(new InputBinder((disk, jsonUtil) => InputConfig.Load(config.BasePath, disk, jsonUtil))) ; _mainFramebuffer = new MainFramebuffer(); _quadRenderer = new FullscreenQuadRenderer(); var quad = new FullscreenQuad("Quad", DrawLayer.MaxLayer, ((SimpleFramebuffer)builder.Framebuffer).Color, _mainFramebuffer, new Vector4(-1, -1, 2, 2)); var source = new AdhocRenderableSource(new[] { quad }); services.Add(_mainFramebuffer); services.Add(_quadRenderer); services.Add(quad); Exchange.Attach(services); var renderer = Resolve <ISceneRenderer>(); renderer.AddRenderer(_quadRenderer, typeof(FullscreenQuad)); renderer.AddSource(source); Raise(new InputModeEvent(InputMode.IsoBake)); Raise(new SetSceneEvent(SceneId.IsometricBake)); Raise(new SetClearColourEvent(0, 0, 0, 0)); Raise(new EngineFlagEvent(FlagOperation.Set, EngineFlags.ShowBoundingBoxes)); Resolve <IEngine>().Run(); }