Files
test2/source/blender/python/gpu/gpu_py_texture.hh
Jeroen Bakker 11ab2de07a Python/GPU: Deprecate DEPTH24 formats
GPU_DEPTH24_STENCIL8 and GPU_DEPTH_COMPONENT24 are deprecated in Blender
5.0. Internally they will be removed. When used via python they are
automatically converted to their DEPTH32F variant and a deprecation
warning will be displayed.

Pull Request: https://projects.blender.org/blender/blender/pulls/140644
2025-06-19 13:31:40 +02:00

38 lines
901 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup bpygpu
*/
#pragma once
#include <Python.h>
#include "BLI_compiler_attrs.h"
struct GPUTexture;
extern PyTypeObject BPyGPUTexture_Type;
/**
* GPU_DEPTH24_STENCIL8 and GPU_DEPTH_COMPONENT24 are deprecated in Blender 5.0. These formats are
* automatically converted to their 32F variant.
*/
constexpr int GPU_DEPTH24_STENCIL8_DEPRECATED = -1;
constexpr int GPU_DEPTH_COMPONENT24_DEPRECATED = -2;
extern const struct PyC_StringEnumItems pygpu_textureformat_items[];
#define BPyGPUTexture_Check(v) (Py_TYPE(v) == &BPyGPUTexture_Type)
struct BPyGPUTexture {
PyObject_HEAD
GPUTexture *tex;
};
int bpygpu_ParseTexture(PyObject *o, void *p);
PyObject *bpygpu_texture_init();
PyObject *BPyGPUTexture_CreatePyObject(GPUTexture *tex, bool shared_reference) ATTR_NONNULL(1);