Advertisement

Problems with fullscreen DD/D3D apps

Started by March 22, 2000 03:11 PM
1 comment, last by noxa 24 years, 11 months ago
Hello all, I''ve got a little problem that I haven''t been able to figure out, and this is board is my last hope... I am working on a render API for a game I''m writing and it is coming along quite good (It is pretty advanced, or at least more so than many other engines I have seen). My problem is that when in fullscreen mode, windows still thinks it is in windowed mode. Ex, when I move the mouse to the top of the screen it changes to the windows mouse (the space where the title bar is, it just isn''t drawing it), as well as when I move the mouse to the sides of the screen. Another major problem is when I alt-tab out of my fullscreen app, then go back in, it gets exclusive mode (screen resizes to what I want) and it flickers for a second, but then the window appears. Now, it is still at the screen res I set it to, but the window is drawn to the extents of it. I think this is linked to the first problem... Here''s some (possibly) helpfull info: -Machine: Win2k pro retail -600mhz P3 Coppermine -256MB RAM -TNT1 PCI (blah, I hope to be getting a GeForce if I can find enough money burried in my couch :-) ~noxa~
----------------------------noxa - Ben Vanikhttp://24.3.123.4----------------------------
The first problem is that you have to use some WinAPI functions to make your window on top of all others and make GDI go away.

This is Visual Basic code, but the functions are the same:

=================================================
SetWindowLong frmMain.hWnd, GWL_STYLE, WS_POPUP Or WS_VISIBLE
ShowWindow frmMain.hWnd, SW_SHOW
SetWindowPos frmMain.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE
=================================================

I don't really understand the second problem, is it that you loose all DirectDraw surface data? If you didn't know, you have to reload and restore all surfaces when the user has "Alt+Tabbed" because all surface data is lost.

Btw, are you really doing an API as in Application Programming Interface?


============================
Daniel Netz, Sentinel Design
"I'm not stupid, I'm from Sweden" - Unknown

Edited by - Spiff on 3/22/00 3:46:24 PM
============================Daniel Netz, Sentinel Design"I'm not stupid, I'm from Sweden" - Unknown
Advertisement
Thanks! I''ll try that now! I hope it works...

I have a restore set up (I''m using a linked-list system with a base class for each texture, so I just traverse it and do a ->RestoreTexture() on each one but I haven''t tested it yet)
To know what the problem is, imagine alt-tabbing out of your program that''s in fullscreen, alt-tabbing back in, the screen resizing, and just the outline of the window on the screen... I hope the code you sent will work!

API in the sense that it is a wrapper for other GAPI''s. I''m on the XSG beta and have been playing with that, so I plan on implementing a version of my API for it, and I''m working on the DX version now. My friend MIGHT do an OpenGL version but with XSG support I don''t think it would be neccisary.
My API is just a shared base class with an implementation in run-time DLL''s, so I could release my games/apps with the base API, then later on (say when DX8 goes gold) I could release a new DLL for it and not even touch the game code.

~noxa~
----------------------------noxa - Ben Vanikhttp://24.3.123.4----------------------------

This topic is closed to new replies.

Advertisement