Min size of blitz window

Blitz3D Forums/Blitz3D Programming/Min size of blitz window

jfk EO-11110(Posted 2006) [#1]
Is there a min size for blitz windows (2D only) and if so, is it the same on all OSes and DXes?

Concrete:
Is this going to work everywhere:
graphics 800,60,32,2

?


Stevie G(Posted 2006) [#2]
Prey tell jfk why you'd need a window so short and sweet? Works fine here!!


Subirenihil(Posted 2006) [#3]
Well, it may hang partly off the side of the screen. Some people (people who have older computers and/or CRT's) have their desktop resolution set at 640x480. Many others have their screens at 800x600.
Plus, there is the window border that adds a few pixels (the number of pixels varies depending on OS and OS version)

Also, 32 bpp (bits per pixel) does nothing when you're in windowed mode; if the user has his screen at only 16 bpp, your window will only be 16 bpp.

I highly doubt that anyone with anything less than 640x480 is going to be doing much DX gaming.

This should work on any Windows system (95 and up) and not be off the screen:
Graphics 600,60,0,2

Because of borders, the window will take up more room on the screen.

DX won't cause problems. As far as I know, the minimum screen size as dictated by DX is 0x0. (DX might require 1x1 but who wants a screen that small?)

Windows won't be a problem, except it might give you a bigger window. Windows needs room for all the icons (program icon, minimize, fullscreen, close) and borders, so you're going to end up with something like 100x0 as the actual minimum window size.


Matty(Posted 2006) [#4]
I just tried on my machine - Graphics 1,1,32,2 - pointless size but it works fine on both blitzplus and blitz3d (2d graphics command).


Subirenihil(Posted 2006) [#5]
But you understand that the 32 does nothing? No system yet built can use "Graphics 1,1,3219,2" but it work fine because its WINDOWED!

For example, these lines produce the exact same result:
Graphics 1,1,16,2
Graphics 1,1,24,2
Graphics 1,1,32,2
Graphics 1,1,64,2
Graphics 1,1,128,2

Why not just use the "correct" form?
Graphics 1,1,0,0
[EDIT: Oops! My mistake. Should be the following:]
Graphics 1,1,0,2

But let's not argue over matters of how to format a piece of code. :)


H&K(Posted 2006) [#6]
But let's not argue over matters of how to format a piece of code.

jajajajjajaja, yes Matty, just accept your "Telling Off", and dont dare anwser back.

Anyway, although I dont use B3d shouldnt the correct form be, Graphics 1,1,0,2
Not to be pedantic, but surly 1,1,0,0 would crash in non-debug mode. And even if it didnt, it wouldnt give a window.


Adam Novagen(Posted 2006) [#7]
Oh, I get it: changing the color depth only works in fullscreen, because Blitz can't cange the desktop's depth, thus all windowed graphics must conform!


jfk EO-11110(Posted 2006) [#8]
Note, if I set the size to 105*100 and then paint a red rect to it, it will remain black. If I use a size of 106*100 then it will be painted.

ergo: the min size of a functional window is 106*2 pixels. Can anybody confirm this? Probably it's OS etc. dependent.


markcw(Posted 2006) [#9]
surely the minimum size depends on what the users gfx card supports? i would think 320x240 is the smallest.


jfk EO-11110(Posted 2006) [#10]
We're talking about windows, not fullscreen!

Min size is 106*2 pixels, the width seems to depend on the desktops style settings for buttons and title bar etc and may differ in various OSes.


Panno(Posted 2006) [#11]
<100*1 **gg**


Subirenihil(Posted 2006) [#12]
Interesting...Windows is forcing a resolution of 117x2 on my computer.

It would seem that if the space given is larger than the requested there is an error and nothing can be drawn.

"Graphics 600,60,0,2" should work an any Windows machine. (DX7 or better is required or a "dll not found" error will occur. This is because Blitz programs require DX7 to run. DX8 and DX9 are backwards compatible and can be substituted for DX7. I think DX10 is not going to be backwards compatible. The latest version of DX is available at www.microsoft.com)

As a side note, some of you may find it interesting that when you use API commands to make the size of a window bigger, your program can only draw to the area it requested to begin with. (a.k.a. if you request a window 200x200 then resize it to 300x300 you can only draw to the upper left 200x200) If you scale your window smaller, your can still draw to the 200x200 it just won't be shown until you resize your window back up.


markcw(Posted 2006) [#13]
well i got a minimum of 106x2, before drawing stopped.

that was in win98, but i have a dual-boot setup with ubuntu, so i also tested it under wine, which was the same.