Created
December 20, 2017 08:43
-
-
Save anonymous/1b39d10c71a5bfe754be1c8188f10814 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[StructLayout(LayoutKind.Sequential)] | |
public struct GbColor | |
{ | |
public byte R; | |
public byte G; | |
public byte B; | |
} | |
private readonly GbColor[] _framebuffer = new GbColor[160 * 144]; | |
// ... rendering | |
GL.Clear(ClearBufferMask.ColorBufferBit); | |
GL.RasterPos2(-1, 1); | |
GL.PixelZoom(1, -1); | |
GL.DrawPixels(160, 144, PixelFormat.Rgb, PixelType.UnsignedByte, _framebuffer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment