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 / Cool DirectX tricks with DarkGDK

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Nov 2007 06:50 Edited at: 21st Nov 2007 06:51
Well, here's my first DarkGDK app. With a small (incomplete) GUI library.



I wanted to keep it as much DGDK styled as possible (Meaning no OOP). Code taken from WinGUI's old version and reused in slightly different way. I made this because someone asked me if it was possible to render to multiple windows, so here's the code.

Screenshot uploaded.

Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums

Attachments

Login to view attachments
Lover of games
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location:
Posted: 21st Nov 2007 13:38
thanks Aaron

"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 21st Nov 2007 14:47
Yeah, thanks Aaron! I'm sure it'll become handy!

...Now is there anyone who knows how to enable AA in DBP and/or DGDK?!!

Cheers,
-Try
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 22nd Nov 2007 00:08
@Lover of games & Try
Thanks

@Try
Sure, why not. Under assumption all you have to do is set the direct3d presentation parameters to allow antialiasing, set the swap chain to the default swap effect, then reset the direct3d device.


Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 22nd Nov 2007 00:28
So Cool

Better to be dead, than to live your life afraid.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 22nd Nov 2007 00:31 Edited at: 22nd Nov 2007 01:20
Here's the progress.... It's not working but here's the progress (Make sure DarkGDK and globstruct are included)...



Antialiasing - Edit
Well it's "working", but antialiasing isn't actually getting used. I probably forgot something somewhere.


Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 22nd Nov 2007 05:54
Aaron,
I like you man
(will try it after work - tonight)

Hmm... hey, so there's chance for 8x/16x Anisotropic filtering to be enabled instead of that default bad looking Bilinear texture filtering, huh?

I'll have a look ( to night - no DGDK at the moment! at work; you know )

This topic is getting HOT man... keep it that way... *HOT*

Cheers,
-Try
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 22nd Nov 2007 17:33
Thanks. I'd like antialiasing to work for a project I'm working on atm too <A custom GUI>.


Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 22nd Nov 2007 21:42
Well, I'm working on window/form transparency in DGDK, will post the result in a few day

btw, how about changing the topic name to... hmm, 'DirectX Tricks', huh?

Cheers,
-Try
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 22nd Nov 2007 22:01
And how would I go about doing that?

Window transparency, eh?


Code just has to be modified slightly. Make sure the window in question is using a WS_LAYERED flag in the style.

Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 23rd Nov 2007 21:24
Hey Aaron,
I couldn't run any of these codes (except the first one)
I mean they didn't give me what I expected?!!
(But I still like this topic, because I can learn from it and I have the opportunity to try to find and share the answers to my questions with someone else)

Antialising: I don't know how to 'reset' the device, it doesn't give me S_OK (HRESULT), but it returns a negative number which I believe must be an error code or something!

Window Transparency: I got it half to work! actually it works if I drag and drop the window to the corners as a little part of the window goes out of windows desktop bounds!!!! (even one pixel)

But it doesn't work if the DGDK window is inside of the desktop!!! I'll try to see if I can figure out the message that a window (DGDK's) sends to Windows (OS) to process to cause redraw/repaint of the window! (DGDK's)

Note:I'll send the code of the window color keying whether I get it to work properly or not!

Render to multiple windows:
Q: what if I want to draw something else in one of those windows in your first code? (Render different things to different/multiple windows)

Quote: "btw, how about changing the topic name to... hmm, 'DirectX Tricks', huh?"

Quote: "And how would I go about doing that?"

I guess we can't but I'm sure that mods can!

Cheers,
-Try
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 23rd Nov 2007 23:44
@Try
Heh heh, okay well:
Quote: "Antialising: I don't know how to 'reset' the device, it doesn't give me S_OK (HRESULT), but it returns a negative number which I believe must be an error code or something!"

Antialiasing isn't working yet. At this point I feel more like "Code? I hate code. Code is dumb. I know I need to know what it does, but I don't know how to know what to know!". This is in relation to getting DBP to play nice. If I recall correctly the device fails to be created for some reason.

Quote: "Window Transparency: I got it half to work! actually it works if I drag and drop the window to the corners as a little part of the window goes out of windows desktop bounds!!!! (even one pixel)"

Remember, the window in question must have a style flag of "WS_LAYERED".

Quote: "Render to multiple windows:
Q: what if I want to draw something else in one of those windows in your first code? (Render different things to different/multiple windows)"

In the begin/end scene you would render whatever geometry you wish for the specific window. I haven't done much multi-window programming. The above example was just to show that if you wanted to render your scene elsewhere, it's possible.

@Mods
Will you change the topic title to "Cool DirectX tricks with DarkGDK" please? I'd appreciate it.

Cheers,

-naota

Madness never stops..... It takes a breather every once in a while, but then it grabs it's enhaler and chases you down the street with a cane.
Aex.Uni forums
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 24th Nov 2007 12:49
Quote: "@Mods
Will you change the topic title to "Cool DirectX tricks with DarkGDK" please? I'd appreciate it."

WOW , me too, thanks guys...

Cheers,
-Try
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 24th Nov 2007 23:19
Oh cool. Thanks.

Cheers,

-naota

Madness never stops..... It takes a breather every once in a while, but then it grabs it's inhaler and chases you down the street with a cane.
Aex.Uni forums

Login to post a reply

Server time is: 2024-11-16 20:27:48
Your offset time is: 2024-11-16 20:27:48