[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54851] trunk/blender/intern/ghost/intern/ GHOST_WindowWin32.cpp: is_crappy_intel_card() was checking strstr( glGetString(GL_VENDOR), "Intel") every call,
Campbell Barton
ideasman42 at gmail.com
Mon Feb 25 13:03:27 CET 2013
Revision: 54851
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54851
Author: campbellbarton
Date: 2013-02-25 12:03:26 +0000 (Mon, 25 Feb 2013)
Log Message:
-----------
is_crappy_intel_card() was checking strstr(glGetString(GL_VENDOR), "Intel") every call,
better store in static var.
Modified Paths:
--------------
trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-02-25 11:52:18 UTC (rev 54850)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp 2013-02-25 12:03:26 UTC (rev 54851)
@@ -104,13 +104,14 @@
* can't be in multiple-devices configuration. */
static int is_crappy_intel_card(void)
{
- int crappy = 0;
- const char *vendor = (const char *)glGetString(GL_VENDOR);
+ static short is_crappy = -1;
- if (strstr(vendor, "Intel"))
- crappy = 1;
+ if (is_crappy == -1) {
+ const char *vendor = (const char *)glGetString(GL_VENDOR);
+ is_crappy = (strstr(vendor, "Intel") != NULL);
+ }
- return crappy;
+ return is_crappy;
}
GHOST_WindowWin32::GHOST_WindowWin32(
More information about the Bf-blender-cvs
mailing list