In most (cases functions returning a PyObject pointer requires it to be used by the caller, declare functions in the Python API with the `nodiscard` attribute.
25 lines
468 B
C++
25 lines
468 B
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup bpygpu
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Python.h>
|
|
|
|
#include "GPU_vertex_format.hh"
|
|
|
|
extern PyTypeObject BPyGPUVertFormat_Type;
|
|
|
|
#define BPyGPUVertFormat_Check(v) (Py_TYPE(v) == &BPyGPUVertFormat_Type)
|
|
|
|
struct BPyGPUVertFormat {
|
|
PyObject_VAR_HEAD
|
|
GPUVertFormat fmt;
|
|
};
|
|
|
|
[[nodiscard]] PyObject *BPyGPUVertFormat_CreatePyObject(GPUVertFormat *fmt);
|