OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 | 9 |
10 #include "GrGLAssembleInterface.h" | 10 #include "GrGLAssembleInterface.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 } | 262 } |
263 if (extensions.has("GL_EXT_framebuffer_blit")) { | 263 if (extensions.has("GL_EXT_framebuffer_blit")) { |
264 GET_PROC_SUFFIX(BlitFramebuffer, EXT); | 264 GET_PROC_SUFFIX(BlitFramebuffer, EXT); |
265 } | 265 } |
266 } else { | 266 } else { |
267 // we must have FBOs | 267 // we must have FBOs |
268 delete interface; | 268 delete interface; |
269 return nullptr; | 269 return nullptr; |
270 } | 270 } |
271 | 271 |
| 272 if (glVer >= GR_GL_VER(4,3)) { |
| 273 GET_PROC(FramebufferParameteri); |
| 274 } |
| 275 |
272 if (extensions.has("GL_NV_path_rendering")) { | 276 if (extensions.has("GL_NV_path_rendering")) { |
273 GET_PROC_SUFFIX(MatrixLoadf, EXT); | 277 GET_PROC_SUFFIX(MatrixLoadf, EXT); |
274 GET_PROC_SUFFIX(MatrixLoadIdentity, EXT); | 278 GET_PROC_SUFFIX(MatrixLoadIdentity, EXT); |
275 GET_PROC_SUFFIX(PathCommands, NV); | 279 GET_PROC_SUFFIX(PathCommands, NV); |
276 GET_PROC_SUFFIX(PathParameteri, NV); | 280 GET_PROC_SUFFIX(PathParameteri, NV); |
277 GET_PROC_SUFFIX(PathParameterf, NV); | 281 GET_PROC_SUFFIX(PathParameterf, NV); |
278 GET_PROC_SUFFIX(GenPaths, NV); | 282 GET_PROC_SUFFIX(GenPaths, NV); |
279 GET_PROC_SUFFIX(DeletePaths, NV); | 283 GET_PROC_SUFFIX(DeletePaths, NV); |
280 GET_PROC_SUFFIX(IsPath, NV); | 284 GET_PROC_SUFFIX(IsPath, NV); |
281 GET_PROC_SUFFIX(PathStencilFunc, NV); | 285 GET_PROC_SUFFIX(PathStencilFunc, NV); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 GET_PROC(VertexAttrib2fv); | 621 GET_PROC(VertexAttrib2fv); |
618 GET_PROC(VertexAttrib3fv); | 622 GET_PROC(VertexAttrib3fv); |
619 GET_PROC(VertexAttrib4fv); | 623 GET_PROC(VertexAttrib4fv); |
620 GET_PROC(VertexAttribPointer); | 624 GET_PROC(VertexAttribPointer); |
621 GET_PROC(Viewport); | 625 GET_PROC(Viewport); |
622 GET_PROC(BindFramebuffer); | 626 GET_PROC(BindFramebuffer); |
623 GET_PROC(BindRenderbuffer); | 627 GET_PROC(BindRenderbuffer); |
624 GET_PROC(CheckFramebufferStatus); | 628 GET_PROC(CheckFramebufferStatus); |
625 GET_PROC(DeleteFramebuffers); | 629 GET_PROC(DeleteFramebuffers); |
626 GET_PROC(DeleteRenderbuffers); | 630 GET_PROC(DeleteRenderbuffers); |
| 631 |
| 632 if (version >= GR_GL_VER(3,1)) { |
| 633 GET_PROC(FramebufferParameteri); |
| 634 } |
| 635 |
627 GET_PROC(FramebufferRenderbuffer); | 636 GET_PROC(FramebufferRenderbuffer); |
628 GET_PROC(FramebufferTexture2D); | 637 GET_PROC(FramebufferTexture2D); |
629 | 638 |
630 if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) { | 639 if (extensions.has("GL_CHROMIUM_framebuffer_multisample")) { |
631 GET_PROC_SUFFIX(RenderbufferStorageMultisample, CHROMIUM); | 640 GET_PROC_SUFFIX(RenderbufferStorageMultisample, CHROMIUM); |
632 GET_PROC_SUFFIX(BlitFramebuffer, CHROMIUM); | 641 GET_PROC_SUFFIX(BlitFramebuffer, CHROMIUM); |
633 } else if (version >= GR_GL_VER(3,0)) { | 642 } else if (version >= GR_GL_VER(3,0)) { |
634 GET_PROC(RenderbufferStorageMultisample); | 643 GET_PROC(RenderbufferStorageMultisample); |
635 GET_PROC(BlitFramebuffer); | 644 GET_PROC(BlitFramebuffer); |
636 } | 645 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 777 |
769 if (extensions.has("GL_CHROMIUM_bind_uniform_location")) { | 778 if (extensions.has("GL_CHROMIUM_bind_uniform_location")) { |
770 GET_PROC_SUFFIX(BindUniformLocation, CHROMIUM); | 779 GET_PROC_SUFFIX(BindUniformLocation, CHROMIUM); |
771 } | 780 } |
772 | 781 |
773 interface->fStandard = kGLES_GrGLStandard; | 782 interface->fStandard = kGLES_GrGLStandard; |
774 interface->fExtensions.swap(&extensions); | 783 interface->fExtensions.swap(&extensions); |
775 | 784 |
776 return interface; | 785 return interface; |
777 } | 786 } |
OLD | NEW |