GraphicsDepth always returns 0!
BlitzMax Forums/BlitzMax Programming/GraphicsDepth always returns 0!
| ||
OK, before I add this to the bugs section I thought I'd open it for discussion. On my PC, this code always prints 0 as the GraphicsDepth, even if I change the bit depth to 16 bit. Why? Graphics 800,600,32 Cls DrawText GraphicsDepth(),100,100 Flip WaitKey |
| ||
It doesn't like you. I would have thought that was obvious. :) |
| ||
sniff :-( |
| ||
It does the same here. |
| ||
well at least it's not just me! |
| ||
Same here. |
| ||
looks like this better go in the bug forum then. Can a moderator please move this thread or shall I post again manually? |
| ||
Check this out.SetGraphicsDriver D3D7Max2DDriver() Graphics 640 , 480 , 32 , 60 Print "DX : " + GraphicsDepth() EndGraphics() SetGraphicsDriver GLMax2DDriver() Graphics 640 , 480 , 32 , 60 Print "OpenGL : " + GraphicsDepth() EndGraphics() End |
| ||
Works for GL not for DX although primarydevice.depth returns the correct value. DX Getsettings method... Method GetSettings( width Var,height Var,depth Var,hertz Var,flags Var ) If hwnd Local dest[4] GetClientRect hwnd,dest width=dest[2] height=dest[3] Else width=PrimaryDevice.width height=PrimaryDevice.height EndIf depth=0 hertz=0 flags=0 End Method depth=0 should really be depth=primarydevice.depth. |
| ||
aha, so they could support it if need be, interesting. Thanks a lot. |
| ||
And the snippet above also explains why the refreshrate can't be read under DX either, it's explicitely set to 0 as well. Any fix for that? |
| ||
manual replacement for the moment and mention both fixes in the tweak board with "fix to bug on XXXX" or mail it to brl directly. |
| ||
drawtext primarydevice.freq for hertz. |
| ||
so manually fix the mod and recompile. Should I post this in the bug board then? |
| ||
Probably, or you'll keep making the same change & recompile after every 'official' update involving the mod that will undo your custom change. :-? I reported the broken Herz under DirectX in the bug forum forever ago, a couple of days after DX support was first added. (It broke some of my timing code) Someone else also pointed out it was explicitely set to zero... No idea at the time what it should have been though, and never seen any response or action from BRL on that so far, though. |