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.

PureGDK / Strange window size problem

Author
Message
AndyUK
15
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 13th Nov 2009 14:02 Edited at: 13th Nov 2009 14:06
Hi Mistrel, Im not sure what is going on here but it looks like a bug.

My desktop resolution is 1280x1024. When i run the below code, OpenDBWnd crashes with the error


"display using 32 bit is not supported by available hardware"



If i minus 1 from the width, it works.



Also, if i use the maximum screen resolution it works.



I need to be able to use the full width but not the full height as a separate window will be at the bottom of the screen.
Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 14th Nov 2009 02:23
I might say that it is due to an illegal resolution since 1280x512 is not valid and that as far as I can tell is the only reason what can cause this. Just to mention I never had any problems with this in PGDK.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Nov 2009 03:47 Edited at: 14th Nov 2009 03:48
See if it works in DBP on your video hardware. The same values should pass right to SET DISPLAY MODE.

AndyUK
15
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 14th Nov 2009 12:16
Ok, assuming its an illegal resolution how would i display a windows gadget at the bottom or is there a GUI system i can use over 3d?
Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 14th Nov 2009 20:21
Ok, I tried to open 1280x512 window both in PGDK and DBPRO and both gave me the same error. SO it is a Direct3D issue and the only way to go around this is to use smaller window/resolutions, since I recently worked on a editor which created a square render window and it worked without any problems. Speaking about 3D GUI's - you can always code one. In PB it would be extremely easy, just create your gadget structures, draw them, update them, should be extremely easy if you want something basic. Take a look at FGUI (I guess I spell it correctly) which was written in DBPro.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Nov 2009 22:25 Edited at: 14th Nov 2009 22:25
1280x512 works fine here in DBP. As does 1280x1024. But my display supports it.

Your program is probably crashing because of this bug:

http://forum.thegamecreators.com/?m=forum_view&t=111351&b=15

You have to make certain that the display mode is never set to any resolution higher than the maximum height or width supported by your monitor.

You can determine its value using EnumDisplaySettings from the Win32 API:



Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 15th Nov 2009 00:17
My laptops resolution is 1280x800 and 1280x512 should work nicely, but I guess it is one of those errors that simply cannot be explained. Other than that it is best to use dbDisplayChecklist() to know which resolutions are supported by the current display adapter.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th Nov 2009 01:01
Olby, is the issue with the 512 or 1280 for you? Try shrinking the width down one pixel at a time until it works then send me a screenshot. I have a theory.

Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 15th Nov 2009 01:10 Edited at: 15th Nov 2009 01:14
This works: 1280x800


This crashes: 1280x512


This once again works: 1279x512


Something crazy like this works: 1279x64


As you can see it is more of an issue with width than height.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th Nov 2009 06:18
Upload a screenshot of the whole window including the border for 1279x512 on your computer so I can see the actual dimensions.

Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 15th Nov 2009 07:50 Edited at: 15th Nov 2009 07:51


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK

Attachments

Login to view attachments
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th Nov 2009 09:34
I need the original image (png or gif) without being modified. I can't identify the dimensions if you resize it.

Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 15th Nov 2009 23:51
It is quicker for me to measure it than waiting for the upload.
Window size: 1280x537 px exactly, DB Render size: 1274x512 px exactly.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 16th Nov 2009 04:40 Edited at: 16th Nov 2009 04:42
That's not right. The DBP window should be the same dimensions as the client area of its parent window:



This should output:

1279
512
1279
512

Olby
15
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 16th Nov 2009 07:54


I got this:
1274
512
1279
512

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 16th Nov 2009 10:18
I don't know enough about how DirectX display resolutions work to know if it's a DBP or DirectX issue. So long as it's smaller or equal to the supported resolution then it should work. I don't know why it doesn't in this case.

AndyUK
15
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 19th Nov 2009 11:37
Just a quick note on this, i tried using the DirectX9 subsystem in PB and i can open windows of any dimension within the resolution of the monitor, im using an nvidia 9800gt.
Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 19th Nov 2009 20:07 Edited at: 19th Nov 2009 20:11
This question should probably be directed to Lee. From what I understand it "should" work which leads me to believe it's something specific to DBP.

Maybe it's checking the compatible resolutions against what's supported full screen exclusive only, even in windowed mode.

Dan Fessler
10
Years of Service
User Offline
Joined: 17th Feb 2008
Location:
Posted: 29th Dec 2009 19:31
I'd just like to note I'm getting this exact same error within DBP (not pureGDK)

if I set the display width or height exactly equal to my monitor display, then it gives me that error. One pixel less makes it work again. -this is annoying since it is distorting the pixels of my DBP draw window considerably even with just one pixel difference at maximized.

Mistrel
13
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 30th Dec 2009 19:27 Edited at: 30th Dec 2009 19:27
Dan, if you're crashing because of this bug you may want to bump the bug report:

http://forum.thegamecreators.com/?m=forum_view&t=111351&b=15

I'm pretty sure it's the same thing.

Login to post a reply

Server time is: 2018-12-14 20:15:11
Your offset time is: 2018-12-14 20:15:11