title: How to render image properly
body: <p>My image appears too large when it is rendered using SharpGL. How do I load it properly? The image's dimension is only 313 x 79 pixels but it almost occupy the rest of the screen when it renders.</p>
  
  <p>I got this code from codeplex. The example given is how to render images in 3D (name of project is NativeTexturesSample).
  <a href="https://sharpgl.codeplex.com/downloads/get/614989" rel="nofollow">https://sharpgl.codeplex.com/downloads/get/614989</a>. I manage to make the rendering in 2D but I think I'm not doing it correctly.</p>
  
  <pre><code>    private void openGLControl1_OpenGLDraw(object sender, RenderEventArgs e)
      {
          const int screenWidth = 1920;
          const int screenHeight = 1080;
  
          SharpGL.OpenGL gl = this.openGLControl1.OpenGL;
  
          gl.MatrixMode(OpenGL.GL_PROJECTION);
          gl.Ortho2D(0, screenWidth , screenHeight , 0);
          gl.Disable(OpenGL.GL_DEPTH_TEST);
  
          gl.LoadIdentity();
          texture.Create(gl, @"C:\image\footerlogo.bmp");
          texture.Bind(gl);
  
          gl.Begin(OpenGL.GL_QUADS);
  
          gl.TexCoord(0.0f, 1.0f); gl.Vertex(-2.0f, 0.0f);
          gl.TexCoord(1.0f, 1.0f); gl.Vertex(1.0f, 0.0f);
          gl.TexCoord(1.0f, 0.0f); gl.Vertex(1.0f, 1.0f);
          gl.TexCoord(0.0f, 0.0f); gl.Vertex(-2.0f, 1.0f);
  
          gl.End();
  
          gl.Flush();
      }
  </code></pre>