39#define PYDOC_TEX_FORMAT_LITERAL \
71 "'R11F_G11F_B10F', " \
72 "'DEPTH32F_STENCIL8', " \
73 "'DEPTH24_STENCIL8', " \
82 "'DEPTH_COMPONENT32F', " \
83 "'DEPTH_COMPONENT24', " \
84 "'DEPTH_COMPONENT16']"
93 {int(gpu::TextureFormat::UINT_8_8_8_8),
"RGBA8UI"},
94 {int(gpu::TextureFormat::SINT_8_8_8_8),
"RGBA8I"},
95 {int(gpu::TextureFormat::UNORM_8_8_8_8),
"RGBA8"},
96 {int(gpu::TextureFormat::UINT_32_32_32_32),
"RGBA32UI"},
97 {int(gpu::TextureFormat::SINT_32_32_32_32),
"RGBA32I"},
98 {int(gpu::TextureFormat::SFLOAT_32_32_32_32),
"RGBA32F"},
99 {int(gpu::TextureFormat::UINT_16_16_16_16),
"RGBA16UI"},
100 {int(gpu::TextureFormat::SINT_16_16_16_16),
"RGBA16I"},
101 {int(gpu::TextureFormat::SFLOAT_16_16_16_16),
"RGBA16F"},
102 {int(gpu::TextureFormat::UNORM_16_16_16_16),
"RGBA16"},
103 {int(gpu::TextureFormat::UINT_8_8),
"RG8UI"},
104 {int(gpu::TextureFormat::SINT_8_8),
"RG8I"},
105 {int(gpu::TextureFormat::UNORM_8_8),
"RG8"},
106 {int(gpu::TextureFormat::UINT_32_32),
"RG32UI"},
107 {int(gpu::TextureFormat::SINT_32_32),
"RG32I"},
108 {int(gpu::TextureFormat::SFLOAT_32_32),
"RG32F"},
109 {int(gpu::TextureFormat::UINT_16_16),
"RG16UI"},
110 {int(gpu::TextureFormat::SINT_16_16),
"RG16I"},
111 {int(gpu::TextureFormat::SFLOAT_16_16),
"RG16F"},
112 {int(gpu::TextureFormat::UNORM_16_16),
"RG16"},
113 {int(gpu::TextureFormat::UINT_8),
"R8UI"},
114 {int(gpu::TextureFormat::SINT_8),
"R8I"},
115 {int(gpu::TextureFormat::UNORM_8),
"R8"},
116 {int(gpu::TextureFormat::UINT_32),
"R32UI"},
117 {int(gpu::TextureFormat::SINT_32),
"R32I"},
118 {int(gpu::TextureFormat::SFLOAT_32),
"R32F"},
119 {int(gpu::TextureFormat::UINT_16),
"R16UI"},
120 {int(gpu::TextureFormat::SINT_16),
"R16I"},
121 {int(gpu::TextureFormat::SFLOAT_16),
"R16F"},
122 {int(gpu::TextureFormat::UNORM_16),
"R16"},
123 {int(gpu::TextureFormat::UFLOAT_11_11_10),
"R11F_G11F_B10F"},
124 {int(gpu::TextureFormat::SFLOAT_32_DEPTH_UINT_8),
"DEPTH32F_STENCIL8"},
126 {int(gpu::TextureFormat::SRGBA_8_8_8_8),
"SRGB8_A8"},
127 {int(gpu::TextureFormat::SFLOAT_16_16_16),
"RGB16F"},
128 {int(gpu::TextureFormat::SRGB_DXT1),
"SRGB8_A8_DXT1"},
129 {int(gpu::TextureFormat::SRGB_DXT3),
"SRGB8_A8_DXT3"},
130 {int(gpu::TextureFormat::SRGB_DXT5),
"SRGB8_A8_DXT5"},
131 {int(gpu::TextureFormat::SNORM_DXT1),
"RGBA8_DXT1"},
132 {int(gpu::TextureFormat::SNORM_DXT3),
"RGBA8_DXT3"},
133 {int(gpu::TextureFormat::SNORM_DXT5),
"RGBA8_DXT5"},
134 {int(gpu::TextureFormat::SFLOAT_32_DEPTH),
"DEPTH_COMPONENT32F"},
136 {int(gpu::TextureFormat::UNORM_16_DEPTH),
"DEPTH_COMPONENT16"},
150 if (bpygpu_tex->
tex ==
nullptr) [[unlikely]] {
151 PyErr_SetString(PyExc_ReferenceError,
153 "GPU texture was freed, no further access is valid"
155 "GPU texture: internal error"
164#define BPYGPU_TEXTURE_CHECK_OBJ(bpygpu) \
166 if (pygpu_texture_valid_check(bpygpu) == -1) [[unlikely]] { \
178#define BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC \
179 " :param extend_mode: the specified extent mode.\n" \
180 " :type extend_mode: Literal['EXTEND', 'REPEAT', 'MIRRORED_REPEAT', 'CLAMP_TO_BORDER']\n";
194 const bool is_cubemap,
196 const size_t err_out_size)
198 const bool is_3d = (
len == 3);
201 const int dims = is_cubemap ? 1 :
len;
203 for (
int i = 0; i < dims; i++) {
204 if (size[i] <= limit) {
210 "3D texture of size %dx%dx%d exceeds the GPU limit of %d per axis",
216 else if (is_cubemap) {
219 "Cubemap of face size %d exceeds the GPU limit of %d",
226 "2D texture of size %dx%d exceeds the GPU limit of %d",
234 "1D texture of size %d exceeds the GPU limit of %d",
248 int size[3] = {1, 1, 1};
250 int is_cubemap =
false;
252 int(gpu::TextureFormat::UNORM_8_8_8_8)};
258 "the driver could not create this texture; see the console for details" :
259 "the driver could not create this texture; run with --debug-gpu for details");
261 static const char *_keywords[] = {
"size",
"layers",
"is_cubemap",
"format",
"data",
nullptr};
262 static _PyArg_Parser _parser = {
269 ":GPUTexture.__new__",
273 if (!_PyArg_ParseTupleAndKeywordsFast(args,
280 &pygpu_textureformat,
288 pygpu_textureformat.
value_found = int(gpu::TextureFormat::SFLOAT_32_DEPTH_UINT_8);
290 PyExc_DeprecationWarning,
"'DEPTH24_STENCIL8' is deprecated. Use 'DEPTH32F_STENCIL8'.", 1);
293 pygpu_textureformat.
value_found = int(gpu::TextureFormat::SFLOAT_32_DEPTH);
294 PyErr_WarnEx(PyExc_DeprecationWarning,
295 "'DEPTH_COMPONENT24' is deprecated. Use 'DEPTH_COMPONENT32F'.",
300 if (PySequence_Check(py_size)) {
301 len = PySequence_Size(py_size);
302 if ((
len < 1) || (
len > 3)) {
303 PyErr_Format(PyExc_ValueError,
304 "GPUTexture.__new__: \"size\" must be between 1 and 3 in length (got %d)",
308 if (
PyC_AsArray(size,
sizeof(*size), py_size,
len, &PyLong_Type,
"GPUTexture.__new__") == -1) {
312 else if (PyLong_Check(py_size)) {
313 size[0] = PyLong_AsLong(py_size);
316 PyErr_SetString(PyExc_ValueError,
"GPUTexture.__new__: Expected an int or tuple as first arg");
320 void *
data =
nullptr;
323 PyErr_SetString(PyExc_ValueError,
324 "GPUTexture.__new__: Only Buffer of format `FLOAT` is currently supported");
330 int component_size_expected =
sizeof(
float);
331 size_t data_space_expected = size_t(size[0]) * size[1] * size[2] *
max_ii(1, layers) *
332 component_len * component_size_expected;
334 data_space_expected *= 6 * size[0];
338 PyErr_SetString(PyExc_ValueError,
"GPUTexture.__new__: Buffer size smaller than requested");
341 data = pybuffer_obj->
buf.as_void;
345 if (is_cubemap &&
len != 1) {
346 STRNCPY_UTF8(err_out,
"Cubemaps use a single dimension, not a tuple");
348 else if (size[0] < 1 || size[1] < 1 || size[2] < 1) {
349 STRNCPY_UTF8(err_out,
"Texture dimensions must be at least 1");
351 else if (layers &&
len == 3) {
352 STRNCPY_UTF8(err_out,
"3D textures do not support layers");
361 const char *name =
"python_texture";
371 static_cast<const float *
>(
data));
379 static_cast<const float *
>(
data));
391 static_cast<const float *
>(
data));
400 static_cast<const float *
>(
data));
420 static_cast<const float *
>(
data));
428 static_cast<const float *
>(
data));
432 if (tex ==
nullptr) {
433 PyErr_Format(PyExc_RuntimeError,
"gpu.texture.new(...) failed with '%s'", err_out);
442 pygpu_texture_width_doc,
443 "Width of the texture.\n"
454 pygpu_texture_height_doc,
455 "Height of the texture.\n"
466 pygpu_texture_format_doc,
467 "Format of the texture.\n"
474 return PyUnicode_FromString(
480 pygpu_texture_extend_mode_x_doc,
481 ".. method:: extend_mode_x(extend_mode='EXTEND', /)\n"
483 " Set texture sampling method for coordinates outside of the [0..1] uv range along the x "
501 pygpu_texture_extend_mode_y_doc,
502 ".. method:: extend_mode_y(extend_mode='EXTEND', /)\n"
504 " Set texture sampling method for coordinates outside of the [0..1] uv range along the y "
522 pygpu_texture_extend_mode_doc,
523 ".. method:: extend_mode(extend_mode='EXTEND', /)\n"
525 " Set texture sampling method for coordinates outside of the [0..1] uv range along\n"
526 " both the x and y axis.\n"
543 pygpu_texture_filter_mode_doc,
544 ".. method:: filter_mode(use_filter)\n"
546 " Set texture filter usage.\n"
548 " :param use_filter: If set to true, the texture will use linear interpolation between "
549 "neighboring texels.\n"
550 " :type use_filter: bool\n");
566 pygpu_texture_mipmap_mode_doc,
567 ".. method:: mipmap_mode(use_mipmap=True, use_filter=True)\n"
569 " Set texture filter and mip-map usage.\n"
571 " :param use_mipmap: If set to true, the texture will use mip-mapping as anti-aliasing "
573 " :type use_mipmap: bool\n"
574 " :param use_filter: If set to true, the texture will use linear interpolation between "
575 "neighboring texels.\n"
576 " :type use_filter: bool\n");
581 bool use_mipmap =
true;
582 bool use_filter =
true;
583 static const char *_keywords[] = {
"use_mipmap",
"use_filter"};
584 static _PyArg_Parser _parser = {
593 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwds, &_parser, &use_mipmap, &use_filter)) {
603 pygpu_texture_anisotropic_filter_doc,
604 ".. method:: anisotropic_filter(use_anisotropic)\n"
606 " Set anisotropic filter usage. This only has effect if mipmapping is enabled.\n"
608 " :param use_anisotropic: If set to true, the texture will use anisotropic filtering.\n"
609 " :type use_anisotropic: bool\n");
614 bool use_anisotropic;
625 pygpu_texture_clear_doc,
626 ".. method:: clear(format='FLOAT', value=(0.0, 0.0, 0.0, 1.0))\n"
628 " Fill texture with specific value.\n"
630 " :param format: The format that describes the content of a single item.\n"
631 " ``UINT_24_8`` is deprecated, use ``FLOAT`` instead.\n"
634 " :param value: Sequence each representing the value to fill. Sizes 1..4 are supported.\n"
635 " :type value: Sequence[float] | Sequence[int]\n");
648 static const char *_keywords[] = {
"format",
"value",
nullptr};
649 static _PyArg_Parser _parser = {
657 if (!_PyArg_ParseTupleAndKeywordsFast(
663 PyErr_WarnEx(PyExc_DeprecationWarning,
"`UINT_24_8` is deprecated, use `FLOAT` instead", 1);
666 int shape = PySequence_Size(py_values);
672 PyErr_SetString(PyExc_AttributeError,
"too many dimensions, max is 4");
679 PyErr_SetString(PyExc_AttributeError,
680 "`UINT_24_8` and `10_11_11_REV` only support single values");
684 memset(&values, 0,
sizeof(values));
698 values.c[0] = values.i[0];
699 values.c[1] = values.i[1];
700 values.c[2] = values.i[2];
701 values.c[3] = values.i[3];
710 pygpu_texture_read_doc,
711 ".. method:: read()\n"
713 " Creates a buffer with the value of all pixels.\n"
715 " :return: The Buffer with the read pixels.\n"
716 " :rtype: :class:`gpu.types.Buffer`\n");
725 switch (tex_format) {
726 case gpu::TextureFormat::UNORM_16_DEPTH:
727 case gpu::TextureFormat::SFLOAT_32_DEPTH:
728 case gpu::TextureFormat::SFLOAT_32_DEPTH_UINT_8:
731 case gpu::TextureFormat::UINT_8:
732 case gpu::TextureFormat::UINT_16:
733 case gpu::TextureFormat::UINT_16_16:
734 case gpu::TextureFormat::UINT_32:
737 case gpu::TextureFormat::SINT_16_16:
738 case gpu::TextureFormat::SINT_16:
741 case gpu::TextureFormat::UNORM_8:
742 case gpu::TextureFormat::UNORM_8_8:
743 case gpu::TextureFormat::UNORM_8_8_8_8:
744 case gpu::TextureFormat::UINT_8_8_8_8:
745 case gpu::TextureFormat::SRGBA_8_8_8_8:
748 case gpu::TextureFormat::UFLOAT_11_11_10:
764 shape[3] = component_len;
765 shape_len = (component_len == 1) ? 3 : 4;
770 shape[2] = component_len;
771 shape_len = (component_len == 1) ? 2 : 3;
773 return reinterpret_cast<PyObject *
>(
777#ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD
780 pygpu_texture_free_doc,
781 ".. method:: free()\n"
783 " Free the texture object.\n"
784 " The texture object will no longer be accessible.\n");
785static PyObject *pygpu_texture_free(BPyGPUTexture *self)
798#ifndef GPU_NO_USE_PY_REFERENCES
803 Py_TYPE(self)->tp_free(
reinterpret_cast<PyObject *
>(self));
809 static_cast<setter
>(
nullptr),
810 pygpu_texture_width_doc,
814 static_cast<setter
>(
nullptr),
815 pygpu_texture_height_doc,
819 static_cast<setter
>(
nullptr),
820 pygpu_texture_format_doc,
822 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
827# pragma clang diagnostic push
828# pragma clang diagnostic ignored "-Wcast-function-type"
830# pragma GCC diagnostic push
831# pragma GCC diagnostic ignored "-Wcast-function-type"
838 METH_VARARGS | METH_KEYWORDS,
839 pygpu_texture_clear_doc},
843 pygpu_texture_read_doc},
844#ifdef BPYGPU_USE_GPUOBJ_FREE_METHOD
845 {
"free", (PyCFunction)pygpu_texture_free, METH_NOARGS, pygpu_texture_free_doc},
850 pygpu_texture_extend_mode_x_doc},
854 pygpu_texture_extend_mode_y_doc},
858 pygpu_texture_extend_mode_doc},
862 pygpu_texture_filter_mode_doc},
865 METH_VARARGS | METH_KEYWORDS,
866 pygpu_texture_mipmap_mode_doc},
867 {
"anisotropic_filter",
870 pygpu_texture_anisotropic_filter_doc},
871 {
nullptr,
nullptr, 0,
nullptr},
876# pragma clang diagnostic pop
878# pragma GCC diagnostic pop
884 pygpu_texture__tp_doc,
885 ".. class:: GPUTexture\n"
887 " This object gives access to GPU textures.\n"
889 " .. method:: __init__(size, *, layers=0, is_cubemap=False, format='RGBA8', data=None)\n"
891 " :param size: Dimensions of the texture 1D, 2D, 3D or cubemap.\n"
892 " :type size: int | Sequence[int]\n"
893 " :param layers: Number of layers in texture array or number of cubemaps in cubemap "
895 " :type layers: int\n"
896 " :param is_cubemap: Indicates the creation of a cubemap texture.\n"
897 " :type is_cubemap: bool\n"
898 " :param format: Internal data format inside GPU memory.\n"
899 " ``DEPTH24_STENCIL8`` is deprecated, use ``DEPTH32F_STENCIL8``.\n"
900 " ``DEPTH_COMPONENT24`` is deprecated, use ``DEPTH_COMPONENT32F``.\n"
903 " :param data: Buffer object to fill the texture.\n"
904 " :type data: :class:`gpu.types.Buffer` | None\n");
906 PyVarObject_HEAD_INIT(
nullptr, 0)
926 pygpu_texture__tp_doc,
965 pygpu_texture_from_image_doc,
966 ".. function:: from_image(image)\n"
968 " Get GPUTexture corresponding to an Image data-block. The GPUTexture "
970 "shared with Blender.\n"
971 " Note: Colors read from the texture will be in scene linear color space and have "
972 "premultiplied or straight alpha matching the image alpha mode.\n"
974 " :param image: The Image data-block.\n"
975 " :type image: :class:`bpy.types.Image`\n"
976 " :return: The GPUTexture used by the image.\n"
977 " :rtype: :class:`gpu.types.GPUTexture`\n");
981 if (ima ==
nullptr) {
1000 pygpu_texture_from_image_doc},
1001 {
nullptr,
nullptr, 0,
nullptr},
1006 pygpu_texture__m_doc,
1007 "This module provides utilities for textures.");
1011 pygpu_texture__m_doc,
1035 PyExc_ValueError,
"expected a texture or None object, got %s", Py_TYPE(o)->tp_name);
1049 PyObject *submodule;
1065 if (shared_reference) {
1066#ifndef GPU_NO_USE_PY_REFERENCES
1073 return reinterpret_cast<PyObject *
>(self);
1083#ifndef GPU_NO_USE_PY_REFERENCES
1088 return reinterpret_cast<PyObject *
>(self);
1093#undef BPYGPU_TEXTURE_CHECK_OBJ
#define STRNCPY_UTF8(dst, src)
PyDoc_STRVAR(FalseBP1D___doc__, "Class hierarchy: :class:`freestyle.types.BinaryPredicate1D` > :class:`FalseBP1D`\n" "\n" ".. method:: __call__(inter1, inter2)\n" "\n" " Always returns false.\n" "\n" " :param inter1: The first Interface1D object.\n" " :type inter1: :class:`freestyle.types.Interface1D`\n" " :param inter2: The second Interface1D object.\n" " :type inter2: :class:`freestyle.types.Interface1D`\n" " :return: False.\n" " :rtype: bool\n")
#define POINTER_OFFSET(v, ofs)
#define BPYGPU_IS_INIT_OR_ERROR_OBJ
#define PYDOC_DATAFORMAT_LITERAL
#define BPYGPU_USE_GPUOBJ_FREE_METHOD
#define PYDOC_TEX_FORMAT_LITERAL
#define BPYGPU_TEXTURE_EXTEND_MODE_ARG_DOC
#define BPYGPU_TEXTURE_CHECK_OBJ(bpygpu)
#define BPyGPUTexture_Check(v)
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
PyTypeObject BPyGPU_BufferType
PyC_StringEnumItems bpygpu_dataformat_items[]
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
gpu::Texture * GPU_texture_create_cube_array(const char *name, int width, int layer_len, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
gpu::Texture * GPU_texture_create_1d(const char *name, int width, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
int GPU_texture_depth(const gpu::Texture *texture)
static PyObject * pygpu_texture_extend_mode(BPyGPUTexture *self, PyObject *value)
gpu::TextureFormat GPU_texture_format(const gpu::Texture *texture)
int PyC_ParseBool(PyObject *o, void *p)
static PyObject * pygpu_texture_format_get(BPyGPUTexture *self, void *)
static PyObject * pygpu_texture_height_get(BPyGPUTexture *self, void *)
int bpygpu_ParseTexture(PyObject *o, void *p)
@ GPU_DATA_UINT_24_8_DEPRECATED
PyDoc_STRVAR(bpy_bm_new_doc, ".. function:: new(*, use_operators=True)\n" "\n" " :param use_operators: Support calling operators in :mod:`bmesh.ops` (uses some " "extra memory per vert/edge/face).\n" " :type use_operators: bool\n" " :return: Return a new, empty BMesh.\n" " :rtype: :class:`bmesh.types.BMesh`\n")
int PyC_AsArray(void *array, const size_t array_item_size, PyObject *value, const Py_ssize_t length, const PyTypeObject *type, const char *error_prefix)
@ GPU_SAMPLER_EXTEND_MODE_MIRRORED_REPEAT
@ GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER
@ GPU_SAMPLER_EXTEND_MODE_REPEAT
@ GPU_SAMPLER_EXTEND_MODE_EXTEND
static int pygpu_texture_valid_check(BPyGPUTexture *bpygpu_tex)
gpu::Texture * GPU_texture_create_2d_array(const char *name, int width, int height, int layer_len, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
constexpr int GPU_DEPTH24_STENCIL8_DEPRECATED
MINLINE int max_ii(int a, int b)
void GPU_texture_anisotropic_filter(gpu::Texture *texture, bool use_aniso)
int GPU_max_texture_size()
static PyObject * pygpu_texture_extend_mode_x(BPyGPUTexture *self, PyObject *value)
static PyObject * pygpu_texture_from_image(PyObject *, PyObject *arg)
static PyMethodDef pygpu_texture__tp_methods[]
void ** GPU_texture_py_reference_get(gpu::Texture *texture)
int GPU_texture_dimensions(const gpu::Texture *texture)
static bool pygpu_texture_size_check(const int size[3], const int len, const bool is_cubemap, char *err_out, const size_t err_out_size)
void GPU_texture_mipmap_mode(gpu::Texture *texture, bool use_mipmap, bool use_filter)
size_t bpygpu_Buffer_size(BPyGPUBuffer *buffer)
@ GPU_TEXTURE_USAGE_GENERAL
BMesh const char void * data
static PyObject * pygpu_texture_read(BPyGPUTexture *self)
void GPU_texture_filter_mode(gpu::Texture *texture, bool use_filter)
static PyMethodDef pygpu_texture__m_methods[]
gpu::Texture * GPU_texture_create_3d(const char *name, int width, int height, int depth, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const void *data)
int GPU_texture_width(const gpu::Texture *texture)
static PyObject * pygpu_texture_clear(BPyGPUTexture *self, PyObject *args, PyObject *kwds)
static PyObject * pygpu_texture__tp_new(PyTypeObject *, PyObject *args, PyObject *kwds)
size_t GPU_texture_component_len(gpu::TextureFormat format)
PyObject * bpygpu_texture_init()
const char * PyC_StringEnum_FindIDFromValue(const PyC_StringEnumItems *items, const int value)
void GPU_texture_extend_mode_x(gpu::Texture *texture, GPUSamplerExtendMode extend_mode)
void GPU_texture_extend_mode(gpu::Texture *texture, GPUSamplerExtendMode extend_mode)
static PyGetSetDef pygpu_texture__tp_getseters[]
gpu::Texture * GPU_texture_create_cube(const char *name, int width, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
const PyC_StringEnumItems pygpu_textureformat_items[]
void * PyC_RNA_AsPointer(PyObject *value, const char *type_name)
PyTypeObject BPyGPUTexture_Type
void GPU_texture_extend_mode_y(gpu::Texture *texture, GPUSamplerExtendMode extend_mode)
constexpr int GPU_DEPTH_COMPONENT24_DEPRECATED
BPyGPUBuffer * BPyGPU_Buffer_CreatePyObject(const int format, const Py_ssize_t *shape, const int shape_len, void *buffer)
void GPU_texture_clear(gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
int GPU_texture_height(const gpu::Texture *texture)
void GPU_texture_free(gpu::Texture *texture)
static PyObject * pygpu_texture_filter_mode(BPyGPUTexture *self, PyObject *value)
static PyModuleDef pygpu_texture_module_def
static PyObject * pygpu_texture_width_get(BPyGPUTexture *self, void *)
gpu::Texture * BKE_image_acquire_gpu_texture(Image *image, ImageUser *iuser)
void * GPU_texture_read(gpu::Texture *texture, eGPUDataFormat data_format, int mip_level)
static PyObject * pygpu_texture_extend_mode_y(BPyGPUTexture *self, PyObject *value)
int PyC_ParseStringEnum(PyObject *o, void *p)
int GPU_max_texture_3d_size()
void BKE_imageuser_default(ImageUser *iuser)
int PyC_ParseTypeOrNone(PyObject *o, void *p)
void GPU_texture_py_reference_set(gpu::Texture *texture, void **py_ref)
static PyObject * pygpu_texture_anisotropic_filter(BPyGPUTexture *self, PyObject *value)
static PyObject * pygpu_texture_mipmap_mode(BPyGPUTexture *self, PyObject *args, PyObject *kwds)
const PyC_StringEnumItems pygpu_textureextendmode_items[]
gpu::Texture * GPU_texture_create_2d(const char *name, int width, int height, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
GPUContext * GPU_context_active_get()
gpu::Texture * GPU_texture_create_1d_array(const char *name, int width, int layer_len, int mip_len, gpu::TextureFormat format, eGPUTextureUsage usage, const float *data)
PyObject * BPyGPUTexture_CreatePyObject(gpu::Texture *tex, bool shared_reference)
static void BPyGPUTexture__tp_dealloc(BPyGPUTexture *self)
void GPU_texture_ref(gpu::Texture *texture)
#define PyC_TYPE_OR_NONE_INIT(py_type, value_p)
header-only compatibility defines.
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
union blender::BPyGPUBuffer::@121160014351146313222050217274041240110051113162 buf
PyObject_HEAD gpu::Texture * tex