OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <d3dx9.h> | 5 #include <d3dx9.h> |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 InitializeGLBindingsGL(); | 200 InitializeGLBindingsGL(); |
201 break; | 201 break; |
202 } | 202 } |
203 default: | 203 default: |
204 return false; | 204 return false; |
205 } | 205 } |
206 | 206 |
207 return true; | 207 return true; |
208 } | 208 } |
209 | 209 |
| 210 bool InitializeGLExtensionBindings(GLImplementation implementation, |
| 211 GLContext* context) { |
| 212 switch (implementation) { |
| 213 case kGLImplementationOSMesaGL: |
| 214 InitializeGLExtensionBindingsGL(context); |
| 215 InitializeGLExtensionBindingsOSMESA(context); |
| 216 break; |
| 217 case kGLImplementationEGLGLES2: |
| 218 InitializeGLExtensionBindingsGL(context); |
| 219 InitializeGLExtensionBindingsEGL(context); |
| 220 break; |
| 221 case kGLImplementationDesktopGL: |
| 222 InitializeGLExtensionBindingsGL(context); |
| 223 InitializeGLExtensionBindingsWGL(context); |
| 224 break; |
| 225 case kGLImplementationMockGL: |
| 226 InitializeGLExtensionBindingsGL(context); |
| 227 break; |
| 228 default: |
| 229 return false; |
| 230 } |
| 231 |
| 232 return true; |
| 233 } |
| 234 |
210 void InitializeDebugGLBindings() { | 235 void InitializeDebugGLBindings() { |
211 InitializeDebugGLBindingsEGL(); | 236 InitializeDebugGLBindingsEGL(); |
212 InitializeDebugGLBindingsGL(); | 237 InitializeDebugGLBindingsGL(); |
213 InitializeDebugGLBindingsOSMESA(); | 238 InitializeDebugGLBindingsOSMESA(); |
214 InitializeDebugGLBindingsWGL(); | 239 InitializeDebugGLBindingsWGL(); |
215 } | 240 } |
216 | 241 |
217 } // namespace gfx | 242 } // namespace gfx |
OLD | NEW |