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 / [DGDK.NET] Time for a better renderer.

Author
Message
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 11th Sep 2007 08:27
Just an introduction:

Back on January, some weeks after when LightEngine's CTO was released (DarkEngine at the time) I started working on a GUI plugin (that would then be called LightUI). Due to DGDK slow text rendering, I had to work with GDI+ for the graphics (DGDK wouldn't handle 5 different text colors very well). Then, due to DGDK inability to load from memory streams, I had to save every image to a file, then load it to and Image then a Sprite. Just too slow! So I gave up after a couple of months (to better focus on LightEngine).

Knowing about Cloggy's plugin for DBPro (on this forum) gave me a hope, and I knew DGDK.NET had a command to get the D3D device, although I thought I would have to learn a lot of C++ to get it work, but i had an idea! I installed an oldie april 2006 DX SDK and searched for my Managed DirectX 9 books (I have both Miller's books, but never really read the second or got as far as page 100 from the first). But it was time to go to university!

Got really bored in the class, and turned on the laptop to explore DX docs... Yeah, it had a constructor compatible with DGDK.NET. And yes, I was able to make a small progress!

Attached is a demo + plugin (I call it LightTextEx as LightEngine has a LightText class). LightEngine is NOT required (although Managed DirectX is). It prints a text 500 times every sync (something like 30.000 a second), changing the color everytime.

It might look slow, but don't yell at your Video card, I thinks this only depends on CPU+RAM, these are my results:

Quote: "Desktop: 13~15 fps
AthlonXP 2200+ (1.8GHz 256KB cache), 1GB DDR 333, Radeon X1650 Pro 512MB GDDR3"


Quote: "Laptop: constant 19 fps
Pentium M 2.0GHz (2MB cache), 1GB DDR2 667MHz, VIA S3 64MB (Shared)"


PS: I think I'll throw my radeon in the garbage, LOL!

Attachments

Login to view attachments
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 11th Sep 2007 08:34
It should be "A better TEXT renderer"

Ok, just to add some info: Although this demo is simple, I don't think it's useless (yep, the plugin is almost useless). But I think this shows that it's doable with 100% managed code!

I'll have more time to investigate it on the weekend (exams and band show during this week), but I think it may be possible to port the Managed DirectX UI (that came with the SDK) to DGDK.NET, and THAT will be a great thing, because it will be a great addition "windows like" interfaces (and as far as I know, it can be customized by the use of a DDS texture).

I'd like to know what everybody think!
Is anyone interested on a new D3D Text plugin?
And what about a port from DX CustomUI?

Cheers!
Thiago
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 11th Sep 2007 11:25
I got this:

LoaderLock was detected in LightTextEx.Initialize(GetDarkGDKGlobals());

Something I need?

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 11th Sep 2007 17:14
Yep, I forgot to mention:

-Open the Exceptions menu (Debug->Exception)
-Open Managed
-Uncheck the throw for OS Loader Lock

VS 2005 and Managed DirectX don't like the other that much, I got this from MS's forums, but it is ok.
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 11th Sep 2007 19:06
OMG...... Thats just perfect kBessa

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game

Login to post a reply

Server time is: 2024-11-16 20:55:30
Your offset time is: 2024-11-16 20:55:30