title: how to draw Cube using OpenTK & OpenGL in C#
body: <p>I'm in crisis about draw Cube, as the title says.</p>
  
  <p>I tried the graphic only in Unity. But I was done. Using OpenTK and OpenGL in C#.</p>
  
  <p>It was successful to draw the sphere by inputting the value.</p>
  
  <p>Draw the values of the array as you type.</p>
  
  <p>Ex) 2by2 Array => </p>
  
  <p>oo</p>
  
  <p>oo</p>
  
  <p>this is my code about draw Sphere</p>
  
  <pre><code> void DrawSphere()
      {
       OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Lighting);
          OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Light0);
          OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Normalize);
          OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.ColorMaterial);
          //OpenTK.Graphics.OpenGL.GL.Enable(OpenTK.Graphics.OpenGL.EnableCap.Texture2D);
          OpenTK.Graphics.OpenGL.GL.ShadeModel(OpenTK.Graphics.OpenGL.ShadingModel.Smooth);
  
          // Draw green sphere
          OpenTK.Graphics.OpenGL.GL.Color3(0.8f, 0.8f, 255.0f);
          //textureid = LoadTex("dd.png");
          float x, y, z;
  
          y = 0.0F;
          x = 0.0F;
          x = (((Properties.Settings.Default.simulRow * camera.rowGap) - camera.rowGap) / 2) * -1.0F;
          for (int i = 0; i &lt; Properties.Settings.Default.simulRow; i++)
          {
              z = (((Properties.Settings.Default.simulCol * camera.colGap) - camera.colGap) / 2) * -1.0F;
  
              for (int j = 0; j &lt; Properties.Settings.Default.simulCol; j++)
              {
                  //y = ballImage[i, j].height / camera.calibrate_div;
                  y = (camera.calibrate_div / 2.0f) - Math.Abs(ballImage[i, j].current_height);
                  //System.Diagnostics.Debug.WriteLine(ballImage[0, 0].current_height);
                  OpenTK.Graphics.OpenGL.GL.PushMatrix();
                  OpenTK.Graphics.OpenGL.GL.Translate(x, y, z);
                  //OpenTK.Graphics.OpenGL.GL.BindTexture(OpenTK.Graphics.OpenGL.TextureTarget.Texture2D, textureid);
  
                  //OpenTK.Graphics.Glu.QuadricTexture(esfera, true);
                  OpenTK.Graphics.OpenGL.GL.Rotate(90, 1.0f, 0.0f, 0.0f);
                  //OpenTK.Graphics.OpenGL.GL.Rotate(0.0f, 1.0f, 1.0f, 1.0f);
                  OpenTK.Graphics.Glu.Sphere(esfera, 1.0f, 24, 24);
                  //OpenTK.Graphics.Glu.Tex(esfera, 1.0f, 24, 24);
                  OpenTK.Graphics.OpenGL.GL.PopMatrix();
                  if (i == 5 &amp;&amp; j == 5)
                  {
                      // OpenTK.Graphics.Glu.Sphere(esfera, 100.0f, 24, 24);
                  }
  
                  z += camera.rowGap;
              }
              x += camera.colGap;
  
          }
  }
  </code></pre>