public DynamicTexture(Context context, Format format, Vector4i size) { if (context == null) throw new ArgumentNullException("context"); if (format == null) throw new ArgumentNullException("format"); this.format = format; this.frameBuffer = new FrameBuffer(); this.mainProgram = new Program(); this.dimensions = size; var builder = ShaderBuilder.CreateFromAssemblyResource("Glare.Graphics.Shaders.DynamicTexture.glsl"); mainProgram.Shaders.AddRange( builder.VertexShader("Common", "Vertex"), builder.FragmentShader("Common", "Fragment")); mainProgram.MustLink(); mainProgramAction = mainProgram.FragmentStage.Uniforms["Act"]; mainProgram.Attributes["Position"].BindArray(new Vector2f[] { new Vector2f(-1, 1), new Vector2f(-1, -1), new Vector2f(1, 1), new Vector2f(1, -1) }); }