Example #1
0
        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);
        }
Example #2
0
 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);
 }
Example #3
0
 public void SetShader(string fragmentShaderText)
 {
     t2fb = new TextureToFrameBuffer(fragmentShaderText);
 }