Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/gpu/gpu_py_shader.c
| Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | static PyObject *pygpu_shader_bind(BPyGPUShader *self) | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_uniform_from_name_doc, | PyDoc_STRVAR(pygpu_shader_uniform_from_name_doc, | ||||
| ".. method:: uniform_from_name(name)\n" | ".. method:: uniform_from_name(name)\n" | ||||
| "\n" | "\n" | ||||
| " Get uniform location by name.\n" | " Get uniform location by name.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: Name of the uniform variable whose location is to be queried.\n" | " :arg name: Name of the uniform variable whose location is to be queried.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :return: Location of the uniform variable.\n" | " :return: Location of the uniform variable.\n" | ||||
| " :rtype: int\n"); | " :rtype: int\n"); | ||||
| static PyObject *pygpu_shader_uniform_from_name(BPyGPUShader *self, PyObject *arg) | static PyObject *pygpu_shader_uniform_from_name(BPyGPUShader *self, PyObject *arg) | ||||
| { | { | ||||
| const char *name = PyUnicode_AsUTF8(arg); | const char *name = PyUnicode_AsUTF8(arg); | ||||
| if (name == NULL) { | if (name == NULL) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| const int uniform = pygpu_shader_uniform_location_get( | const int uniform = pygpu_shader_uniform_location_get( | ||||
| self->shader, name, "GPUShader.get_uniform"); | self->shader, name, "GPUShader.get_uniform"); | ||||
| if (uniform == -1) { | if (uniform == -1) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| return PyLong_FromLong(uniform); | return PyLong_FromLong(uniform); | ||||
| } | } | ||||
| PyDoc_STRVAR( | PyDoc_STRVAR(pygpu_shader_uniform_block_from_name_doc, | ||||
| pygpu_shader_uniform_block_from_name_doc, | |||||
| ".. method:: uniform_block_from_name(name)\n" | ".. method:: uniform_block_from_name(name)\n" | ||||
| "\n" | "\n" | ||||
| " Get uniform block location by name.\n" | " Get uniform block location by name.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: Name of the uniform block variable whose location is to be queried.\n" | " :arg name: Name of the uniform block variable whose location is to be queried.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :return: The location of the uniform block variable.\n" | " :return: The location of the uniform block variable.\n" | ||||
| " :rtype: int\n"); | " :rtype: int\n"); | ||||
| static PyObject *pygpu_shader_uniform_block_from_name(BPyGPUShader *self, PyObject *arg) | static PyObject *pygpu_shader_uniform_block_from_name(BPyGPUShader *self, PyObject *arg) | ||||
| { | { | ||||
| const char *name = PyUnicode_AsUTF8(arg); | const char *name = PyUnicode_AsUTF8(arg); | ||||
| if (name == NULL) { | if (name == NULL) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| const int uniform = GPU_shader_get_uniform_block(self->shader, name); | const int uniform = GPU_shader_get_uniform_block(self->shader, name); | ||||
| Show All 35 Lines | static bool pygpu_shader_uniform_vector_impl(PyObject *args, | ||||
| return true; | return true; | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_uniform_vector_float_doc, | PyDoc_STRVAR(pygpu_shader_uniform_vector_float_doc, | ||||
| ".. method:: uniform_vector_float(location, buffer, length, count)\n" | ".. method:: uniform_vector_float(location, buffer, length, count)\n" | ||||
| "\n" | "\n" | ||||
| " Set the buffer to fill the uniform.\n" | " Set the buffer to fill the uniform.\n" | ||||
| "\n" | "\n" | ||||
| " :param location: Location of the uniform variable to be modified.\n" | " :arg location: Location of the uniform variable to be modified.\n" | ||||
| " :type location: int\n" | " :type location: int\n" | ||||
| " :param buffer: The data that should be set. Can support the buffer protocol.\n" | " :arg buffer: The data that should be set. Can support the buffer protocol.\n" | ||||
| " :type buffer: sequence of floats\n" | " :type buffer: sequence of floats\n" | ||||
| " :param length: Size of the uniform data type:\n\n" | " :arg length: Size of the uniform data type:\n\n" | ||||
| " - 1: float\n" | " - 1: float\n" | ||||
| " - 2: vec2 or float[2]\n" | " - 2: vec2 or float[2]\n" | ||||
| " - 3: vec3 or float[3]\n" | " - 3: vec3 or float[3]\n" | ||||
| " - 4: vec4 or float[4]\n" | " - 4: vec4 or float[4]\n" | ||||
| " - 9: mat3\n" | " - 9: mat3\n" | ||||
| " - 16: mat4\n" | " - 16: mat4\n" | ||||
| " :type length: int\n" | " :type length: int\n" | ||||
| " :param count: Specifies the number of elements, vector or matrices that are to " | " :arg count: Specifies the number of elements, vector or matrices that are to " | ||||
| "be modified.\n" | "be modified.\n" | ||||
| " :type count: int\n"); | " :type count: int\n"); | ||||
| static PyObject *pygpu_shader_uniform_vector_float(BPyGPUShader *self, PyObject *args) | static PyObject *pygpu_shader_uniform_vector_float(BPyGPUShader *self, PyObject *args) | ||||
| { | { | ||||
| int location, length, count; | int location, length, count; | ||||
| Py_buffer pybuffer; | Py_buffer pybuffer; | ||||
| Show All 31 Lines | static PyObject *pygpu_shader_uniform_vector_int(BPyGPUShader *self, PyObject *args) | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_uniform_bool_doc, | PyDoc_STRVAR(pygpu_shader_uniform_bool_doc, | ||||
| ".. method:: uniform_bool(name, seq)\n" | ".. method:: uniform_bool(name, seq)\n" | ||||
| "\n" | "\n" | ||||
| " Specify the value of a uniform variable for the current program object.\n" | " Specify the value of a uniform variable for the current program object.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: Name of the uniform variable whose value is to be changed.\n" | " :arg name: Name of the uniform variable whose value is to be changed.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :param seq: Value that will be used to update the specified uniform variable.\n" | " :arg seq: Value that will be used to update the specified uniform variable.\n" | ||||
| " :type seq: sequence of bools\n"); | " :type seq: sequence of bools\n"); | ||||
| static PyObject *pygpu_shader_uniform_bool(BPyGPUShader *self, PyObject *args) | static PyObject *pygpu_shader_uniform_bool(BPyGPUShader *self, PyObject *args) | ||||
| { | { | ||||
| const char *error_prefix = "GPUShader.uniform_bool"; | const char *error_prefix = "GPUShader.uniform_bool"; | ||||
| struct { | struct { | ||||
| const char *id; | const char *id; | ||||
| PyObject *seq; | PyObject *seq; | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | static PyObject *pygpu_shader_uniform_bool(BPyGPUShader *self, PyObject *args) | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_uniform_float_doc, | PyDoc_STRVAR(pygpu_shader_uniform_float_doc, | ||||
| ".. method:: uniform_float(name, value)\n" | ".. method:: uniform_float(name, value)\n" | ||||
| "\n" | "\n" | ||||
| " Specify the value of a uniform variable for the current program object.\n" | " Specify the value of a uniform variable for the current program object.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: Name of the uniform variable whose value is to be changed.\n" | " :arg name: Name of the uniform variable whose value is to be changed.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :param value: Value that will be used to update the specified uniform variable.\n" | " :arg value: Value that will be used to update the specified uniform variable.\n" | ||||
| " :type value: single number or sequence of numbers\n"); | " :type value: single number or sequence of numbers\n"); | ||||
| static PyObject *pygpu_shader_uniform_float(BPyGPUShader *self, PyObject *args) | static PyObject *pygpu_shader_uniform_float(BPyGPUShader *self, PyObject *args) | ||||
| { | { | ||||
| const char *error_prefix = "GPUShader.uniform_float"; | const char *error_prefix = "GPUShader.uniform_float"; | ||||
| struct { | struct { | ||||
| const char *id; | const char *id; | ||||
| PyObject *seq; | PyObject *seq; | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | static PyObject *pygpu_shader_uniform_float(BPyGPUShader *self, PyObject *args) | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_uniform_int_doc, | PyDoc_STRVAR(pygpu_shader_uniform_int_doc, | ||||
| ".. method:: uniform_int(name, seq)\n" | ".. method:: uniform_int(name, seq)\n" | ||||
| "\n" | "\n" | ||||
| " Specify the value of a uniform variable for the current program object.\n" | " Specify the value of a uniform variable for the current program object.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: name of the uniform variable whose value is to be changed.\n" | " :arg name: name of the uniform variable whose value is to be changed.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :param seq: Value that will be used to update the specified uniform variable.\n" | " :arg seq: Value that will be used to update the specified uniform variable.\n" | ||||
| " :type seq: sequence of numbers\n"); | " :type seq: sequence of numbers\n"); | ||||
| static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args) | static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args) | ||||
| { | { | ||||
| const char *error_prefix = "GPUShader.uniform_int"; | const char *error_prefix = "GPUShader.uniform_int"; | ||||
| struct { | struct { | ||||
| const char *id; | const char *id; | ||||
| PyObject *seq; | PyObject *seq; | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | static PyObject *pygpu_shader_uniform_int(BPyGPUShader *self, PyObject *args) | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_uniform_sampler_doc, | PyDoc_STRVAR(pygpu_shader_uniform_sampler_doc, | ||||
| ".. method:: uniform_sampler(name, texture)\n" | ".. method:: uniform_sampler(name, texture)\n" | ||||
| "\n" | "\n" | ||||
| " Specify the value of a texture uniform variable for the current GPUShader.\n" | " Specify the value of a texture uniform variable for the current GPUShader.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: name of the uniform variable whose texture is to be specified.\n" | " :arg name: name of the uniform variable whose texture is to be specified.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :param texture: Texture to attach.\n" | " :arg texture: Texture to attach.\n" | ||||
| " :type texture: :class:`gpu.types.GPUTexture`\n"); | " :type texture: :class:`gpu.types.GPUTexture`\n"); | ||||
| static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args) | static PyObject *pygpu_shader_uniform_sampler(BPyGPUShader *self, PyObject *args) | ||||
| { | { | ||||
| const char *name; | const char *name; | ||||
| BPyGPUTexture *py_texture; | BPyGPUTexture *py_texture; | ||||
| if (!PyArg_ParseTuple( | if (!PyArg_ParseTuple( | ||||
| args, "sO!:GPUShader.uniform_sampler", &name, &BPyGPUTexture_Type, &py_texture)) { | args, "sO!:GPUShader.uniform_sampler", &name, &BPyGPUTexture_Type, &py_texture)) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| int slot = GPU_shader_get_texture_binding(self->shader, name); | int slot = GPU_shader_get_texture_binding(self->shader, name); | ||||
| GPU_texture_bind(py_texture->tex, slot); | GPU_texture_bind(py_texture->tex, slot); | ||||
| GPU_shader_uniform_1i(self->shader, name, slot); | GPU_shader_uniform_1i(self->shader, name, slot); | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR( | PyDoc_STRVAR( | ||||
| pygpu_shader_uniform_block_doc, | pygpu_shader_uniform_block_doc, | ||||
| ".. method:: uniform_block(name, ubo)\n" | ".. method:: uniform_block(name, ubo)\n" | ||||
| "\n" | "\n" | ||||
| " Specify the value of an uniform buffer object variable for the current GPUShader.\n" | " Specify the value of an uniform buffer object variable for the current GPUShader.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: name of the uniform variable whose UBO is to be specified.\n" | " :arg name: name of the uniform variable whose UBO is to be specified.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :param ubo: Uniform Buffer to attach.\n" | " :arg ubo: Uniform Buffer to attach.\n" | ||||
| " :type texture: :class:`gpu.types.GPUUniformBuf`\n"); | " :type texture: :class:`gpu.types.GPUUniformBuf`\n"); | ||||
| static PyObject *pygpu_shader_uniform_block(BPyGPUShader *self, PyObject *args) | static PyObject *pygpu_shader_uniform_block(BPyGPUShader *self, PyObject *args) | ||||
| { | { | ||||
| const char *name; | const char *name; | ||||
| BPyGPUUniformBuf *py_ubo; | BPyGPUUniformBuf *py_ubo; | ||||
| if (!PyArg_ParseTuple( | if (!PyArg_ParseTuple( | ||||
| args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo)) { | args, "sO!:GPUShader.uniform_block", &name, &BPyGPUUniformBuf_Type, &py_ubo)) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| int binding = GPU_shader_get_uniform_block_binding(self->shader, name); | int binding = GPU_shader_get_uniform_block_binding(self->shader, name); | ||||
| if (binding == -1) { | if (binding == -1) { | ||||
| PyErr_SetString( | PyErr_SetString( | ||||
| PyExc_BufferError, | PyExc_BufferError, | ||||
| "GPUShader.uniform_block: uniform block not found, make sure the name is correct"); | "GPUShader.uniform_block: uniform block not found, make sure the name is correct"); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| GPU_uniformbuf_bind(py_ubo->ubo, binding); | GPU_uniformbuf_bind(py_ubo->ubo, binding); | ||||
| Py_RETURN_NONE; | Py_RETURN_NONE; | ||||
| } | } | ||||
| PyDoc_STRVAR( | PyDoc_STRVAR(pygpu_shader_attr_from_name_doc, | ||||
| pygpu_shader_attr_from_name_doc, | |||||
| ".. method:: attr_from_name(name)\n" | ".. method:: attr_from_name(name)\n" | ||||
| "\n" | "\n" | ||||
| " Get attribute location by name.\n" | " Get attribute location by name.\n" | ||||
| "\n" | "\n" | ||||
| " :param name: The name of the attribute variable whose location is to be queried.\n" | " :arg name: The name of the attribute variable whose location is to be queried.\n" | ||||
| " :type name: str\n" | " :type name: str\n" | ||||
| " :return: The location of an attribute variable.\n" | " :return: The location of an attribute variable.\n" | ||||
| " :rtype: int\n"); | " :rtype: int\n"); | ||||
| static PyObject *pygpu_shader_attr_from_name(BPyGPUShader *self, PyObject *arg) | static PyObject *pygpu_shader_attr_from_name(BPyGPUShader *self, PyObject *arg) | ||||
| { | { | ||||
| const char *name = PyUnicode_AsUTF8(arg); | const char *name = PyUnicode_AsUTF8(arg); | ||||
| if (name == NULL) { | if (name == NULL) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| const int attr = GPU_shader_get_attribute(self->shader, name); | const int attr = GPU_shader_get_attribute(self->shader, name); | ||||
| ▲ Show 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | PyDoc_STRVAR( | ||||
| " The following extensions are enabled by default if supported by the GPU:\n" | " The following extensions are enabled by default if supported by the GPU:\n" | ||||
| " ``GL_ARB_texture_gather``, ``GL_ARB_texture_cube_map_array``\n" | " ``GL_ARB_texture_gather``, ``GL_ARB_texture_cube_map_array``\n" | ||||
| " and ``GL_ARB_shader_draw_parameters``.\n" | " and ``GL_ARB_shader_draw_parameters``.\n" | ||||
| "\n" | "\n" | ||||
| " For drawing user interface elements and gizmos, use\n" | " For drawing user interface elements and gizmos, use\n" | ||||
| " ``fragOutput = blender_srgb_to_framebuffer_space(fragOutput)``\n" | " ``fragOutput = blender_srgb_to_framebuffer_space(fragOutput)``\n" | ||||
| " to transform the output sRGB colors to the frame-buffer color-space.\n" | " to transform the output sRGB colors to the frame-buffer color-space.\n" | ||||
| "\n" | "\n" | ||||
| " :param vertexcode: Vertex shader code.\n" | " :arg vertexcode: Vertex shader code.\n" | ||||
| " :type vertexcode: str\n" | " :type vertexcode: str\n" | ||||
| " :param fragcode: Fragment shader code.\n" | " :arg fragcode: Fragment shader code.\n" | ||||
| " :type value: str\n" | " :type value: str\n" | ||||
| " :param geocode: Geometry shader code.\n" | " :arg geocode: Geometry shader code.\n" | ||||
| " :type value: str\n" | " :type value: str\n" | ||||
| " :param libcode: Code with functions and presets to be shared between shaders.\n" | " :arg libcode: Code with functions and presets to be shared between shaders.\n" | ||||
| " :type value: str\n" | " :type value: str\n" | ||||
| " :param defines: Preprocessor directives.\n" | " :arg defines: Preprocessor directives.\n" | ||||
| " :type value: str\n" | " :type value: str\n" | ||||
| " :param name: Name of shader code, for debugging purposes.\n" | " :arg name: Name of shader code, for debugging purposes.\n" | ||||
| " :type value: str\n"); | " :type value: str\n"); | ||||
| PyTypeObject BPyGPUShader_Type = { | PyTypeObject BPyGPUShader_Type = { | ||||
| PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUShader", | PyVarObject_HEAD_INIT(NULL, 0).tp_name = "GPUShader", | ||||
| .tp_basicsize = sizeof(BPyGPUShader), | .tp_basicsize = sizeof(BPyGPUShader), | ||||
| .tp_dealloc = (destructor)pygpu_shader__tp_dealloc, | .tp_dealloc = (destructor)pygpu_shader__tp_dealloc, | ||||
| .tp_flags = Py_TPFLAGS_DEFAULT, | .tp_flags = Py_TPFLAGS_DEFAULT, | ||||
| .tp_doc = pygpu_shader__tp_doc, | .tp_doc = pygpu_shader__tp_doc, | ||||
| .tp_methods = pygpu_shader__tp_methods, | .tp_methods = pygpu_shader__tp_methods, | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | PyDoc_STRVAR( | ||||
| " Shaders that are embedded in the blender internal code (see :ref:`built-in-shaders`).\n" | " Shaders that are embedded in the blender internal code (see :ref:`built-in-shaders`).\n" | ||||
| " They all read the uniform ``mat4 ModelViewProjectionMatrix``,\n" | " They all read the uniform ``mat4 ModelViewProjectionMatrix``,\n" | ||||
| " which can be edited by the :mod:`gpu.matrix` module.\n" | " which can be edited by the :mod:`gpu.matrix` module.\n" | ||||
| "\n" | "\n" | ||||
| " You can also choose a shader configuration that uses clip_planes by setting the " | " You can also choose a shader configuration that uses clip_planes by setting the " | ||||
| "``CLIPPED`` value to the config parameter. Note that in this case you also need to " | "``CLIPPED`` value to the config parameter. Note that in this case you also need to " | ||||
| "manually set the value of ``mat4 ModelMatrix``.\n" | "manually set the value of ``mat4 ModelMatrix``.\n" | ||||
| "\n" | "\n" | ||||
| " :param shader_name: One of the builtin shader names.\n" | " :arg shader_name: One of the builtin shader names.\n" | ||||
| " :type shader_name: str\n" | " :type shader_name: str\n" | ||||
| " :param config: One of these types of shader configuration:\n" | " :arg config: One of these types of shader configuration:\n" | ||||
| "\n" | "\n" | ||||
| " - ``DEFAULT``\n" | " - ``DEFAULT``\n" | ||||
| " - ``CLIPPED``\n" | " - ``CLIPPED``\n" | ||||
| " :type config: str\n" | " :type config: str\n" | ||||
| " :return: Shader object corresponding to the given name.\n" | " :return: Shader object corresponding to the given name.\n" | ||||
| " :rtype: :class:`bpy.types.GPUShader`\n"); | " :rtype: :class:`bpy.types.GPUShader`\n"); | ||||
| static PyObject *pygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *args, PyObject *kwds) | static PyObject *pygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *args, PyObject *kwds) | ||||
| { | { | ||||
| Show All 27 Lines | static PyObject *pygpu_shader_from_builtin(PyObject *UNUSED(self), PyObject *args, PyObject *kwds) | ||||
| return BPyGPUShader_CreatePyObject(shader, true); | return BPyGPUShader_CreatePyObject(shader, true); | ||||
| } | } | ||||
| PyDoc_STRVAR(pygpu_shader_create_from_info_doc, | PyDoc_STRVAR(pygpu_shader_create_from_info_doc, | ||||
| ".. function:: create_from_info(shader_info)\n" | ".. function:: create_from_info(shader_info)\n" | ||||
| "\n" | "\n" | ||||
| " Create shader from a GPUShaderCreateInfo.\n" | " Create shader from a GPUShaderCreateInfo.\n" | ||||
| "\n" | "\n" | ||||
| " :param shader_info: GPUShaderCreateInfo\n" | " :arg shader_info: GPUShaderCreateInfo\n" | ||||
| " :type shader_info: :class:`bpy.types.GPUShaderCreateInfo`\n" | " :type shader_info: :class:`bpy.types.GPUShaderCreateInfo`\n" | ||||
| " :return: Shader object corresponding to the given name.\n" | " :return: Shader object corresponding to the given name.\n" | ||||
| " :rtype: :class:`bpy.types.GPUShader`\n"); | " :rtype: :class:`bpy.types.GPUShader`\n"); | ||||
| static PyObject *pygpu_shader_create_from_info(BPyGPUShader *UNUSED(self), | static PyObject *pygpu_shader_create_from_info(BPyGPUShader *UNUSED(self), | ||||
| BPyGPUShaderCreateInfo *o) | BPyGPUShaderCreateInfo *o) | ||||
| { | { | ||||
| if (!BPyGPUShaderCreateInfo_Check(o)) { | if (!BPyGPUShaderCreateInfo_Check(o)) { | ||||
| PyErr_Format(PyExc_TypeError, "Expected a GPUShaderCreateInfo, got %s", Py_TYPE(o)->tp_name); | PyErr_Format(PyExc_TypeError, "Expected a GPUShaderCreateInfo, got %s", Py_TYPE(o)->tp_name); | ||||
| ▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines | |||||