I'm trying to draw objects on my screen in 2D and translate them on a pixel by pixel bases. Here is my render code, and for some reason it's not showing my objects anymore. It showed them before I added the Ortho Camera. What's going on?
Thanks!
game.RenderFrame += (sender, e) =>
{
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
GL.Ortho(0, 800, 600, 0, -1, 1);
GL.MatrixMode(MatrixMode.Modelview);
GL.LoadIdentity();
// GL.ActiveTexture(TextureUnit.Texture0);
int textID = loadTexture(Rock);
GL.BindTexture(TextureTarget.Texture2D, textID);
drawObject(100, 20, 0.15f, 0.15f);
drawObject(100, 60, 0.15f, 0.15f);
drawObject(100, 100,0.15f, 0.15f);
game.SwapBuffers();
};
drawObject(PosX, PosY, ScaleX, ScaleY);
and within my drawObject method I am using
`GL.Translate(PosX, PosY, 0);`