Remove no longer needed mac specific OpenGL extensions check
This commit is contained in:
parent
de6967df0d
commit
7941ac1810
@ -22,10 +22,9 @@ from .fast_data_types import (
|
||||
GL_VERSION_REQUIRED, GLFW_CONTEXT_VERSION_MAJOR,
|
||||
GLFW_CONTEXT_VERSION_MINOR, GLFW_DECORATED, GLFW_OPENGL_CORE_PROFILE,
|
||||
GLFW_OPENGL_FORWARD_COMPAT, GLFW_OPENGL_PROFILE, GLFW_SAMPLES,
|
||||
GLFW_STENCIL_BITS, GLFWWindow, change_wcwidth, check_for_extensions,
|
||||
clear_buffers, gl_init, glfw_init, glfw_init_hint_string,
|
||||
glfw_swap_interval, glfw_terminate, glfw_window_hint,
|
||||
install_sigchld_handler, set_logical_dpi, set_options
|
||||
GLFW_STENCIL_BITS, GLFWWindow, change_wcwidth, clear_buffers, gl_init,
|
||||
glfw_init, glfw_init_hint_string, glfw_swap_interval, glfw_terminate,
|
||||
glfw_window_hint, install_sigchld_handler, set_logical_dpi, set_options
|
||||
)
|
||||
from .layout import all_layouts
|
||||
from .utils import (
|
||||
@ -195,7 +194,6 @@ def run_app(opts, args):
|
||||
window.make_context_current()
|
||||
if isosx:
|
||||
from .fast_data_types import cocoa_make_window_resizable, cocoa_create_global_menu, cocoa_init
|
||||
check_for_extensions()
|
||||
cocoa_init()
|
||||
cocoa_create_global_menu()
|
||||
if opts.macos_hide_titlebar:
|
||||
|
||||
@ -562,33 +562,11 @@ PYWRAP1(clear_buffers) {
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PYWRAP0(check_for_extensions) {
|
||||
GLint n = 0, i, left = 2;
|
||||
glGetIntegerv(GL_NUM_EXTENSIONS, &n);
|
||||
bool texture_storage = false;
|
||||
#define CHECK(name) if (!name) { \
|
||||
if (strstr((const char*)ext, "GL_ARB_" #name) == (const char *)ext) { left--; name = true; } \
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
const GLubyte *ext = glGetStringi(GL_EXTENSIONS, i);
|
||||
CHECK(texture_storage);
|
||||
if (left < 1) break;
|
||||
}
|
||||
#undef CHECK
|
||||
if (left > 0) {
|
||||
#define CHECK(name) if (!name) { PyErr_Format(PyExc_RuntimeError, "The OpenGL driver on this system is missing the required extension: GL_ARB_%s", #name); return NULL; }
|
||||
CHECK(texture_storage);
|
||||
#undef CHECK
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
#define M(name, arg_type) {#name, (PyCFunction)name, arg_type, NULL}
|
||||
#define MW(name, arg_type) {#name, (PyCFunction)py##name, arg_type, NULL}
|
||||
static PyMethodDef module_methods[] = {
|
||||
M(gl_init, METH_VARARGS),
|
||||
M(compile_program, METH_VARARGS),
|
||||
MW(check_for_extensions, METH_NOARGS),
|
||||
MW(create_vao, METH_NOARGS),
|
||||
MW(remove_vao, METH_O),
|
||||
MW(bind_vertex_array, METH_O),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user