I'm programming under Linux and I wish to detect the following info at runtime, but I need a cross-platform solution:
> OS (Linux/Unix, Windows or MacOSX)
> OS version (string and/or integer)
> Direct3D version (8 or 9, IF under Windows, of course)
> OpenGL version (IF present)
> Total video memory
> Total system memory
> CPU frequency (may be like 1, 2, 3 (GHz). No need to be precise)
> Max screen width (resolution)
> Max screen height (resolution)
> Max bits (resolution) (16, 32)
I've already researched the net, but I only find compile time solutions. :(
For your needs you have to use operating system API. So I don't think you can do this at runtime, because you have to link your app against the API libraries of the specific OS.
Only things you can do at runtime will be
> OpenGL version (IF present)
> Total video memory
> Total system memory
> CPU frequency (may be like 1, 2, 3 (GHz). No need to be precise)