I’m looking for a simple way to implement a framebuffer in C#, D or Java. Something (an API or library) that would allow me to work with a 2d array of colors and update individual pixels or areas. Also, something that doesn’t incur large overhead on update. I know that this can be done with OpenGL, but the API seems far too complicated for what I’m doing.
Share
Try using a plain old
System.Drawing.Bitmapin .NET?You could use
Bitmap.Lockbits()to get access to the byte array behind the bitmap and update it. This is much more efficient than normal pixel operations on the bitmap.MSDN has an example here that I’ve pasted from: