GfxModeDepth Bug?
Archives Forums/BlitzPlus Bug Reports/GfxModeDepth Bug?
| ||
It seems the GfxModeDepth function returns erroneous results, usually only returning 32-Bit I'm not sure exactly what's happening, but certainly something isn't right. It may be perhaps that the Desktop itself is in 32-bit depth? The following test program should highlight the problem: ;GraphicsDepth Test ;All Modes 32-bit for DirectX ;Only 1 Native and 1 OPpenGL Mode, each of which at 16-Bit Local File$=CurrentDir()+"Results.txt" Local OutPut=WriteFile(File) Local GPU Local Iter Local GW=GadgetWidth(Desktop()) Local GH=GadgetHeight(Desktop()) WriteLine OutPut,"TEST 1" For GPU=1 To CountGfxDrivers() SetGfxDriver GPU Iter=1 WriteLine OutPut,Str(GPU)+" ("+GfxDriverName(GPU)+")" For Iter=1 To CountGfxModes() WriteLine OutPut,LSet("Mode " + Str(Iter)+" ",10)+Str(GfxModeWidth(Iter) )+" x "+Str(GfxModeHeight(Iter) )+" "+Str(GfxModeDepth(Iter))+"-bit" Next Next WriteLine OutPut,"TEST 2" ;Attempts to Iterate through Drivers results in crash "Attempt to release unknown object" when GPU=2 Graphics command ;Now, Native GPU mode 1 is 24-bit GPU=1 SetGfxDriver GPU Iter=1 WriteLine OutPut,Str(GPU)+" ("+GfxDriverName(GPU)+")" For Iter=1 To CountGfxModes() Graphics GfxModeWidth(Iter), GfxModeHeight(Iter), GfxModeDepth(Iter) WriteLine OutPut,LSet("Mode " + Str(Iter)+" ",10)+Str(GraphicsWidth() )+" x "+Str(GraphicsHeight() )+" "+Str(GraphicsDepth())+"-bit" Next EndGraphics GPU=3 SetGfxDriver GPU Iter=1 WriteLine OutPut,Str(GPU)+" ("+GfxDriverName(GPU)+")" For Iter=1 To CountGfxModes() Graphics GfxModeWidth(Iter), GfxModeHeight(Iter), GfxModeDepth(Iter) WriteLine OutPut,LSet("Mode " + Str(Iter)+" ",10)+Str(GraphicsWidth() )+" x "+Str(GraphicsHeight() )+" "+Str(GraphicsDepth())+"-bit" Next EndGraphics WriteLine OutPut,"TEST 3" ; I cannot explain why the Depth is still returned as 32-Bit... GPU=3 SetGfxDriver GPU Iter=1 WriteLine OutPut,Str(GPU)+" ("+GfxDriverName(GPU)+")" For Iter=1 To CountGfxModes() Graphics GfxModeWidth(Iter), GfxModeHeight(Iter),16 WriteLine OutPut,LSet("Mode " + Str(Iter)+" ",10)+Str(GraphicsWidth() )+" x "+Str(GraphicsHeight() )+" "+Str(GraphicsDepth())+"-bit" Next EndGraphics WriteLine OutPut,"TEST 4" ; Or why this is returned as 24-Bit.... GPU=1 SetGfxDriver GPU Iter=1 WriteLine OutPut,Str(GPU)+" ("+GfxDriverName(GPU)+")" For Iter=1 To CountGfxModes() Graphics GfxModeWidth(Iter), GfxModeHeight(Iter),16 WriteLine OutPut,LSet("Mode " + Str(Iter)+" ",10)+Str(GraphicsWidth() )+" x "+Str(GraphicsHeight() )+" "+Str(GraphicsDepth())+"-bit" Next EndGraphics CloseFile OutPut |