public VisualContext() { GL.Disable(EnableCap.DepthTest); GL.ClearColor(1, 0, 0, 0); surface = new RenderSurfacePingPong(); copyToScreen = new TextureToFrameBuffer(); shaderDefault = ShaderLoader.FromStrings(TextureToFrameBuffer.VertexShaderScreenQuad, TextureToFrameBuffer.FragmentShaderChecker); }
public Rasterizer(int resolutionX, int resolutionY, DrawHandler drawHandler) { if (ReferenceEquals(null, drawHandler)) { throw new ArgumentException("Draw handler must not equal null!"); } this.drawHandler = drawHandler; copyToFrameBuffer = new TextureToFrameBuffer(); texRenderSurface = Texture.Create(resolutionX, resolutionY); texRenderSurface.FilterNearest(); renderToTexture = new FBO(texRenderSurface); }
public void SetShader(string fragmentShaderText) { t2fb = new TextureToFrameBuffer(fragmentShaderText); }