public GraphicsUtilities(MapGraphics graphics) { _graphics = graphics; WhiteTexture = GL.GenTexture(); GL.BindTexture(TextureTarget.Texture2D, WhiteTexture); GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba8, 1, 1, 0, OpenTK.Graphics.OpenGL.PixelFormat.Luminance, PixelType.UnsignedByte, _whiteTexData); }
private void UpdateProjection(MapGraphics graphics) { _projection = Matrix4.CreateOrthographic(graphics.NormalizedWidth / Scale, graphics.NormalizedHeight / Scale, 0.0001f, 0x8000); }
public MapCameraTopView(MapGraphics graphics) { graphics.OnSizeChanged += (sender, e) => UpdateProjection(graphics); UpdateProjection(graphics); }