The Black Slate

BlitzMax Forums/BlitzMax Beginners Area/The Black Slate

dw817(Posted 2016) [#1]
It's certainly simple to use GRAPHICS 640,480 or GRAPHICS 1024,768 to render a screen in BlitzMAX.

It's entirely a different thing, however, if you want true full-screen graphics.

While I am using:
Graphics 1024,768,32,0
I am not at all happy that if I leave the screen to go somewhere else and return back, the screen is cleared - and the fact it -pops- my screen.

Link to code example:
http://www.blitzbasic.com/Community/editpost.php?post=1290459

Is there some very small code solution to generate a full-screen without requiring any information about the monitor and essentially is just like GRAPHICS, but without having to enter in the # of bits per pixel and/or screen hertz ? AND also does not lose the screen when you ALT-TAB to something else yet still is a true full-screen and removes the taskbar below ?

The regular command of Graphics 1024,768 does not 'lose' the screen even if you change tasks, so something amiss is going on here in full-screen.

If you have any suggestions or code, please - feel free to offer them. I'd like to get past this problem with your help if I can.


Derron(Posted 2016) [#2]
Try your luck with "DesktopWidth()" and "DesktopHeight()".

According to a thread here in the forums, this might have issues with specific DPI settings.
Follow this thread for possible solutions.


bye
Ron


dw817(Posted 2016) [#3]
Hi Ron:

I'm not seeing DesktopWidth() or DesktopHeight() as being recognized in BlitzMAX, does it use a different MOD library ?


Derron(Posted 2016) [#4]
Seems this is done via a module:

Website (ENG): http://www.chaos-interactive.de/en/desktopextension/
Thread (GER): http://www.blitzforum.de/forum/viewtopic.php?t=18005
Download: http://www.chaos-interactive.de/get/52/

When already using MaxGUI you might use something in the likes of "Desktop().width" and "Desktop().height".


bye
Ron


TomToad(Posted 2016) [#5]
try clicking "Program/Rebuild Documentation" in the menu and see if it is then recognized. It is definitely a command in the standard BlitzMax package.

If that doesn't work, try a fresh install. Something might've been corrupted in the MOD folder


dw817(Posted 2016) [#6]
This is fine, that requires MaxGUI to work. But knowing the dimensions of my desktop, that is not going to change the graphics, Ron.

Now yes, I know with MaxGUI.drivers I can use a canvas and go full-screen with no problems, however, I was just wondering if there was a way of doing it without important an external library from IMPORT.


Derron(Posted 2016) [#7]

But knowing the dimensions of my desktop, that is not going to change the graphics, Ron.


So
graphics DesktopWidth(), DesktopHeight
wont work for you (assuming you copied the code for DesktopWidth()/DesktopHeight() to your project)?

Hard to believe as else others would have reported issues then (I think at least they would have done so).


"Inbuild" there seems to be no BlitzMax-Command available.


bye
Ron


dw817(Posted 2016) [#8]
Ok, here is the code I use to get a perfect full-screen:



It's got a little length to it, but it does work flawlessly.

I was just trying to see if I didn't fully understand the graphics command - a way to go full-screen with it, without requiring a hardware snap.

TomToad ... ??? Trying your method. WHOA ! NEW HELP FILES HAVE ARRIVED ! How wonderful ! Were they just sitting there ?


TomToad(Posted 2016) [#9]
DesktopWidth() and DesktopHeight() are part of BRL.system so you shouldn't need to import anything. Can you execute this line of code?

Print DesktopWidth()+","+DesktopHeight()


dw817(Posted 2016) [#10]
Hi Tom:

Nope, that code by itself is not recognized. Now I will tell you something, I backed up my MOD directory, then I did as someone suggested and clicked on PROGRAM, REBUILD ALL MODULES - after a few minutes it returned and BAM ! Absolutely nothing would work, no CLS, no LOCAL A=1, nothing.

So I filed it away as folder "!MOD" recovered my original back to "MOD" (good thing I did), shutdown BlitzMAX, brought it back up, and everything started working again.

That was a very scary moment when I thought BlitzMAX would no longer recognize any code.

As far as DesktopWidth() and DesktopHeight(), I'm not out to win any prizes, if it takes an IMPORT of MaxGUI.Drivers to use them, I'm good with that.


TomToad(Posted 2016) [#11]
I just realized something. In another thread, you posted that you were using BlitzMax Release Version 1.36 which is an old version.

I would not be surprised if many of the issues you are having is related to that.

I would suggest uninstalling your current version, and installing the latest version 1.50 for windows and 1.51 for mac.


dw817(Posted 2016) [#12]
1.50 ? Wow ? Really ? Man ! I am behind times !
Let me see if I know where to download it from. Hmm ... Need registration code - found.

Downloading ... Installing ... Transferring over MOD libs of 3d.mod, maxgui.mod, odd.mod, and sidesign.mod. Hmm ?? Seems to be a bit quick on the draw.

Thanks, Tom ! That was remarkably helpful !

Trying out my code. No problems. Let's try that command again that wasn't recognized.
Print DesktopWidth()+","+DesktopHeight()
Oh yeah, it's recognized now. Hmm ... Possibilities ... I wonder what other new commands have been added I'm not aware of ?

Is there information on these, what they do and why they would be good ?
GRAPHICS_BACKBUFFER Create graphics with a back buffer
GRAPHICS_ALPHABUFFER Create graphics with an alpha buffer
GRAPHICS_DEPTHBUFFER Create graphics with a depth buffer
GRAPHICS_STENCILBUFFER Create graphics with a stencil buffer
GRAPHICS_ACCUMBUFFER Create graphics with an accumulation buffer



Kryzon(Posted 2016) [#13]
The only one of those constants you need to worry about is _BACKBUFFER, making sure to include it in your Graphics or CreateGraphics calls as the flags parameter (or leave it with the default value anyway).

The rest of those constants provide features that are not used with vanilla Max2D functions, you'd need to use raw API calls (i.e GL or D3D functions) to make any use of them.

EDIT: To know exactly what those constants do you'd have to look in the graphics driver source code to know how the function interprets each flag.
- https://github.com/maxmods/brl.mod/blob/master/dxgraphics.mod/d3d9graphics.bmx#L80
- https://github.com/maxmods/brl.mod/blob/master/glgraphics.mod/glgraphics.win32.c#L68


dw817(Posted 2016) [#14]
Thanks, Kryzon. No, I'm not ready for API (if I knew what it was ?) :) Not yet anyways.

Welp, I've got the new BlitzMAX (Thank you, Tom !) and - messing with the graphics command still seems like there's no way to get a full-screen without going hardware on it.


Kryzon(Posted 2016) [#15]
You should take a course in Computer Science; API is one of the keywords in the field.


xlsior(Posted 2016) [#16]
In the root of your blitzmax folder there's a file named versions.doc which shows all the modifications between releases.


dw817(Posted 2016) [#17]
No big, Kryzon. I found it HERE. Thanks for letting me know what it was. :) [LINK].

I'll check that, Xlsior. Thanks !