• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# Running fullscreen

## Recommended Posts

Hi, Im a bit uncertain about the details of fullscreen mode. What is the best way to set it? Should I use DirectX to set it? Or is ChangeDisplaySettings just as effective? (I need to get rid of the mouse cursor, though) Are there any performance issues I should be aware of, like how to avoid the Win GDI doing any conversions? I just want my app to run as fast as possible :o) Im using Delphi! Thanks for any responses.

##### Share on other sites
NeHe''s site has some fullscreen stuff, and I dunno how you would use DirectX to get into fullscreen mode, and end up using OpenGL. It just doesn''t sound logical!

Trent (ShiningKnight)
THE Engine
ShiningKnight7@hotmail.com

##### Share on other sites
personally youre best off with sdl which lets u go fullscreen also SDL_ShowCursor will hide/show the cursor

http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
Hi, thank you for your responses. Im trying to figure out exactly what happens when swapping buffers. I mean, having both front and backbuffer in video memory sounds like the best solution to me, but I dont know what really happens. Im using the Nehe examples as a guideline, and it does work just fine. But I have no idea EXACTLY what happens when I call Swapbuffers. Im worried about Windows GDI conversions, but I guess since the pixelformat match the displaysettings, then this is not an issue. I guess.

Using DirectX to set fullscreen may sound weird, but thats how I did it when I first tried. It did work. I didnt know about ChangeDisplaySettings (I think its called...) at the time.

##### Share on other sites
quote:
Original post by pede
Hi, thank you for your responses. Im trying to figure out exactly what happens when swapping buffers. I mean, having both front and backbuffer in video memory sounds like the best solution to me, but I dont know what really happens. Im using the Nehe examples as a guideline, and it does work just fine. But I have no idea EXACTLY what happens when I call Swapbuffers. Im worried about Windows GDI conversions, but I guess since the pixelformat match the displaysettings, then this is not an issue. I guess.

When drawing you draw to the backbuffer, which is just an other part of the video memory which is not displayed. When you swap the buffers the backbuffer you change the part of the video memory that is displayed. That means: Your back buffer gets the visible part of the video memory and the part of the video memory that was visible before gets your new backbuffer.

quote:

Using DirectX to set fullscreen may sound weird, but thats how I did it when I first tried. It did work. I didnt know about ChangeDisplaySettings (I think its called...) at the time.

Long time ago i experimented with ChangeDisplaySettings, and it was horrific (maybe it changed, since I''ve used it with the old Windows 95). You can only change the resolution when you use the same color depth of the actual mode, so it is impossible to use a custom color depth. The other problem was, that it sometimes (or better: very often) didn''t change the mode at all. I never found the reason for it...

Konstantin Schauwecker

##### Share on other sites
>>Long time ago i experimented with ChangeDisplaySettings, and it was horrific (maybe it changed, since I''ve used it with the old Windows 95). You can only change the resolution when you use the same color depth of the actual mode, so it is impossible to use a custom color depth. The other problem was, that it sometimes (or better: very often) didn''t change the mode at all. I never found the reason for it...<<

that is a problem with windows95 A (the first version, B has no problem) any change of colour depth requires the user to reboot windows

http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
for showing/hiding the cursor simply use:

  int ShowCursor( BOOL bShow // cursor visibility flag);

taken straight from the MSDN.

About swapBuffers: imagine watching an artist draw a picture, he draws bits of it at a time, slowly building up the image. if you were to imagine that going very quickly, if he draws several pictures in rapid succession it looks like an animation flickering. If the computer only used one buffer then you would get this flickering. By drawing to the ''back'' (not shown) buffer then swapping the two you get a smooth animation, or at least you don''t get the flickering.

------------------------------
Baldur K

• ### Forum Statistics

• Total Topics
627719
• Total Posts
2978789

• 9
• 21
• 14
• 12
• 42