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 / Dark GDK's DirectX and WinGUI

Author
Message
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 07:58
As you should know, I have been working on updating Dark GDK. As of now, I’m in the middle of approximately 50 additions, fixes and optimizations, before releasing the next update. I began working on this with a game in mind and decided to look into the Dark GDK code, before I run into any snafus. I just started working on the level editor. This will be based on FPS Creator or should I say, the gamefx system. But more geared to general level editing instead of FPS game creation.

Attached to this post is a screenshot of the level editor, so far. Nothing in the code is anything new or an ancient secret, so in the next post is attached the Dark GDK source. I am concerned if this works in any windows system or configuration.

Thanks.

Attachments

Login to view attachments
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 08:00
I would rather not have to disable window resize, but I cannot find a consistent method of getting the windows controls and the Dark GDK’s DirextX window to coincide happily together. For the windows controls and tab panels, I can add splitter controls to adjust with the window as it is resized. I tried making ClientRect global and using the difference to set the camera view and aspect. I even added offsets, but there seems be no consistency.

Attachments

Login to view attachments
Timidon
13
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 09:19
Excellent work!

There are many answers but just one question" ~ Jerilith the Mad
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 09:56 Edited at: 24th May 2014 09:57
Thanks. Looking forward to you GUI. Missing dbGUI.h. Please include it in your download.
Timidon
13
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 10:10
Interesting, dbGUI.h was really just something I was looking at and not part of the project anymore. (it's the example on the code base). looking at it for some additional ideas.

There are many answers but just one question" ~ Jerilith the Mad
Timidon
13
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 10:22
Hey where do I get the current version of DGK you are running? I can try recompiling with that version to see if I get the same crash...

There are many answers but just one question" ~ Jerilith the Mad
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Timidon
13
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 26th May 2014 04:24
Thanks

There are many answers but just one question" ~ Jerilith the Mad
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 26th May 2014 07:13
No problem. I now have my Dark GDK window and the windows controls resizing nicely together.

Special thanks to:
Brook Miles
David Burford
Paul Wilson

Attachments

Login to view attachments
The Tall Man
5
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 26th May 2014 07:26
You don't, by any chance, have it able to switch between windowed and full-screen back and forth without the black screen of nothingness, do you?

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 26th May 2014 07:45
It is not my intention to run the app in full screen mode. Handling a lost DirectX device is really not as hard as everyone makes it out to be. It’s just a matter of knowing what needs to be reset and reloaded. One difference is in full screen exclusive mode the display needs to be reset. Thanks for reminding me, I need to handle it when the user locks the system.
GreenDixy
10
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 26th May 2014 16:54
@The Tall Man There was a post, About that awhile back. I will see, If I can dig it up. Hopefully someone knows it already.

@WickedX Keep up the work, It is turning out nice!

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 08:27
@GreenDixy: Thanks

Well recovering from a lost device is causing problems in this specialized window. It works as I have it now, if the window is not resized. There is an issue if the window is maximized and not then minimized to the taskbar. Otherwise the program will fail. I have tried several ideas and have more to try. I am open to suggestions, help!

I have also added visual styles and made the url in the about dialog a hyperlink.

Attachments

Login to view attachments
The Tall Man
5
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 28th May 2014 11:57 Edited at: 28th May 2014 12:00
I was looking into this the other day. I found some source-code that allegedly addresses this problem, but it interacts with a DLL and doesn't seem to function with DarkGDK.

The command is:
dbRestoreLostDevice();

It's public prototype is in:
DarkSDKDisplay.h

It's implemented in:
CGfxC.cpp

and...
InformDLLsOfDeviceLostOrNotReset(3);

is implemented in the same file.

Both functions perform a check which causes them to immediately return rather than move forward.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 18:58
Thank you. I will have to look into this more. I am currently using "dbGetDirect3DDevice()->TestCooperativeLevel()" and "dbRestoreLostDevice()" in the main loop, to recover. The crash seems to happen in the windows.cpp source, in the MainWndProc the WM_SIZE procedure when it hits "dbSetCameraAspect((float)(ClientRect.right-256) / (float)(ClientRect.bottom))".
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 23:00
All most there, If I don't concern myself with the camera aspect. The only small issue now is that if the window is resized it will revert back to its original size. Works perfectly maximized or minimized. Have to find another way of setting the camera aspect and a way to stop or reset the resized window.

Attachments

Login to view attachments
WickedX
10
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 5th Jun 2014 07:45 Edited at: 5th Jun 2014 09:42
So close. I have the window adjusting the camera aspect and returning from lost device with no crash and in the size and position it was in. only one issue left. Where can I put the “dbSetCameraAspect” to adjust when the window size hasn’t been changed?

Edit: Ok! I think, I got it. The program appears to be behaving as a windows app should.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-06-24 12:45:07
Your offset time is: 2019-06-24 12:45:07