Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano <germano.costa@ig.com.br>2018-02-16 21:46:58 +0300
committerGermano <germano.costa@ig.com.br>2018-02-16 21:46:58 +0300
commit4b1904c8df6ba9aee6758927eeebee8aa0ad41ef (patch)
treed196c2b41949172a10ccc07adede553b0567e9eb /intern/ghost
parentc45f28ce9510fead1dcd216bb2e667a20cea5a28 (diff)
GHOST: Windows: Print information on the GPU
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_ContextWGL.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_ContextWGL.cpp b/intern/ghost/intern/GHOST_ContextWGL.cpp
index e6498f1ffa8..14f1ac54fff 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextWGL.cpp
@@ -737,7 +737,7 @@ static void reportContextString(const char *name, const char *dummy, const char
{
fprintf(stderr, "%s: %s\n", name, context);
- if (strcmp(dummy, context) != 0)
+ if (dummy && strcmp(dummy, context) != 0)
fprintf(stderr, "Warning! Dummy %s: %s\n", name, dummy);
}
#endif
@@ -901,16 +901,16 @@ GHOST_TSuccess GHOST_ContextWGL::initializeDrawingContext()
initClearGL();
::SwapBuffers(m_hDC);
+#ifndef NDEBUG
const char *vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
const char *renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
const char *version = reinterpret_cast<const char*>(glGetString(GL_VERSION));
-#ifndef NDEBUG
- if (m_dummyVendor != NULL) {
- reportContextString("Vendor", m_dummyVendor, vendor);
- reportContextString("Renderer", m_dummyRenderer, renderer);
- reportContextString("Version", m_dummyVersion, version);
- }
+ reportContextString("Vendor", m_dummyVendor, vendor);
+ reportContextString("Renderer", m_dummyRenderer, renderer);
+ reportContextString("Version", m_dummyVersion, version);
+
+ fprintf(stderr, "Context Version: %d.%d\n", m_contextMajorVersion, m_contextMinorVersion);
#endif
return GHOST_kSuccess;