JuicyGraphics/src/JuicyGraphics/renderer/graphicalObjects/gridBackground.cs

25 lines
728 B
C#

using System.Numerics;
using System.Windows.Forms;
using SharpGL.Shaders;
using SharpGL;
using SharpGL.Enumerations;
using System.Reflection;
using System.IO;
namespace Graphics.Objects {
class gridBackground : iGraphicalObject {
const double realTileSize = 24.0f;
public void render(renderCam context) {
Shader renderGrid = new Shader();
renderGrid.Create(context.GL, OpenGL.GL_FRAGMENT_SHADER, "background.frag");
context.GL.Begin(BeginMode.Quads);
context.GL.Vertex(-1.0, -1.0);
context.GL.Vertex(1.0, -1.0);
context.GL.Vertex(1.0, 1.0);
context.GL.Vertex(-1.0, 1.0);
context.GL.End();
}
}
}