Blender V4.3
gpu_py_uniformbuffer.cc File Reference
#include <Python.h>
#include "BLI_string.h"
#include "GPU_context.hh"
#include "GPU_uniform_buffer.hh"
#include "../generic/python_compat.hh"
#include "gpu_py.hh"
#include "gpu_py_uniformbuffer.hh"

Go to the source code of this file.

Functions

Public API
PyObject * BPyGPUUniformBuf_CreatePyObject (GPUUniformBuf *ubo)
 

GPUUniformBuf Common Utilities

#define BPYGPU_UNIFORMBUF_CHECK_OBJ(bpygpu)
 
static int pygpu_uniformbuffer_valid_check (BPyGPUUniformBuf *bpygpu_ub)
 

GPUUniformBuf Type

static PyGetSetDef pygpu_uniformbuffer__tp_getseters []
 
static PyMethodDef pygpu_uniformbuffer__tp_methods []
 
PyTypeObject BPyGPUUniformBuf_Type
 
static PyObject * pygpu_uniformbuffer__tp_new (PyTypeObject *, PyObject *args, PyObject *kwds)
 
 PyDoc_STRVAR (pygpu_uniformbuffer_update_doc, ".. method:: update(data)\n" "\n" " Update the data of the uniform buffer object.\n")
 
static PyObject * pygpu_uniformbuffer_update (BPyGPUUniformBuf *self, PyObject *obj)
 
static void BPyGPUUniformBuf__tp_dealloc (BPyGPUUniformBuf *self)
 
 PyDoc_STRVAR (pygpu_uniformbuffer__tp_doc, ".. class:: GPUUniformBuf(data)\n" "\n" " This object gives access to off uniform buffers.\n" "\n" " :arg data: Data to fill the buffer.\n" " :type data: object exposing buffer interface\n")
 

Detailed Description

This file defines the uniform buffer functionalities of the 'gpu' module

  • Use bpygpu_ for local API.
  • Use BPyGPU for public API.

Definition in file gpu_py_uniformbuffer.cc.

Macro Definition Documentation

◆ BPYGPU_UNIFORMBUF_CHECK_OBJ

#define BPYGPU_UNIFORMBUF_CHECK_OBJ ( bpygpu)
Value:
{ \
if (UNLIKELY(pygpu_uniformbuffer_valid_check(bpygpu) == -1)) { \
return nullptr; \
} \
} \
((void)0)
#define UNLIKELY(x)
static int pygpu_uniformbuffer_valid_check(BPyGPUUniformBuf *bpygpu_ub)

Definition at line 45 of file gpu_py_uniformbuffer.cc.

Referenced by pygpu_uniformbuffer_update().

Function Documentation

◆ BPyGPUUniformBuf__tp_dealloc()

static void BPyGPUUniformBuf__tp_dealloc ( BPyGPUUniformBuf * self)
static

Definition at line 147 of file gpu_py_uniformbuffer.cc.

References GPU_uniformbuf_free(), and self.

◆ BPyGPUUniformBuf_CreatePyObject()

PyObject * BPyGPUUniformBuf_CreatePyObject ( GPUUniformBuf * ubo)

Definition at line 234 of file gpu_py_uniformbuffer.cc.

References BPyGPUUniformBuf_Type, and self.

Referenced by pygpu_uniformbuffer__tp_new().

◆ PyDoc_STRVAR() [1/2]

PyDoc_STRVAR ( pygpu_uniformbuffer__tp_doc ,
".. class:: GPUUniformBuf(data)\n" "\n" " This object gives access to off uniform buffers.\n" "\n" " :arg data: Data to fill the buffer.\n" " :type data: object exposing buffer interface\n"  )

◆ PyDoc_STRVAR() [2/2]

PyDoc_STRVAR ( pygpu_uniformbuffer_update_doc ,
".. method:: update(data)\n" "\n" " Update the data of the uniform buffer object.\n"  )

◆ pygpu_uniformbuffer__tp_new()

static PyObject * pygpu_uniformbuffer__tp_new ( PyTypeObject * ,
PyObject * args,
PyObject * kwds )
static

◆ pygpu_uniformbuffer_update()

static PyObject * pygpu_uniformbuffer_update ( BPyGPUUniformBuf * self,
PyObject * obj )
static

◆ pygpu_uniformbuffer_valid_check()

static int pygpu_uniformbuffer_valid_check ( BPyGPUUniformBuf * bpygpu_ub)
static

Variable Documentation

◆ BPyGPUUniformBuf_Type

PyTypeObject BPyGPUUniformBuf_Type

◆ pygpu_uniformbuffer__tp_getseters

PyGetSetDef pygpu_uniformbuffer__tp_getseters[]
static
Initial value:
= {
{nullptr, nullptr, nullptr, nullptr, nullptr}
}

Definition at line 155 of file gpu_py_uniformbuffer.cc.

◆ pygpu_uniformbuffer__tp_methods

PyMethodDef pygpu_uniformbuffer__tp_methods[]
static
Initial value:
= {
{"update", (PyCFunction)pygpu_uniformbuffer_update, METH_O, pygpu_uniformbuffer_update_doc},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * pygpu_uniformbuffer_update(BPyGPUUniformBuf *self, PyObject *obj)

Definition at line 159 of file gpu_py_uniformbuffer.cc.