   [C# & OpenTK] RenderBuffer
  RenderBuffer problemeHello,For my 2d framework (C# & openTK), I want to use RenderBuffer. Here's the class : public class RenderBuffer{/// <summary>/// /// </summary>/// <param name="size"></param>public RenderBuffer(Size size){Size = size;GL.Enable(EnableCap.DepthTest);GL.ClearDepth(1.0f);GL.DepthFunc(DepthFunction.Lequal);GL.Disable(EnableCap.CullFace);GL.PolygonMode(MaterialFace.Back, PolygonMode.Line);// Create Color TexColorTexture = new Texture(size);// Create Depth TexDepthTexture = new Texture(size);GL.TexImage2D(TextureTarget.Texture2D, 0, (PixelInternalFormat)All.DepthComponent32, size.Width, size.Height, 0, PixelFormat.DepthComponent, PixelType.UnsignedInt, IntPtr.Zero);// Create a FBO and attach the texturesGL.Ext.GenFramebuffers(1, out FBOHandle);GL.Ext.BindFramebuffer(FramebufferTarget.FramebufferExt, FBOHandle);GL.Ext.FramebufferTexture2D(FramebufferTarget.FramebufferExt, FramebufferAttachment.ColorAttachment0Ext, TextureTarget.Texture2D, ColorTexture.Handle, 0);GL.Ext.FramebufferTexture2D(FramebufferTarget.FramebufferExt, FramebufferAttachment.DepthAttachmentExt, TextureTarget.Texture2D, DepthTexture.Handle, 0);End();}/// <summary>/// /// </summary>~RenderBuffer(){//if (ColorTexture != null)//   ColorTexture = null;//if (DepthTexture != 0)//   GL.DeleteTextures(1, ref DepthTexture);//if (FBOHandle != 0)//   GL.Ext.DeleteFramebuffers(1, ref FBOHandle);}/// <summary>/// "Binding" the render buffer/// </summary>public void Start(){GL.Ext.BindFramebuffer(FramebufferTarget.FramebufferExt, FBOHandle);GL.PushAttrib(AttribMask.ViewportBit);GL.Viewport(0, 0, Size.Width, Size.Height);GL.MatrixMode(MatrixMode.Projection);GL.PushMatrix();GL.LoadIdentity();//// screen_1//GL.Ortho(0, Size.Width, Size.Height, 0, -1, 1);//// screen_2////GL.Ortho(0, Size.Width, 0, Size.Height, -1, 1);}/// <summary>/// "Release" the render buffer/// </summary>public void End(){GL.MatrixMode(MatrixMode.Projection);GL.PopMatrix();GL.PopAttrib();GL.Ext.BindFramebuffer(FramebufferTarget.FramebufferExt, 0);}#region Properties/// <summary>/// /// </summary>uint FBOHandle;/// <summary>/// Size of the FrameBuffer/// </summary>public Size Size{get;private set;}/// <summary>/// /// </summary>public Texture ColorTexture{get;private set;}/// <summary>/// /// </summary>public Texture DepthTexture{get;private set;}#endregion}The expected result is a white filled rectangle at (1,1 x 10,10) (at top left).In the RenderBuffer::Start(), if I use GL.Ortho(0, Size.Width, Size.Height, 0, -1, 1) here's the result :If I use GL.Ortho(0, Size.Width, 0, Size.Height, -1, 1), here's the result :In the first case, the output is good but Y inverted, in the second case, rendering is well ordered but everything is rendered in wire mode.   