description of the current GFX card in use?
BlitzMax Forums/BlitzMax Programming/description of the current GFX card in use?
| ||
Hi, I was wondering how I would go about getting the "name" of the current graphics card/renderer in use? For instance ,"Render Device = Sprite Nvidia 7600GS" or whatnot. Thanks for your help :) |
| ||
Device Caps I think |
| ||
Cheers. Any info on this? I'm at work at the mo and can't do much about it but i'd like to see how i'd go about it. |
| ||
I seem to remember someone posted some code a while ago on how to read the Caps into a structure. |
| ||
Hmm, I did a search and found nothing. I guess I will have to poke around a bit later when I get back to my MAX PC. I didn't know the dev caps returned the name of the device though, just caps to say it does or doesnt do cubemapping and other functions... Aha... maybe... *checks WIKI* |
| ||
There's a private function called enum_devices_callback which uses the devicedesc including the device name. |
| ||
Much easier in OpenGL where it's a simple query :) |
| ||
Ok, i've looked. No idea about Enum_Devices_callback. It seems you're talking about Windows API here- Ozak.. Where may I find this query? |
| ||
glGetString with constants GL_VENDOR and GL_RENDERER etc. http://www.mevis.de/opengl/glGetString.html |
| ||
Gah, thats just ID numbers not the hardware name. better than nowt, but I don't fancy creating a list of all the cards in existence :) Cheers anyway. I'm looking to get the true name of the graphics card in the system. In my system it this is "NVIDIA GeForce 7600 GS" I need it at the moment because I want to bypass ogres "Hardware changed" dialogue by replacing the line in the config with the current hardware and using my own default values. I need to avoid the windows API if at all possible :) |
| ||
SetGraphicsDriver GLMax2DDriver() Graphics 800 , 600 Local my:Byte Ptr = glGetString(GL_RENDERER) Local name:String = String.FromCString(my) Print name might need some trimming. |
| ||
Ah, right, Sorry guys, i misread the given information. Thanks Ozak, and Thanks TonyG :D Thats exactly what I need! |