Bind vertex array object extension functions. */
| 297 | |
| 298 | /** Bind vertex array object extension functions. */ |
| 299 | static bool BindVBAExtension() |
| 300 | { |
| 301 | /* The APPLE and ARB variants have different semantics (that don't matter for us). |
| 302 | * Successfully getting pointers to one variant doesn't mean it is supported for |
| 303 | * the current context. Always check the extension strings as well. */ |
| 304 | if (IsOpenGLVersionAtLeast(3, 0) || IsOpenGLExtensionSupported("GL_ARB_vertex_array_object")) { |
| 305 | if (!BindGLProc(_glGenVertexArrays, "glGenVertexArrays")) return false; |
| 306 | if (!BindGLProc(_glDeleteVertexArrays, "glDeleteVertexArrays")) return false; |
| 307 | if (!BindGLProc(_glBindVertexArray, "glBindVertexArray")) return false; |
| 308 | } else if (IsOpenGLExtensionSupported("GL_APPLE_vertex_array_object")) { |
| 309 | if (!BindGLProc(_glGenVertexArrays, "glGenVertexArraysAPPLE")) return false; |
| 310 | if (!BindGLProc(_glDeleteVertexArrays, "glDeleteVertexArraysAPPLE")) return false; |
| 311 | if (!BindGLProc(_glBindVertexArray, "glBindVertexArrayAPPLE")) return false; |
| 312 | } |
| 313 | |
| 314 | return true; |
| 315 | } |
| 316 | |
| 317 | /** Bind extension functions for shader support. */ |
| 318 | static bool BindShaderExtensions() |
no test coverage detected