Example #1
0
        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);
        }
Example #2
0
 private void UpdateProjection(MapGraphics graphics)
 {
     _projection = Matrix4.CreateOrthographic(graphics.NormalizedWidth / Scale, graphics.NormalizedHeight / Scale, 0.0001f, 0x8000);
 }
Example #3
0
 public MapCameraTopView(MapGraphics graphics)
 {
     graphics.OnSizeChanged += (sender, e) => UpdateProjection(graphics);
     UpdateProjection(graphics);
 }