Fullscreen

What is the most reliable / fast method for using fullscreen mode ?
With the corresponding glut function and another fullscreen code that i found in some tutorial program my program used to crash, especially when pressing the Windows Key or while closing the window

I would appreciate some nice code…of course this is kind of lame, but hey it just concerns the video / fullscreen mode.

Sincerely,
Martin.

GLUT has much more than glutFullScreen for you !

glutFullScreen

  1. gives no performance boost;
  2. is crashy indeed.

Instead, use the glut game mode. The glut functions for this are : glutGameModeString, glutEnterGameMode, glutLeaveGameMode…

  1. it gives a huge performance boost (50%-120%)
  2. it is more reliable than glutFullScreen
  3. it lets you choose the resolution, color depth, and refresh rate.

…or GLFW , which has a nice (functional) fullscreen mode. It handles things like ALT-TAB, iconification (WIN+M), closing etc. It can also prevent many of these actions by disabling most system key combinations.

Ah, Marcus256, I was looking for you. I’ve read the recent GLFW announcement on this site, saying it had now code for bitmap loading. I’d like to know which formats GLFW can load ? In particular, does it load jpeg, jpeg2000, png, or gif ? I didn’t find this info in the GLFW features page.

Very funny, that nothing is reported about these glut functions in the glut-3.spec.pdf !

That’s normal, these functions are quite new. They do exist only since version 3.7

Originally posted by Morglum:
Ah, Marcus256, I was looking for you. I’ve read the recent GLFW announcement on this site, saying it had now code for bitmap loading. I’d like to know which formats GLFW can load ? In particular, does it load jpeg, jpeg2000, png, or gif ? I didn’t find this info in the GLFW features page.

Sorry, I’ll update the page (it’s “only” mentioned in the docs and the news section). GLFW only supports TGA, which I think is the best texture format, next to PNG.

Since GLFW is a minimalist API, which will hopefully never rely on 3rd party software (such as libjpeg, libpng etc), only “plain” texture formats will be supported (like BMP, PPM etc), if there is a demand for more formats than TGA. For loading JPEG, PNG and other formats, better look at image libraries. After all, the GLFW DLL is only 24 KB. It would be a shame to include a giant such as libpng too, just to save a few lines of code in the user program, wouldn’t it?

The goal of the texture loading support in GLFW is to provide a quick’n easy to use tool for adding textures to small programs. For larger projects, I expect ppl to use tools like zlib, libpng etc.

I hope this does not come as dissapointing news. (?)

BTW. The GLFW documentation (in PDF format) is always up to date, since it is released at the same time as the corresponding GLFW source code is relased - which is one of the reasons for the delay of the v2.1 release (but it’s worth it, IMHO).

[This message has been edited by marcus256 (edited 08-13-2002).]

ok marcus 256, if you can keep your dll at such a small size, it’s worth limiting the number of texture formats. I’ve already got tga loading code (thans WhatEver ). I agree that it’s an excellent format but for my purpose it’d be good to support more compressed formats. I think I’ll look for devIL…

Morglum