Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/gpu/gpu_py_vertex_format.c
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| PyDoc_STRVAR( | PyDoc_STRVAR( | ||||
| pygpu_vertformat_attr_add_doc, | pygpu_vertformat_attr_add_doc, | ||||
| ".. method:: attr_add(id, comp_type, len, fetch_mode)\n" | ".. method:: attr_add(id, comp_type, len, fetch_mode)\n" | ||||
| "\n" | "\n" | ||||
| " Add a new attribute to the format.\n" | " Add a new attribute to the format.\n" | ||||
| "\n" | "\n" | ||||
| " :param id: Name the attribute. Often `position`, `normal`, ...\n" | " :arg id: Name the attribute. Often `position`, `normal`, ...\n" | ||||
| " :type id: str\n" | " :type id: str\n" | ||||
| " :param comp_type: The data type that will be used store the value in memory.\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` and `I10`.\n" | " Possible values are `I8`, `U8`, `I16`, `U16`, `I32`, `U32`, `F32` and `I10`.\n" | ||||
| " :type comp_type: str\n" | " :type comp_type: str\n" | ||||
| " :param len: How many individual values the attribute consists of\n" | " :arg len: How many individual values the attribute consists of\n" | ||||
| " (e.g. 2 for uv coordinates).\n" | " (e.g. 2 for uv coordinates).\n" | ||||
| " :type len: int\n" | " :type len: int\n" | ||||
| " :param fetch_mode: How values from memory will be converted when used in the shader.\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" | " 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" | " 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" | " converted to a normal 4 byte float when used.\n" | ||||
| " Possible values are `FLOAT`, `INT`, `INT_TO_FLOAT_UNIT` and `INT_TO_FLOAT`.\n" | " Possible values are `FLOAT`, `INT`, `INT_TO_FLOAT_UNIT` and `INT_TO_FLOAT`.\n" | ||||
| " :type fetch_mode: str\n"); | " :type fetch_mode: str\n"); | ||||
| static PyObject *pygpu_vertformat_attr_add(BPyGPUVertFormat *self, PyObject *args, PyObject *kwds) | static PyObject *pygpu_vertformat_attr_add(BPyGPUVertFormat *self, PyObject *args, PyObject *kwds) | ||||
| { | { | ||||
| const char *id; | const char *id; | ||||
| ▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines | |||||