... Have I completely lost my mind??

Blitz3D Forums/Blitz3D Programming/... Have I completely lost my mind??

Adam Novagen(Posted 2011) [#1]
For some reason, I had it in my head that there was some command in Blitz3D to the tune of BufferDirty(), something that could check to see if an image/texture had become "dirty" and disappeared due to a change in the program's resolution via Graphics() or Graphics3D(). I've been looking EVERYWHERE, and can't find a dickybird, but I could swear I'd seen it mentioned at least once.

Also, quick question on the auto-suspend modes for Graphics3D(). Is there a fullscreen auto-suspend mode, or are there only those two for windowed modes? And are those same modes applicable to the 2D Graphics() command?

EDIT: Apparently I HAVE lost my mind, although for completely different reasons than I expected. Turns out that I completely forgot to refresh the compiler definitions in IDEal, which is why it didn't recognize the existence of GraphicsLost() or BufferDirty(), both of which I stumbled across totally accidentally in version.txt, mere minutes after posting this. Please disregard me, for I am a twit and a half, at the very least. XD

Last edited 2011

Last edited 2011


Ross C(Posted 2011) [#2]
Wasn't this a blitzplus command?


Kryzon(Posted 2011) [#3]
You should't post when under influence.

EDIT: =D

Last edited 2011


Adam Novagen(Posted 2011) [#4]
Wasn't this a blitzplus command?

Err, not sure. It may be in B+ as well, I honestly haven't even used the B+ demo in... Er... About two years, actually. XD

You should't post when under influence.

I know, right? Ha! XD

Last edited 2011


Rob the Great(Posted 2011) [#5]
Is this a B3D native command, or a third party plugin? I haven't heard of this before.


Yasha(Posted 2011) [#6]
It's a native command, but not part of the original command set. It was added in version 1.99 alongside GraphicsLost, and video modes 6 and 7. It helps deal with "loss of graphics", i.e. DirectX screwups.

Not many people care much about loss of graphics (even the person writing the documentation!), so you won't see it used much.


Adam Novagen(Posted 2011) [#7]
Yep; if you want the "details," go to the Blitz3D installation folder and read "version.txt".

Am I the only one that's a bit disappointed that the online manual doesn't include these two commands? The BlitzDocs, fine, they stopped at v1.88 anyway, but the ones on the SITE should really be updated.


Rob the Great(Posted 2011) [#8]
Huh, I never knew that. I have no use for it, but still good to know.


Zethrax(Posted 2011) [#9]
For games those commands probably aren't going to be used much, as you rarely pause a game in the middle of play to go use some other full screen application. For editors and other similar tools I've found checking for loss of the graphics context to be essential.

And yes, those commands should be added to the documentation. Both the online and offline docs. There's no excuse for not adding them.


Kryzon(Posted 2011) [#10]
Those interested can update their offline docs (the ones you access through the Blitz3D IDE with "Command Reference") with the following package by MarkCW: http://www.blitzbasic.com/Community/posts.php?topic=77065


Adam Novagen(Posted 2011) [#11]
Thanks for another golden link, Kryzon. XD

Also, a couple of things I've now discovered. Changing resolution mid-game in 3D does not just corrupt/erase the graphics... It erases EVERYTHING except audio. Seriously, not even just the untextured meshes, even PIVOTS are lost. This just seems ridiculous to me... Was DX7's memory handling really THAT bad??

ALSO also, I have yet to find a single scenario wherein GraphicsLost() actually worked. I tried the following program:

Graphics3D 400,300,0,2

Global Image = CreateImage(32,32)
Global Texture = CreateTexture(32,32)
Global Ball = CreateSphere()

Graphics3D 800,600,0,2

;DrawImage Image,0,0
;EntityTexture Ball,Texture

RuntimeError GraphicsLost()

As you can see by running it, GraphicsLost() returns False. However, uncommenting either of the lines that actually CALL the image or texture will result in a MAV, so clearly the graphics ARE lost. Am I just misinterpreting the use of GraphicsLost()? Dunno if it makes any difference, but said program was tested on a Radeon HD6850...

Last edited 2011


Kryzon(Posted 2011) [#12]
Strange behavior indeed about losing the world on each Graphics3D call.

Regarding the GraphicsLost(); You're querying the state of the current Graphics context. You have declared a new one with 800x600, so it's brand new and it's not actually lost.
I have a vague memory this GraphicsLost() is used when ALT+TAB'ing \ minimizing your full-screen app, and when getting back to it you have a blank screen - then it's lost.


Adam Novagen(Posted 2011) [#13]
Oh, I see; thanks Kryzon. And yeah, I have no idea what's going on with Graphics3D().