diff options
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_gizmo_wrap.c | 56 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_gizmo_wrap.h | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 3 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_gizmo.c | 94 | ||||
-rw-r--r-- | source/blender/python/intern/gpu_py_matrix.c | 40 |
7 files changed, 103 insertions, 100 deletions
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index d3464ea5841..a94708c0602 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -254,7 +254,7 @@ static void pydriver_error(ChannelDriver *driver) #define OK_OP(op) [op] = 1 -const char secure_opcodes[255] = { +static const char secure_opcodes[255] = { OK_OP(POP_TOP), OK_OP(ROT_TWO), OK_OP(ROT_THREE), diff --git a/source/blender/python/intern/bpy_gizmo_wrap.c b/source/blender/python/intern/bpy_gizmo_wrap.c index 4b71ea92010..2a932cb6a99 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.c +++ b/source/blender/python/intern/bpy_gizmo_wrap.c @@ -54,7 +54,7 @@ static bool bpy_gizmotype_target_property_def( - wmGizmoType *wt, PyObject *item) + wmGizmoType *gzt, PyObject *item) { /* Note: names based on 'rna_rna.c' */ PyObject *empty_tuple = PyTuple_New(0); @@ -102,7 +102,7 @@ static bool bpy_gizmotype_target_property_def( goto fail; } - WM_gizmotype_target_property_def(wt, params.id, params.type, params.array_length); + WM_gizmotype_target_property_def(gzt, params.id, params.type, params.array_length); Py_DECREF(empty_tuple); return true; @@ -111,17 +111,17 @@ fail: return false; } -static void gizmo_properties_init(wmGizmoType *wt) +static void gizmo_properties_init(wmGizmoType *gzt) { - PyTypeObject *py_class = wt->ext.data; - RNA_struct_blender_type_set(wt->ext.srna, wt); + PyTypeObject *py_class = gzt->ext.data; + RNA_struct_blender_type_set(gzt->ext.srna, gzt); /* only call this so pyrna_deferred_register_class gives a useful error * WM_operatortype_append_ptr will call RNA_def_struct_identifier * later */ - RNA_def_struct_identifier_no_struct_map(wt->srna, wt->idname); + RNA_def_struct_identifier_no_struct_map(gzt->srna, gzt->idname); - if (pyrna_deferred_register_class(wt->srna, py_class) != 0) { + if (pyrna_deferred_register_class(gzt->srna, py_class) != 0) { PyErr_Print(); /* failed to register operator props */ PyErr_Clear(); } @@ -149,7 +149,7 @@ static void gizmo_properties_init(wmGizmoType *wt) PyObject **items = PySequence_Fast_ITEMS(bl_target_properties_fast); for (uint i = 0; i < items_len; i++) { - if (!bpy_gizmotype_target_property_def(wt, items[i])) { + if (!bpy_gizmotype_target_property_def(gzt, items[i])) { PyErr_Print(); PyErr_Clear(); break; @@ -161,25 +161,25 @@ static void gizmo_properties_init(wmGizmoType *wt) } } -void BPY_RNA_gizmo_wrapper(wmGizmoType *wt, void *userdata) +void BPY_RNA_gizmo_wrapper(wmGizmoType *gzt, void *userdata) { /* take care not to overwrite anything set in * WM_gizmomaptype_group_link_ptr before opfunc() is called */ - StructRNA *srna = wt->srna; - *wt = *((wmGizmoType *)userdata); - wt->srna = srna; /* restore */ + StructRNA *srna = gzt->srna; + *gzt = *((wmGizmoType *)userdata); + gzt->srna = srna; /* restore */ /* don't do translations here yet */ #if 0 /* Use i18n context from ext.srna if possible (py gizmogroups). */ - if (wt->ext.srna) { - RNA_def_struct_translation_context(wt->srna, RNA_struct_translation_context(wt->ext.srna)); + if (gt->ext.srna) { + RNA_def_struct_translation_context(gt->srna, RNA_struct_translation_context(gt->ext.srna)); } #endif - wt->struct_size = sizeof(wmGizmo); + gzt->struct_size = sizeof(wmGizmo); - gizmo_properties_init(wt); + gizmo_properties_init(gzt); } /** \} */ @@ -190,46 +190,46 @@ void BPY_RNA_gizmo_wrapper(wmGizmoType *wt, void *userdata) /** \name Gizmo Group * \{ */ -static void gizmogroup_properties_init(wmGizmoGroupType *wgt) +static void gizmogroup_properties_init(wmGizmoGroupType *gzgt) { #ifdef USE_SRNA - PyTypeObject *py_class = wgt->ext.data; + PyTypeObject *py_class = gzgt->ext.data; #endif - RNA_struct_blender_type_set(wgt->ext.srna, wgt); + RNA_struct_blender_type_set(gzgt->ext.srna, gzgt); #ifdef USE_SRNA /* only call this so pyrna_deferred_register_class gives a useful error * WM_operatortype_append_ptr will call RNA_def_struct_identifier * later */ - RNA_def_struct_identifier(wgt->srna, wgt->idname); + RNA_def_struct_identifier(gzgt->srna, gzgt->idname); - if (pyrna_deferred_register_class(wgt->srna, py_class) != 0) { + if (pyrna_deferred_register_class(gzgt->srna, py_class) != 0) { PyErr_Print(); /* failed to register operator props */ PyErr_Clear(); } #endif } -void BPY_RNA_gizmogroup_wrapper(wmGizmoGroupType *wgt, void *userdata) +void BPY_RNA_gizmogroup_wrapper(wmGizmoGroupType *gzgt, void *userdata) { /* take care not to overwrite anything set in * WM_gizmomaptype_group_link_ptr before opfunc() is called */ #ifdef USE_SRNA - StructRNA *srna = wgt->srna; + StructRNA *srna = gzgt->srna; #endif - *wgt = *((wmGizmoGroupType *)userdata); + *gzgt = *((wmGizmoGroupType *)userdata); #ifdef USE_SRNA - wgt->srna = srna; /* restore */ + gzgt->srna = srna; /* restore */ #endif #ifdef USE_SRNA /* Use i18n context from ext.srna if possible (py gizmogroups). */ - if (wgt->ext.srna) { - RNA_def_struct_translation_context(wgt->srna, RNA_struct_translation_context(wgt->ext.srna)); + if (gzgt->ext.srna) { + RNA_def_struct_translation_context(gzgt->srna, RNA_struct_translation_context(gzgt->ext.srna)); } #endif - gizmogroup_properties_init(wgt); + gizmogroup_properties_init(gzgt); } /** \} */ diff --git a/source/blender/python/intern/bpy_gizmo_wrap.h b/source/blender/python/intern/bpy_gizmo_wrap.h index 4d6639d977f..96f15312a4e 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.h +++ b/source/blender/python/intern/bpy_gizmo_wrap.h @@ -29,7 +29,7 @@ struct wmGizmoType; struct wmGizmoGroupType; /* exposed to rna/wm api */ -void BPY_RNA_gizmo_wrapper(struct wmGizmoType *wt, void *userdata); -void BPY_RNA_gizmogroup_wrapper(struct wmGizmoGroupType *wgt, void *userdata); +void BPY_RNA_gizmo_wrapper(struct wmGizmoType *gzt, void *userdata); +void BPY_RNA_gizmogroup_wrapper(struct wmGizmoGroupType *gzgt, void *userdata); #endif /* __BPY_GIZMO_WRAP_H__ */ diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 0d7b0c92a90..64bc54c6221 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -75,7 +75,7 @@ #include "../generic/blf_py_api.h" #include "../generic/idprop_py_api.h" #include "../generic/imbuf_py_api.h" -#include "../gawain/gwn_py_api.h" +#include "../gpu/gpu_py_api.h" #include "../bmesh/bmesh_py_api.h" #include "../mathutils/mathutils.h" @@ -219,7 +219,7 @@ static struct _inittab bpy_internal_modules[] = { {"mathutils.kdtree", PyInit_mathutils_kdtree}, #endif {"_bpy_path", BPyInit__bpy_path}, - {"_gawain", BPyInit_gawain}, + {"_gpu", BPyInit_gpu}, {"bgl", BPyInit_bgl}, {"blf", BPyInit_blf}, {"imbuf", BPyInit_imbuf}, diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index e0fbd144590..30bd3bc5ca3 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5118,6 +5118,9 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) case PROP_RAW_DOUBLE: item = PyFloat_FromDouble((double) ((double *)array)[i]); break; + case PROP_RAW_BOOLEAN: + item = PyBool_FromLong((long) ((bool *)array)[i]); + break; default: /* PROP_RAW_UNSET */ /* should never happen */ BLI_assert(!"Invalid array type - get"); diff --git a/source/blender/python/intern/bpy_rna_gizmo.c b/source/blender/python/intern/bpy_rna_gizmo.c index e834595114a..ded26f777a5 100644 --- a/source/blender/python/intern/bpy_rna_gizmo.c +++ b/source/blender/python/intern/bpy_rna_gizmo.c @@ -67,26 +67,26 @@ struct BPyGizmoHandlerUserData { }; static void py_rna_gizmo_handler_get_cb( - const wmGizmo *UNUSED(mpr), wmGizmoProperty *mpr_prop, + const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, void *value_p) { PyGILState_STATE gilstate = PyGILState_Ensure(); - struct BPyGizmoHandlerUserData *data = mpr_prop->custom_func.user_data; + struct BPyGizmoHandlerUserData *data = gz_prop->custom_func.user_data; PyObject *ret = PyObject_CallObject(data->fn_slots[BPY_GIZMO_FN_SLOT_GET], NULL); if (ret == NULL) { goto fail; } - if (mpr_prop->type->data_type == PROP_FLOAT) { + if (gz_prop->type->data_type == PROP_FLOAT) { float *value = value_p; - if (mpr_prop->type->array_length == 1) { + if (gz_prop->type->array_length == 1) { if ((*value = PyFloat_AsDouble(ret)) == -1.0f && PyErr_Occurred()) { goto fail; } } else { - if (PyC_AsArray(value, ret, mpr_prop->type->array_length, &PyFloat_Type, false, + if (PyC_AsArray(value, ret, gz_prop->type->array_length, &PyFloat_Type, false, "Gizmo get callback: ") == -1) { goto fail; @@ -111,23 +111,23 @@ fail: } static void py_rna_gizmo_handler_set_cb( - const wmGizmo *UNUSED(mpr), wmGizmoProperty *mpr_prop, + const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, const void *value_p) { PyGILState_STATE gilstate = PyGILState_Ensure(); - struct BPyGizmoHandlerUserData *data = mpr_prop->custom_func.user_data; + struct BPyGizmoHandlerUserData *data = gz_prop->custom_func.user_data; PyObject *args = PyTuple_New(1); - if (mpr_prop->type->data_type == PROP_FLOAT) { + if (gz_prop->type->data_type == PROP_FLOAT) { const float *value = value_p; PyObject *py_value; - if (mpr_prop->type->array_length == 1) { + if (gz_prop->type->array_length == 1) { py_value = PyFloat_FromDouble(*value); } else { - py_value = PyC_Tuple_PackArray_F32(value, mpr_prop->type->array_length); + py_value = PyC_Tuple_PackArray_F32(value, gz_prop->type->array_length); } if (py_value == NULL) { goto fail; @@ -158,10 +158,10 @@ fail: } static void py_rna_gizmo_handler_range_get_cb( - const wmGizmo *UNUSED(mpr), wmGizmoProperty *mpr_prop, + const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop, void *value_p) { - struct BPyGizmoHandlerUserData *data = mpr_prop->custom_func.user_data; + struct BPyGizmoHandlerUserData *data = gz_prop->custom_func.user_data; PyGILState_STATE gilstate = PyGILState_Ensure(); @@ -184,7 +184,7 @@ static void py_rna_gizmo_handler_range_get_cb( goto fail; } - if (mpr_prop->type->data_type == PROP_FLOAT) { + if (gz_prop->type->data_type == PROP_FLOAT) { float range[2]; for (int i = 0; i < 2; i++) { if (((range[i] = PyFloat_AsDouble(PyTuple_GET_ITEM(ret, i))) == -1.0f && PyErr_Occurred()) == 0) { @@ -215,9 +215,9 @@ fail: } static void py_rna_gizmo_handler_free_cb( - const wmGizmo *UNUSED(mpr), wmGizmoProperty *mpr_prop) + const wmGizmo *UNUSED(gz), wmGizmoProperty *gz_prop) { - struct BPyGizmoHandlerUserData *data = mpr_prop->custom_func.user_data; + struct BPyGizmoHandlerUserData *data = gz_prop->custom_func.user_data; PyGILState_STATE gilstate = PyGILState_Ensure(); for (int i = 0; i < BPY_GIZMO_FN_SLOT_LEN; i++) { @@ -271,14 +271,14 @@ static PyObject *bpy_gizmo_target_set_handler(PyObject *UNUSED(self), PyObject * goto fail; } - wmGizmo *mpr = ((BPy_StructRNA *)params.self)->ptr.data; + wmGizmo *gz = ((BPy_StructRNA *)params.self)->ptr.data; - const wmGizmoPropertyType *mpr_prop_type = - WM_gizmotype_target_property_find(mpr->type, params.target); - if (mpr_prop_type == NULL) { + const wmGizmoPropertyType *gz_prop_type = + WM_gizmotype_target_property_find(gz->type, params.target); + if (gz_prop_type == NULL) { PyErr_Format(PyExc_ValueError, "Gizmo target property '%s.%s' not found", - mpr->type->idname, params.target); + gz->type->idname, params.target); goto fail; } @@ -307,7 +307,7 @@ static PyObject *bpy_gizmo_target_set_handler(PyObject *UNUSED(self), PyObject * } WM_gizmo_target_property_def_func_ptr( - mpr, mpr_prop_type, + gz, gz_prop_type, &(const struct wmGizmoPropertyFnParams) { .value_get_fn = py_rna_gizmo_handler_get_cb, .value_set_fn = py_rna_gizmo_handler_set_cb, @@ -361,28 +361,28 @@ static PyObject *bpy_gizmo_target_get_value(PyObject *UNUSED(self), PyObject *ar goto fail; } - wmGizmo *mpr = ((BPy_StructRNA *)params.self)->ptr.data; + wmGizmo *gz = ((BPy_StructRNA *)params.self)->ptr.data; - wmGizmoProperty *mpr_prop = - WM_gizmo_target_property_find(mpr, params.target); - if (mpr_prop == NULL) { + wmGizmoProperty *gz_prop = + WM_gizmo_target_property_find(gz, params.target); + if (gz_prop == NULL) { PyErr_Format(PyExc_ValueError, "Gizmo target property '%s.%s' not found", - mpr->type->idname, params.target); + gz->type->idname, params.target); goto fail; } - const int array_len = WM_gizmo_target_property_array_length(mpr, mpr_prop); - switch (mpr_prop->type->data_type) { + const int array_len = WM_gizmo_target_property_array_length(gz, gz_prop); + switch (gz_prop->type->data_type) { case PROP_FLOAT: { if (array_len != 0) { float *value = BLI_array_alloca(value, array_len); - WM_gizmo_target_property_value_get_array(mpr, mpr_prop, value); + WM_gizmo_target_property_value_get_array(gz, gz_prop, value); return PyC_Tuple_PackArray_F32(value, array_len); } else { - float value = WM_gizmo_target_property_value_get(mpr, mpr_prop); + float value = WM_gizmo_target_property_value_get(gz, gz_prop); return PyFloat_FromDouble(value); } break; @@ -429,36 +429,36 @@ static PyObject *bpy_gizmo_target_set_value(PyObject *UNUSED(self), PyObject *ar goto fail; } - wmGizmo *mpr = ((BPy_StructRNA *)params.self)->ptr.data; + wmGizmo *gz = ((BPy_StructRNA *)params.self)->ptr.data; - wmGizmoProperty *mpr_prop = - WM_gizmo_target_property_find(mpr, params.target); - if (mpr_prop == NULL) { + wmGizmoProperty *gz_prop = + WM_gizmo_target_property_find(gz, params.target); + if (gz_prop == NULL) { PyErr_Format(PyExc_ValueError, "Gizmo target property '%s.%s' not found", - mpr->type->idname, params.target); + gz->type->idname, params.target); goto fail; } - const int array_len = WM_gizmo_target_property_array_length(mpr, mpr_prop); - switch (mpr_prop->type->data_type) { + const int array_len = WM_gizmo_target_property_array_length(gz, gz_prop); + switch (gz_prop->type->data_type) { case PROP_FLOAT: { if (array_len != 0) { float *value = BLI_array_alloca(value, array_len); - if (PyC_AsArray(value, params.value, mpr_prop->type->array_length, &PyFloat_Type, false, + if (PyC_AsArray(value, params.value, gz_prop->type->array_length, &PyFloat_Type, false, "Gizmo target property array") == -1) { goto fail; } - WM_gizmo_target_property_value_set_array(BPy_GetContext(), mpr, mpr_prop, value); + WM_gizmo_target_property_value_set_array(BPy_GetContext(), gz, gz_prop, value); } else { float value; if ((value = PyFloat_AsDouble(params.value)) == -1.0f && PyErr_Occurred()) { goto fail; } - WM_gizmo_target_property_value_set(BPy_GetContext(), mpr, mpr_prop, value); + WM_gizmo_target_property_value_set(BPy_GetContext(), gz, gz_prop, value); } Py_RETURN_NONE; } @@ -504,22 +504,22 @@ static PyObject *bpy_gizmo_target_get_range(PyObject *UNUSED(self), PyObject *ar goto fail; } - wmGizmo *mpr = ((BPy_StructRNA *)params.self)->ptr.data; + wmGizmo *gz = ((BPy_StructRNA *)params.self)->ptr.data; - wmGizmoProperty *mpr_prop = - WM_gizmo_target_property_find(mpr, params.target); - if (mpr_prop == NULL) { + wmGizmoProperty *gz_prop = + WM_gizmo_target_property_find(gz, params.target); + if (gz_prop == NULL) { PyErr_Format(PyExc_ValueError, "Gizmo target property '%s.%s' not found", - mpr->type->idname, params.target); + gz->type->idname, params.target); goto fail; } - switch (mpr_prop->type->data_type) { + switch (gz_prop->type->data_type) { case PROP_FLOAT: { float range[2]; - WM_gizmo_target_property_range_get(mpr, mpr_prop, range); + WM_gizmo_target_property_range_get(gz, gz_prop, range); return PyC_Tuple_PackArray_F32(range, 2); } default: diff --git a/source/blender/python/intern/gpu_py_matrix.c b/source/blender/python/intern/gpu_py_matrix.c index 68b08dfb324..2ab6fd864eb 100644 --- a/source/blender/python/intern/gpu_py_matrix.c +++ b/source/blender/python/intern/gpu_py_matrix.c @@ -102,7 +102,7 @@ static PyObject *pygpu_matrix_push(PyObject *UNUSED(self)) if (!pygpu_stack_is_push_model_view_ok_or_error()) { return NULL; } - gpuPushMatrix(); + GPU_matrix_push(); Py_RETURN_NONE; } @@ -116,7 +116,7 @@ static PyObject *pygpu_matrix_pop(PyObject *UNUSED(self)) if (!pygpu_stack_is_pop_model_view_ok_or_error()) { return NULL; } - gpuPopMatrix(); + GPU_matrix_pop(); Py_RETURN_NONE; } @@ -130,7 +130,7 @@ static PyObject *pygpu_matrix_push_projection(PyObject *UNUSED(self)) if (!pygpu_stack_is_push_projection_ok_or_error()) { return NULL; } - gpuPushProjectionMatrix(); + GPU_matrix_push_projection(); Py_RETURN_NONE; } @@ -144,7 +144,7 @@ static PyObject *pygpu_matrix_pop_projection(PyObject *UNUSED(self)) if (!pygpu_stack_is_pop_projection_ok_or_error()) { return NULL; } - gpuPopProjectionMatrix(); + GPU_matrix_pop_projection(); Py_RETURN_NONE; } @@ -197,14 +197,14 @@ static PyObject *pygpu_matrix_stack_context_enter(BPy_GPU_MatrixStackContext *se if (!pygpu_stack_is_push_model_view_ok_or_error()) { return NULL; } - gpuPushMatrix(); + GPU_matrix_push(); self->level = GPU_matrix_stack_level_get_model_view(); } else if (self->type == PYGPU_MATRIX_TYPE_PROJECTION) { if (!pygpu_stack_is_push_projection_ok_or_error()) { return NULL; } - gpuPushProjectionMatrix(); + GPU_matrix_push_projection(); self->level = GPU_matrix_stack_level_get_projection(); } else { @@ -227,7 +227,7 @@ static PyObject *pygpu_matrix_stack_context_exit(BPy_GPU_MatrixStackContext *sel fprintf(stderr, "Level push/pop mismatch, expected %d, got %d\n", self->level, level); } if (level != 0) { - gpuPopMatrix(); + GPU_matrix_pop(); } } else if (self->type == PYGPU_MATRIX_TYPE_PROJECTION) { @@ -236,7 +236,7 @@ static PyObject *pygpu_matrix_stack_context_exit(BPy_GPU_MatrixStackContext *sel fprintf(stderr, "Level push/pop mismatch, expected %d, got %d", self->level, level); } if (level != 0) { - gpuPopProjectionMatrix(); + GPU_matrix_pop_projection(); } } else { @@ -294,7 +294,7 @@ static PyObject *pygpu_matrix_multiply_matrix(PyObject *UNUSED(self), PyObject * if (!Matrix_Parse4x4(value, &pymat)) { return NULL; } - gpuMultMatrix(pymat->matrix); + GPU_matrix_mul(pymat->matrix); Py_RETURN_NONE; } @@ -314,10 +314,10 @@ static PyObject *pygpu_matrix_scale(PyObject *UNUSED(self), PyObject *value) return NULL; } if (len == 2) { - gpuScale2fv(scale); + GPU_matrix_scale_2fv(scale); } else { - gpuScale3fv(scale); + GPU_matrix_scale_3fv(scale); } Py_RETURN_NONE; } @@ -337,7 +337,7 @@ static PyObject *pygpu_matrix_scale_uniform(PyObject *UNUSED(self), PyObject *va Py_TYPE(value)->tp_name); return NULL; } - gpuScaleUniform(scalar); + GPU_matrix_scale_1f(scalar); Py_RETURN_NONE; } @@ -357,10 +357,10 @@ static PyObject *pygpu_matrix_translate(PyObject *UNUSED(self), PyObject *value) return NULL; } if (len == 2) { - gpuTranslate2fv(offset); + GPU_matrix_translate_2fv(offset); } else { - gpuTranslate3fv(offset); + GPU_matrix_translate_3fv(offset); } Py_RETURN_NONE; } @@ -378,7 +378,7 @@ PyDoc_STRVAR(pygpu_matrix_reset_doc, ); static PyObject *pygpu_matrix_reset(PyObject *UNUSED(self)) { - gpuMatrixReset(); + GPU_matrix_reset(); Py_RETURN_NONE; } @@ -389,7 +389,7 @@ PyDoc_STRVAR(pygpu_matrix_load_identity_doc, ); static PyObject *pygpu_matrix_load_identity(PyObject *UNUSED(self)) { - gpuLoadIdentity(); + GPU_matrix_identity_set(); Py_RETURN_NONE; } @@ -407,7 +407,7 @@ static PyObject *pygpu_matrix_load_matrix(PyObject *UNUSED(self), PyObject *valu if (!Matrix_Parse4x4(value, &pymat)) { return NULL; } - gpuLoadMatrix(pymat->matrix); + GPU_matrix_set(pymat->matrix); Py_RETURN_NONE; } @@ -428,7 +428,7 @@ PyDoc_STRVAR(pygpu_matrix_get_projection_matrix_doc, static PyObject *pygpu_matrix_get_projection_matrix(PyObject *UNUSED(self)) { float matrix[4][4]; - gpuGetModelViewMatrix(matrix); + GPU_matrix_model_view_get(matrix); return Matrix_CreatePyObject(&matrix[0][0], 4, 4, NULL); } @@ -444,7 +444,7 @@ PyDoc_STRVAR(pygpu_matrix_get_modal_view_matrix_doc, static PyObject *pygpu_matrix_get_modal_view_matrix(PyObject *UNUSED(self)) { float matrix[4][4]; - gpuGetProjectionMatrix(matrix); + GPU_matrix_projection_get(matrix); return Matrix_CreatePyObject(&matrix[0][0], 4, 4, NULL); } @@ -459,7 +459,7 @@ PyDoc_STRVAR(pygpu_matrix_get_normal_matrix_doc, static PyObject *pygpu_matrix_get_normal_matrix(PyObject *UNUSED(self)) { float matrix[3][3]; - gpuGetNormalMatrix(matrix); + GPU_matrix_normal_get(matrix); return Matrix_CreatePyObject(&matrix[0][0], 3, 3, NULL); } |