GRAPHICS command problems
Blitz3D Forums/Blitz3D Beginners Area/GRAPHICS command problems
| ||
Hi all, There is something I do not understand. #1 The "MODE" options in the Graphics() command. There is a mode called "SCALED", but the official documentation in BlitzPlus does not tell me anything about this particular feature. Can anyone please explain to me? #2 After using the Graphics() command, is there a way of testing if the command was a success? |
| ||
Check out the GfxModeExists() command in the docs. It will return True if the gfx card can pull off the resolution/bitdepth you put into it, False if not. Don't know about the other one, I think it sets the window size to the resolution you put in, whereas the regular window mode always runs a 640x480 window. |
| ||
Can anyone please explain to me? I believe it runs the program in windowed mode, but allows you to resize the window, and the contents get "stretched" to fit the new size. is there a way of testing if the command was a success? If it didnt work you'd get an error msg along the lines of "Unable to set graphics mode". |
| ||
Thanks Genixi2 & Erik I thought the GRAPHICS command might return a value (say 0) is the command failed. But I guess GfxModeExists() is a nice way of testing the mode before actually trying to use the GRAPHICS command mode. |
| ||
The 'scaled' flag probably shouldn't be in the docs any more -- it allowed a resizeable window in the old Blitz 2D ("Blitz Basic"). I think Mark took it out for some reason, but it was fairly useless for the most part anyway. |
| ||
@BlitzSupport Thanks, that was what I thought. I tried using the "flag" with several different options, but it never seemed to make any difference. I would love to see the docs updated, though. |
| ||
it allowed a resizeable window in the old Blitz 2D ("Blitz Basic"). The flag exists in the latest version of Blitz3d as well.....I find it quite handy when you want to run the game windowed but double the size, without the hassle of having to change anythin to the code to do that. |
| ||
@Genexi2 I haven't yet tried it myself with B3d, but in BlitzPlus it did not seems to work. Maybe it was just me though. |
| ||
Graphics 800,600,32,2 Graphics 320,240,32,3 Text 0,0,"Hello World" Flip WaitKey() End An example of window resizing. It will only work in Blitz3D. Although BlitzPlus says it supports window resizing too, it doesn't. :) +BlackD |
| ||
@BlackD Thanks for your example! Since BlitzPlus does not support it, it's no surprise I could not get it to work! The docs needs to be changed though! |