Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / CreateImage, DrawImage, WritePixel in DarkGDK.NET

Author
Message
Sunriser
15
Years of Service
User Offline
Joined: 30th Jan 2009
Location:
Posted: 31st Jan 2009 07:08
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:



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!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Feb 2009 02:07
Um... Sprites Maybe.. you could use a couple like a marquee and keep streaming data to the sprite(sprites) that are off screen and scroll them into scene as you go.. recycling the one(s) that just left the screen area maybe?

Just poking at your question... Don't know Bitx code much (none)

If you're just writing to a backbuffer and swapping... You can do something similiar with the odd egg bitmap commands ZERO is Screen, others are for scratch.. but I've never eard "FAST" and "Bitmap commands" in the same sentance. I usually only mess with them for spash screns during load up or whatever... but they are cool - just not blazing fast.

Um... I Think you can paste images to bitmap ZERO though... just remember that DarkGDK does its own back buffer flipping... So you are actually always "one behind" the displayed image.. Take that into account in your experimenting.

Case and point ... In many situations, when you use dbPrint("Hi world") you have to call dbSync() twice to see the text appear.

--Jason

Login to post a reply

Server time is: 2024-09-30 17:38:22
Your offset time is: 2024-09-30 17:38:22