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/GrGLExtensions.h" | 9 #include "gl/GrGLExtensions.h" |
10 #include "gl/GrGLInterface.h" | 10 #include "gl/GrGLInterface.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 return NULL; | 34 return NULL; |
35 } | 35 } |
36 | 36 |
37 const char* versionString = (const char*) getString(GL_VERSION); | 37 const char* versionString = (const char*) getString(GL_VERSION); |
38 GrGLVersion glVer = GrGLGetVersionFromString(versionString); | 38 GrGLVersion glVer = GrGLGetVersionFromString(versionString); |
39 | 39 |
40 if (glVer < GR_GL_VER(1,5)) { | 40 if (glVer < GR_GL_VER(1,5)) { |
41 // We must have array and element_array buffer objects. | 41 // We must have array and element_array buffer objects. |
42 return NULL; | 42 return NULL; |
43 } | 43 } |
44 GrGLInterface* interface = new GrGLInterface(); | 44 GrGLInterface* interface = SkNEW(GrGLInterface()); |
45 | 45 |
46 GR_GL_GET_PROC(ActiveTexture); | 46 GR_GL_GET_PROC(ActiveTexture); |
47 GR_GL_GET_PROC(BeginQuery); | 47 GR_GL_GET_PROC(BeginQuery); |
48 GR_GL_GET_PROC(AttachShader); | 48 GR_GL_GET_PROC(AttachShader); |
49 GR_GL_GET_PROC(BindAttribLocation); | 49 GR_GL_GET_PROC(BindAttribLocation); |
50 GR_GL_GET_PROC(BindBuffer); | 50 GR_GL_GET_PROC(BindBuffer); |
51 GR_GL_GET_PROC(BindFragDataLocation); | 51 GR_GL_GET_PROC(BindFragDataLocation); |
52 GR_GL_GET_PROC(BindTexture); | 52 GR_GL_GET_PROC(BindTexture); |
53 GR_GL_GET_PROC(BlendFunc); | 53 GR_GL_GET_PROC(BlendFunc); |
54 | 54 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 delete interface; | 219 delete interface; |
220 return NULL; | 220 return NULL; |
221 } | 221 } |
222 GR_GL_GET_PROC(BindFragDataLocationIndexed); | 222 GR_GL_GET_PROC(BindFragDataLocationIndexed); |
223 interface->fBindingsExported = kDesktop_GrGLBinding; | 223 interface->fBindingsExported = kDesktop_GrGLBinding; |
224 return interface; | 224 return interface; |
225 } else { | 225 } else { |
226 return NULL; | 226 return NULL; |
227 } | 227 } |
228 } | 228 } |
OLD | NEW |