Place the OpenGL info strings into their own block. OS X reports these as completely different strings it was co-incidence that the actual vendor/card info is there on FreeBSD/Linux. It's likely other operating systems (eg. Windows) does the same thing as OS X. Eventually I'll re-add vendor information for the actual card once I figure out a way to get it on BSD/OS X.

Originally committed to SVN as r3601.
This commit is contained in:
Amar Takhar 2009-09-28 08:08:16 +00:00
parent 84e17451f9
commit c3fe549d4d
4 changed files with 27 additions and 22 deletions

View File

@ -178,25 +178,25 @@ public:
/// @retval Integer in bytes /// @retval Integer in bytes
virtual wxString Memory()=0; virtual wxString Memory()=0;
/// Video card /// OpenGL vendor
/// @return Video card vendor /// @return Vendor
/// @retval Any /// @retval Any
virtual wxString VideoVendor(); virtual wxString OpenGLVendor();
/// Video card renderer /// OpenGL renderer
/// @return Video card renderer name /// @return Renderer
/// @retval Any /// @retval Any
virtual wxString VideoRenderer(); virtual wxString OpenGLRenderer();
/// Video card version /// OpenGL version
/// @return Video card renderer version /// @return Renderer version
/// @retval Any /// @retval Any
virtual wxString VideoVersion(); virtual wxString OpenGLVersion();
/// Video card OpenGL extensions /// OpenGL extensions
/// @return List of extensions /// @return OpenGL extensions
/// @retval Space delimited list of extensions /// @retval Space delimited list of extensions
virtual wxString VideoExt(); virtual wxString OpenGLExt();
//@} //@}
/// @name Windows /// @name Windows

View File

@ -60,6 +60,7 @@ const Report::nameMap Report::HumanNames() {
nMap.insert(nPair("medusakeys", _TT("Medusa Hotkeys Enabled"))); nMap.insert(nPair("medusakeys", _TT("Medusa Hotkeys Enabled")));
nMap.insert(nPair("memory", _TT("Memory"))); nMap.insert(nPair("memory", _TT("Memory")));
nMap.insert(nPair("model", _TT("Model"))); nMap.insert(nPair("model", _TT("Model")));
nMap.insert(nPair("opengl", _TT("OpenGL")));
nMap.insert(nPair("osendian", _TT("Endian"))); nMap.insert(nPair("osendian", _TT("Endian")));
nMap.insert(nPair("osfamily", _TT("OS Family"))); nMap.insert(nPair("osfamily", _TT("OS Family")));
nMap.insert(nPair("osname", _TT("OS Name"))); nMap.insert(nPair("osname", _TT("OS Name")));

View File

@ -164,19 +164,19 @@ wxString Platform::DesktopEnvironment() {
return ""; return "";
} }
wxString Platform::VideoVendor() { wxString Platform::OpenGLVendor() {
return GetVideoInfo(VIDEO_VENDOR); return GetVideoInfo(VIDEO_VENDOR);
} }
wxString Platform::VideoRenderer() { wxString Platform::OpenGLRenderer() {
return GetVideoInfo(VIDEO_RENDERER); return GetVideoInfo(VIDEO_RENDERER);
} }
wxString Platform::VideoVersion() { wxString Platform::OpenGLVersion() {
return GetVideoInfo(VIDEO_VERSION); return GetVideoInfo(VIDEO_VERSION);
} }
wxString Platform::VideoExt() { wxString Platform::OpenGLExt() {
return GetVideoInfo(VIDEO_EXT); return GetVideoInfo(VIDEO_EXT);
} }

View File

@ -92,15 +92,19 @@ Report::XMLReport Report::ReportCreate() {
wxXmlNode *display = new wxXmlNode(wxXML_ELEMENT_NODE, "display"); wxXmlNode *display = new wxXmlNode(wxXML_ELEMENT_NODE, "display");
doc.hardware->AddChild(display); doc.hardware->AddChild(display);
Add(display, "vendor", p->VideoVendor());
Add(display, "renderer", p->VideoRenderer());
Add(display, "version", p->VideoVersion());
Add(display, "extensions", p->VideoExt());
Add(display, "depth", p->DisplayDepth()); Add(display, "depth", p->DisplayDepth());
Add(display, "colour", p->DisplayColour()); Add(display, "colour", p->DisplayColour());
Add(display, "size", p->DisplaySize()); Add(display, "size", p->DisplaySize());
Add(display, "ppi", p->DisplayPPI()); Add(display, "ppi", p->DisplayPPI());
wxXmlNode *display_gl = new wxXmlNode(wxXML_ELEMENT_NODE, "opengl");
display->AddChild(display_gl);
Add(display_gl, "vendor", p->OpenGLVendor());
Add(display_gl, "renderer", p->OpenGLRenderer());
Add(display_gl, "version", p->OpenGLVersion());
Add(display_gl, "extensions", p->OpenGLExt());
#ifdef __WINDOWS__ #ifdef __WINDOWS__
doc.windows = new wxXmlNode(wxXML_ELEMENT_NODE, "windows"); doc.windows = new wxXmlNode(wxXML_ELEMENT_NODE, "windows");
doc.report->AddChild(doc.windows); doc.report->AddChild(doc.windows);
@ -168,8 +172,8 @@ void Report::ProcessNode(wxXmlNode *node, wxString *text, wxListView *listView)
int depth = child->GetDepth(); int depth = child->GetDepth();
if (child->GetChildren()->GetType() == wxXML_ELEMENT_NODE) { if (child->GetChildren()->GetType() == wxXML_ELEMENT_NODE) {
int font_size = 15 - (round(depth * 2.5)); int font_size = 15 - (round(depth * 2));
int bgcolour = 185 + (depth * 25); int bgcolour = 155 + (depth * 20);
listView->InsertItem(row,node_name); listView->InsertItem(row,node_name);
listView->SetItemFont(row, wxFont(font_size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD)); listView->SetItemFont(row, wxFont(font_size, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD));
listView->SetItemBackgroundColour(row, wxColour(bgcolour,bgcolour,bgcolour, wxALPHA_OPAQUE)); listView->SetItemBackgroundColour(row, wxColour(bgcolour,bgcolour,bgcolour, wxALPHA_OPAQUE));