Example #1
0
        void MergePass(MultiRenderTexture a_renderTexture)
        {
            int progHandle = ((OpenTKProgram)m_defferedShader.InternalObject).Handle;

            GL.UseProgram(progHandle);

            GL.ActiveTexture(TextureUnit.Texture0);
            GL.BindTexture(TextureTarget.Texture2D, ((OpenTKTexture)a_renderTexture.RenderTextures[0].InternalObject).Handle);
            GL.Uniform1(1, 0);

            // I do not need the vertex data however I apparently need data bound so just have an empty object
            OpenTKPipeline pipeline = (OpenTKPipeline)m_graphics.Pipeline.InternalPipeline;

            GL.BindVertexArray(pipeline.StaticVAO);

#if DEBUG_INFO
            Pipeline.GLError("Graphics: Merge Binding: ");
#endif

            GL.DrawArrays(PrimitiveType.TriangleStrip, 0, 4);

#if DEBUG_INFO
            Pipeline.GLError("Graphics: Merging Deffered: ");
#endif
        }
 public OpenTKGraphicsCommand(Pipeline a_pipeline)
 {
     m_pipeline = (OpenTKPipeline)a_pipeline.InternalPipeline;
 }