OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "gl/GrGLInterface.h" | 9 #include "gl/GrGLInterface.h" |
10 #include "gl/GrGLUtil.h" | 10 #include "gl/GrGLUtil.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 SET_PROC(Enable) | 96 SET_PROC(Enable) |
97 SET_PROC(FrontFace) | 97 SET_PROC(FrontFace) |
98 SET_PROC(Finish) | 98 SET_PROC(Finish) |
99 SET_PROC(Flush) | 99 SET_PROC(Flush) |
100 SET_PROC(GenTextures) | 100 SET_PROC(GenTextures) |
101 SET_PROC(GetError) | 101 SET_PROC(GetError) |
102 SET_PROC(GetIntegerv) | 102 SET_PROC(GetIntegerv) |
103 SET_PROC(GetString) | 103 SET_PROC(GetString) |
104 SET_PROC(GetTexLevelParameteriv) | 104 SET_PROC(GetTexLevelParameteriv) |
105 SET_PROC(LineWidth) | 105 SET_PROC(LineWidth) |
106 SET_PROC(LoadIdentity) | |
107 SET_PROC(LoadMatrixf) | |
108 SET_PROC(MatrixMode) | |
109 SET_PROC(PixelStorei) | 106 SET_PROC(PixelStorei) |
110 SET_PROC(ReadBuffer) | 107 SET_PROC(ReadBuffer) |
111 SET_PROC(ReadPixels) | 108 SET_PROC(ReadPixels) |
112 SET_PROC(Scissor) | 109 SET_PROC(Scissor) |
113 SET_PROC(StencilFunc) | 110 SET_PROC(StencilFunc) |
114 SET_PROC(StencilMask) | 111 SET_PROC(StencilMask) |
115 SET_PROC(StencilOp) | 112 SET_PROC(StencilOp) |
116 SET_PROC(TexImage2D) | 113 SET_PROC(TexImage2D) |
117 SET_PROC(TexParameteri) | 114 SET_PROC(TexParameteri) |
118 SET_PROC(TexParameteriv) | 115 SET_PROC(TexParameteriv) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 WGL_SET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT); | 232 WGL_SET_PROC_SUFFIX(RenderbufferStorageMultisample, EXT); |
236 } | 233 } |
237 if (extensions.has("GL_EXT_framebuffer_blit")) { | 234 if (extensions.has("GL_EXT_framebuffer_blit")) { |
238 WGL_SET_PROC_SUFFIX(BlitFramebuffer, EXT); | 235 WGL_SET_PROC_SUFFIX(BlitFramebuffer, EXT); |
239 } | 236 } |
240 } else { | 237 } else { |
241 // we must have FBOs | 238 // we must have FBOs |
242 delete interface; | 239 delete interface; |
243 return NULL; | 240 return NULL; |
244 } | 241 } |
| 242 |
245 WGL_SET_PROC(MapBuffer); | 243 WGL_SET_PROC(MapBuffer); |
| 244 if (extensions.has("GL_EXT_direct_state_access")) { |
| 245 WGL_SET_PROC_SUFFIX(MatrixLoadf, EXT); |
| 246 WGL_SET_PROC_SUFFIX(MatrixLoadIdentity, EXT); |
| 247 } |
246 WGL_SET_PROC(UnmapBuffer); | 248 WGL_SET_PROC(UnmapBuffer); |
247 | 249 |
248 if (extensions.has("GL_NV_path_rendering")) { | 250 if (extensions.has("GL_NV_path_rendering")) { |
249 WGL_SET_PROC_SUFFIX(PathCommands, NV); | 251 WGL_SET_PROC_SUFFIX(PathCommands, NV); |
250 WGL_SET_PROC_SUFFIX(PathCoords, NV); | 252 WGL_SET_PROC_SUFFIX(PathCoords, NV); |
251 WGL_SET_PROC_SUFFIX(PathSubCommands, NV); | 253 WGL_SET_PROC_SUFFIX(PathSubCommands, NV); |
252 WGL_SET_PROC_SUFFIX(PathSubCoords, NV); | 254 WGL_SET_PROC_SUFFIX(PathSubCoords, NV); |
253 WGL_SET_PROC_SUFFIX(PathString, NV); | 255 WGL_SET_PROC_SUFFIX(PathString, NV); |
254 WGL_SET_PROC_SUFFIX(PathGlyphs, NV); | 256 WGL_SET_PROC_SUFFIX(PathGlyphs, NV); |
255 WGL_SET_PROC_SUFFIX(PathGlyphRange, NV); | 257 WGL_SET_PROC_SUFFIX(PathGlyphRange, NV); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 315 } |
314 | 316 |
315 interface->fStandard = kGL_GrGLStandard; | 317 interface->fStandard = kGL_GrGLStandard; |
316 interface->fExtensions.swap(&extensions); | 318 interface->fExtensions.swap(&extensions); |
317 | 319 |
318 return interface; | 320 return interface; |
319 } else { | 321 } else { |
320 return NULL; | 322 return NULL; |
321 } | 323 } |
322 } | 324 } |
OLD | NEW |