Fix #137052: GPU: Crash on startup caused by legacy pyGPU API
The removed legacy API was still in used by the pyGPU API.
Add a deprecation warning instead.
This partially reverts commit 3179cb0069.
This commit is contained in:
@@ -109,6 +109,11 @@ static PyObject *pygpu_shader__tp_new(PyTypeObject * /*type*/, PyObject *args, P
|
||||
{
|
||||
BPYGPU_IS_INIT_OR_ERROR_OBJ;
|
||||
|
||||
PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"Direct shader creation is deprecated. "
|
||||
"Use gpu.shader.create_from_info(shader_info) instead.",
|
||||
1);
|
||||
|
||||
struct {
|
||||
const char *vertexcode;
|
||||
const char *fragcode;
|
||||
|
||||
Reference in New Issue
Block a user