|
Blender V5.0
|
#include <Python.h>#include "../generic/py_capi_utils.hh"#include "../generic/python_compat.hh"#include "gpu_py.hh"#include "gpu_py_vertex_format.hh"Go to the source code of this file.
Functions | |
Public API | |
| PyObject * | BPyGPUVertFormat_CreatePyObject (GPUVertFormat *fmt) |
Variables | |
Enum Conversion | |
Use with PyArg_ParseTuple's "O&" formatting. | |
| static PyC_StringEnumItems | pygpu_vertcomptype_items [] |
| static PyC_StringEnumItems | pygpu_vertfetchmode_items [] |
VertFormat Type | |
| static PyMethodDef | pygpu_vertformat__tp_methods [] |
| PyTypeObject | BPyGPUVertFormat_Type |
| static PyObject * | pygpu_vertformat__tp_new (PyTypeObject *, PyObject *args, PyObject *kwds) |
| static uint | attr_size (GPUVertCompType type, int len) |
| PyDoc_STRVAR (pygpu_vertformat_attr_add_doc, ".. method:: attr_add(id, comp_type, len, fetch_mode)\n" "\n" " Add a new attribute to the format.\n" "\n" " :arg id: Name the attribute. Often ``position``, ``normal``, ...\n" " :type id: str\n" " :arg comp_type: The data type that will be used store the value in memory.\n" " Possible values are ``I8``, ``U8``, ``I16``, ``U16``, ``I32``, ``U32``, ``F32`` & " "``I10``.\n" " :type comp_type: str\n" " :arg len: How many individual values the attribute consists of\n" " (e.g. 2 for uv coordinates).\n" " :type len: int\n" " :arg fetch_mode: How values from memory will be converted when used in the shader.\n" " This is mainly useful for memory optimizations when you want to store values with\n" " reduced precision. E.g. you can store a float in only 1 byte but it will be\n" " converted to a normal 4 byte float when used.\n" " Possible values are ``FLOAT``, ``INT`` or ``INT_TO_FLOAT_UNIT``.\n" " :type fetch_mode: str\n") | |
| static PyObject * | pygpu_vertformat_attr_add (BPyGPUVertFormat *self, PyObject *args, PyObject *kwds) |
| static void | pygpu_vertformat__tp_dealloc (BPyGPUVertFormat *self) |
| PyDoc_STRVAR (pygpu_vertformat__tp_doc, ".. class:: GPUVertFormat()\n" "\n" " This object contains information about the structure of a vertex buffer.\n") | |
Definition in file gpu_py_vertex_format.cc.
|
static |
Definition at line 62 of file gpu_py_vertex_format.cc.
References BLI_assert, GPU_COMP_F32, GPU_COMP_I10, and len.
Referenced by AttributeTableEntry< T >::add(), blender::ed::greasepencil::image_render::draw_dot(), blender::ed::greasepencil::image_render::draw_dots(), pygpu_vertformat_attr_add(), and AttributeTableEntry< T >::reserve().
|
nodiscard |
Definition at line 250 of file gpu_py_vertex_format.cc.
References BPyGPUVertFormat_Type, and self.
Referenced by pygpu_shader_format_calc(), and pygpu_vertformat__tp_new().
| PyDoc_STRVAR | ( | pygpu_vertformat__tp_doc | , |
| ".. class:: GPUVertFormat()\n" "\n" " This object contains information about the structure of a vertex buffer.\n" | ) |
| PyDoc_STRVAR | ( | pygpu_vertformat_attr_add_doc | , |
| ".. method:: attr_add(id, comp_type, len, fetch_mode)\n" "\n" " Add a new attribute to the format.\n" "\n" " :arg id: Name the attribute. Often ``position`` | , | ||
| ``normal`` | , | ||
| ...\n" " :type id:str\n" " :arg comp_type:The data type that will be used store the value in memory.\n" " Possible values are ``I8`` | , | ||
| ``U8`` | , | ||
| ``I16`` | , | ||
| ``U16`` | , | ||
| ``I32`` | , | ||
| ``U32`` | , | ||
| ``F32`` &" "``I10``.\n" " :type comp_type:str\n" " :arg len:How many individual values the attribute consists of\n" "(e.g. 2 for uv coordinates).\n" " :type len:int\n" " :arg fetch_mode:How values from memory will be converted when used in the shader.\n" " This is mainly useful for memory optimizations when you want to store values with\n" " reduced precision. E.g. you can store a float in only 1 byte but it will be\n" " converted to a normal 4 byte float when used.\n" " Possible values are ``FLOAT`` | , | ||
| ``INT`` or ``INT_TO_FLOAT_UNIT``.\n" " :type fetch_mode:str\n" | ) |
|
static |
Definition at line 181 of file gpu_py_vertex_format.cc.
References self.
|
static |
Definition at line 51 of file gpu_py_vertex_format.cc.
References BPYGPU_IS_INIT_OR_ERROR_OBJ, and BPyGPUVertFormat_CreatePyObject().
|
static |
Definition at line 94 of file gpu_py_vertex_format.cc.
References attr_id, attr_size(), GPU_COMP_I8, GPU_FETCH_FLOAT, GPU_VERT_ATTR_MAX_LEN, GPU_vertformat_attr_add_legacy(), len, PY_ARG_PARSER_HEAD_COMPAT, PyC_ParseStringEnum(), pygpu_vertcomptype_items, pygpu_vertfetchmode_items, self, STRINGIFY, and PyC_StringEnum::value_found.
| PyTypeObject BPyGPUVertFormat_Type |
Definition at line 192 of file gpu_py_vertex_format.cc.
Referenced by bpygpu_types_init(), BPyGPUVertFormat_CreatePyObject(), and pygpu_vertbuf__tp_new().
|
static |
Definition at line 26 of file gpu_py_vertex_format.cc.
Referenced by pygpu_vertformat_attr_add().
|
static |
Definition at line 38 of file gpu_py_vertex_format.cc.
Referenced by pygpu_vertformat_attr_add().
|
static |
Definition at line 165 of file gpu_py_vertex_format.cc.