Hello,
I am new to Dark programming and recently purchased DarkGDK.NET. I have a C# project in VS 2008 that I want to embed a 2d grapic window into a picturebox inside a winform.
What I'm looking to do is create a DarkGDK.NET equivilent of some code I created using Blitz3d SDK. It's basically streaming pixel information from a file (CDG, karaoke bitmaps) and doing a writepixel every 250 milliseconds. So here are the key Blitz 3d commands in use:
CDG_IMAGE = bb.CreateImage(301, 217, 1)
bb.MaskImage(CDG_IMAGE, 5, 5, 5);
bb.SetBuffer(bb.ImageBuffer(CDG_IMAGE));
bb.LockBuffer(bb.ImageBuffer(CDG_IMAGE));
bb.WritePixelFast(x, y, CDG_COLOR_TABLE[CDG_SCREEN[x, y, CDG_BUFFER_FRONT], 4] | 0x000000, bb.ImageBuffer(CDG_IMAGE)); //used in two embedded for loops for x and y
bb.UnlockBuffer(bb.ImageBuffer(CDG_IMAGE));
bb.SetBuffer(bb.BackBuffer());
bb.DrawImage(CDG_IMAGE, x, y);
bb.SetBuffer(bb.BackBuffer())
bb.Flip();
Can someone show me a code snip of how to accomplish this in GDK .NET? And is there actually a better way to accomplish this to not be a CPU hog?
Thank you!