Scaled window mode
Blitz3D Forums/Blitz3D Beginners Area/Scaled window mode
| ||
My program is running in scaled window mode, but when it starts it's very small and hard to make out much detail. I need it to run in this mode, but would prefer if it started out maxed or at least a bit bigger. Is there a way I can set it manually when the program begins? |
| ||
I just do this trick:Graphics3D 800,600,0,2 Graphics3D 800,600,0,3 While Not KeyHit(1) Text 10,10,"Scalable & big!" Flip Cls Wend |
| ||
Thanks, don't know why that works but it does :) |
| ||
How strange. I never knew that. How did you find that one out Sledge? Jason. |
| ||
It's so long ago that I don't remember. I'd like to think I made an educated guess but it's far more likely that I had a couple of graphics initialisation lines (in order to quickly swap between a couple of different options) and accidentally left two uncommented rather than just the desired one. |
| ||
I am late to the party but... That is awesome !! Great find. |
| ||
Im joining the party.. |
| ||
And this makes an 320x200 game resolution scaled up to a 640x480 window:Graphics 640,480,32,2 Graphics 320,200,32,3 Text 100,100,"Hi" WaitKey() Here is a function which does this for you: 3 functions Timer_Sec Timer_mSec and Screen You need to add the userlib declarations for it to work. |
| ||
I am late to the party but... That is awesome !! Great find. How do you find the resolution of the desktop ? I want to scale the the Blitz window to mostly fill the desktop but not completely so the user can still easily access the task bar etc.. |
| ||
in a windows library (one of the windows dll, probably user32 or kernel32 ...), it's named GetSystemMetrics as far as I remember with constant argument like cxscreen and cyscreen (you 'll find the prototype of the function and the constant values for sm_cxscreen etc on the msdn website, or, it's probably somewhere on the code archive of the forum). |
| ||
I am late to the party but... That is awesome !! Great find. How do you find the resolution of the desktop ? I want to scale the the Blitz window to mostly fill the desktop but not completely so the user can still easily access the task bar etc.. Nevermind.. I found this: http://www.blitzbasic.com/Community/posts.php?topic=104713#1270693 |
| ||
this is incredible ! But is there another tips to do the same thing on full screen mode ? I would like to do a retro game in 320 x 200 full screen, but as you know modern screens do no accept this resolution. |
| ||
I would like to do a retro game in 320 x 200 full screen, but as you know modern screens do no accept this resolution. -> Sprites2Go - C64 Sprite - BB3d (bb+?!) See my 3rd post in there, the Demogame is using 320x240 resolution to draw on Fullscreen (desktop resolution) when pressing F6. EDIT: The Function which is doing this is: DrawSizeImage. The Demo is Rendering the Game on a 320x240 image buffer, and the function is Resizing it to the BackBuffer. The function is from here. |
| ||
ok, i will try to undestand your method. Thanks |
| ||
Note that if you use a textured "screen mesh" (=rectangle mesh which occupies the whole camera view space) to scale up/down your image/texture, it will automatically have less details than the camera view space (because some texels will occupy more/less screen space than a 1w1h pixel so there will be less/more texels on the texture than pixels on the camera view space) The idea is to create your image/render (on a buffer), then to copy the result on a texture of the same width,height than your image (which is applied on a "screen mesh" which occupies the whole screen and will automatically adjust the texel size depending on the camera view space (width/height)) An example of that : http://www.blitzbasic.com/codearcs/codearcs.php?code=3256 |