Code archives/Graphics/Graphics resolution selector
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
*** Blitz3D Code *** The 'SelectGraphicsMode' function displays a simple selector to allow a user to choose and set a valid 3D graphics resolution. The available resolutions are shown in a paged display (Next and Previous navigation links will show if they are needed) with 'Fullscreen' and 'Windowed' hyperlinks that let the user choose which mode they want to use. Color depths below 32 bits are filtered out (I don't think there's any point in showing these). This is intended more for use in demo and sample projects than in released products, but it shows the basics involved if you want to expand on it. For use in a 2D project just change 'Graphics3D' to 'Graphics' and 'CountGfxModes3D' to 'CountGfxModes' in the code below (untested but it should work). To see it in use in a sample project go to: http://www.blitzbasic.com/codearcs/codearcs.php?code=1137 | |||||
The code can be found at: http://www.blitzbasic.com/codearcs/codearcs.php?code=3180 |
Comments
| ||
I also suggest to filter out the resolutions when (Width < Height) or (Width > Height*2) |
| ||
RemiD, Why would you filter out, say 21:9 aspect resolutions? |
| ||
@_PJ_>>i had no idea that 21:9 resolutions existed, and i think it is too large, so i filter it out ;) |
Code Archives Forum