How Panda deals with Device Lost and Reset?

Can full screen window be minimized and then restored, automaticly? Or we must handle resources manualy?

I’m afraid I can only half-answer your question.

By “handle resources,” I assume you mean, “load textures, vertex buffers, and vertex programs?”

Panda certainly doesn’t provide any API for doing those things. So I assume it must be handling it internally. I’m not sure how it deals with the resources-lost situation that occasionally occurs in windows, but it must be dealing with it, because I’ve never seen any problems.

Then, there’s the question about switching from fullscreen to windowed (or minimizing a fullscreen window). I know panda can do fullscreen, I know it can do windowed, but I don’t know if it can switch from one to the other without first destroying and recreating the window.

If you do destroy and recreate the window, I know that still wouldn’t involve any manual reloading of textures - panda does that for you.

I’ve seen panda go from fullscreen to minimized and back without any problem or extra code on my part

Many people say “fullscreen” when they really mean “a maximized window that occupies the full desktop.” In this sense, Panda can indeed go back and forth between fullscreen and windowed mode without any special code.

However, Windows has a special concept of “fullscreen” mode, in which the graphics card is placed in a special mode and the application is given complete control of the desktop. In this mode, you don’t even see the taskbar at the bottom or the window controls at the top. Panda can create a graphics window in this mode, though it doesn’t have code to switch an already-opened graphics window from regular, windowed mode into this fancy fullscreen mode. If you want your application to switch back and forth, you have to write your app to destroy the old window and create a new one (this is not difficult to do).

On the other hand, the original post was asking about minimizing and restoring a fullscreen window once it has been created. Panda does handle this properly (and automatically).


(Edited out, as I simply didn’t get the point here… -M)

Microsoft windows has this weird behavior where all of a sudden it can lose the entire opengl state. As in, all your textures – gone. All your vertex programs – gone. The application program has to reload everything when this occurs.

Actually, it is completely different in OpenGL–the OpenGL spec requires the driver to handle whatever restoration is necessary, completely transparently to the user (or the middleware programmer). In other words, when using OpenGL, Panda doesn’t have to worry about this problem, since it doesn’t exist.


Hm. ATITD uses OpenGL, and we definitely had to deal with this problem.

Maybe some driver went against spec, but we have code in ATITD to deal with device lost.

ATITD had you guys involved? It’s Panda-based? :slight_smile:

Just me. I was the lead C++ programmer on ATITD before I moved to the entertainment technology center.

Nice. :slight_smile: I still need to try it out, I guess I’ll like its somewhat “different” approach.

It is different. The problem with it, as I see it, is that it’s a brand new genre of game, and the kinks haven’t been worked out. There’s still a lot of tweaking to do before it’s really right.

Well, I can stand a little suffering if I really like something. :wink: Since you were (or better: are) involved in the MMO genre, you probably heard of WWII Online - worst start ever, worst kinks ever, small team and everything. They made it, nevertheless. And I stuck with them from day 1.

I’m just afraid I don’t have as much time anymore, considering all the things I’d like to do… :-/