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

25 lines
728 B
C#
Raw Normal View History

2019-02-14 15:46:16 +01:00
using System.Numerics;
2019-02-15 01:14:17 +01:00
using System.Windows.Forms;
using SharpGL.Shaders;
using SharpGL;
using SharpGL.Enumerations;
using System.Reflection;
using System.IO;
2019-02-14 15:46:16 +01:00
namespace Graphics.Objects {
class gridBackground : iGraphicalObject {
2019-02-15 01:14:17 +01:00
const double realTileSize = 24.0f;
2019-02-14 15:46:16 +01:00
public void render(renderCam context) {
2019-02-15 01:14:17 +01:00
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();
2019-02-14 15:46:16 +01:00
}
}
}