Skip to content

Commit

Permalink
load_opengl_function alias for deprecated load
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Oct 14, 2023
1 parent 739ea02 commit 3ee8abe
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions glcontext/darwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ void GLContext_dealloc(GLContext * self) {

PyMethodDef GLContext_methods[] = {
{"load", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"load_opengl_function", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"release", (PyCFunction)GLContext_meth_release, METH_NOARGS, NULL},
{"__enter__", (PyCFunction)GLContext_meth_enter, METH_NOARGS, NULL},
{"__exit__", (PyCFunction)GLContext_meth_exit, METH_VARARGS, NULL},
Expand Down
1 change: 1 addition & 0 deletions glcontext/egl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ void GLContext_dealloc(GLContext * self) {

PyMethodDef GLContext_methods[] = {
{"load", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"load_opengl_function", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"release", (PyCFunction)GLContext_meth_release, METH_NOARGS, NULL},
{"__enter__", (PyCFunction)GLContext_meth_enter, METH_NOARGS, NULL},
{"__exit__", (PyCFunction)GLContext_meth_exit, METH_VARARGS, NULL},
Expand Down
2 changes: 1 addition & 1 deletion glcontext/empty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void GLContext_dealloc(GLContext * self) {
}

PyMethodDef GLContext_methods[] = {
{"load", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"load_opengl_function", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"release", (PyCFunction)GLContext_meth_release, METH_NOARGS, NULL},
{"__enter__", (PyCFunction)GLContext_meth_enter, METH_NOARGS, NULL},
{"__exit__", (PyCFunction)GLContext_meth_exit, METH_VARARGS, NULL},
Expand Down
2 changes: 1 addition & 1 deletion glcontext/empty.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class GLContext:
def __init__(self):
pass

def load(self):
def load_opengl_function(self, name):
return 0

def __enter__(self):
Expand Down
1 change: 1 addition & 0 deletions glcontext/wgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ void GLContext_dealloc(GLContext * self) {

PyMethodDef GLContext_methods[] = {
{"load", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"load_opengl_function", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"release", (PyCFunction)GLContext_meth_release, METH_NOARGS, NULL},
{"__enter__", (PyCFunction)GLContext_meth_enter, METH_NOARGS, NULL},
{"__exit__", (PyCFunction)GLContext_meth_exit, METH_VARARGS, NULL},
Expand Down
1 change: 1 addition & 0 deletions glcontext/x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ void GLContext_dealloc(GLContext * self) {

PyMethodDef GLContext_methods[] = {
{"load", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"load_opengl_function", (PyCFunction)GLContext_meth_load, METH_O, NULL},
{"release", (PyCFunction)GLContext_meth_release, METH_NOARGS, NULL},
{"__enter__", (PyCFunction)GLContext_meth_enter, METH_NOARGS, NULL},
{"__exit__", (PyCFunction)GLContext_meth_exit, METH_VARARGS, NULL},
Expand Down

0 comments on commit 3ee8abe

Please sign in to comment.