Index: ui/gl/gl_surface_wgl.cc |
diff --git a/ui/gl/gl_surface_wgl.cc b/ui/gl/gl_surface_wgl.cc |
index 7e1c3a7ad1fe9f2ec1cf127ba6eeadfb1f80b0b3..a865b42a7abcde10c44bd1fdd7999933f3a371ea 100644 |
--- a/ui/gl/gl_surface_wgl.cc |
+++ b/ui/gl/gl_surface_wgl.cc |
@@ -164,7 +164,10 @@ bool GLSurfaceWGL::InitializeOneOff() { |
if (!wgl_display->Init()) |
return false; |
- // Create a temporary GL context to bind to extension entry points. |
+ // Create a temporary GL context to bind to entry points. wglGetProcAddress |
+ // is specified to return NULL for all queries if a context is not current in |
+ // MSDN documentation, and the static bindings may contain functions that |
+ // need to be queried with wglGetProcAddress. |
HGLRC gl_context = wglCreateContext(wgl_display->device_context()); |
no sievers
2013/12/05 20:51:57
Should this move into gl_implementation_win.cc:Ini
oetuaho
2013/12/09 17:17:07
Yeah, this needs a fix. GLSurface::InitializeOneOf
|
if (!gl_context) { |
LOG(ERROR) << "Failed to create temporary context."; |
@@ -175,10 +178,8 @@ bool GLSurfaceWGL::InitializeOneOff() { |
wglDeleteContext(gl_context); |
return false; |
} |
- // Get bindings to extension functions that cannot be acquired without a |
- // current context. |
- InitializeGLBindingsGL(); |
- InitializeGLBindingsWGL(); |
+ InitializeStaticGLBindingsGL(); |
+ InitializeStaticGLBindingsWGL(); |
wglMakeCurrent(NULL, NULL); |
wglDeleteContext(gl_context); |