Widescreen & Black Bars

BlitzMax Forums/BlitzMax Beginners Area/Widescreen & Black Bars

You have two options which you've already touched upon. Either you draw black bars over the edges of the viewable area to cover up any misdrawn stuff, or you set up the graphics API to do clipping - in OpenGL it'll be setting up a Scissor window and enabling scissor tests. SetViewport does this for you, so if that does not work on your graphics card then you have little choice but to draw some black rectangles. Doing so should NOT be a particularly big performance hit - it's just a couple of quads with no texturing.

Another option is to make sure you clip the drawing yourself in software, but requires extra work.

Another question is, if you want it to display in a 4:3 ratio but the user has chosen a 16:10 ratio mode, why not override this and choose the closest 4:3 mode which has approximately the same pixel resolution? ie if they choose 1440x900 then you want something close to 900 pixels height, so 1024x768 is not too far off, or 1152x900 or whatever it is in 4:3. Then, so long as it is not STRETCHED and has the right ratio, you would not have to worry about making black bars.