Blender  V3.3
Classes | Macros | Typedefs | Functions | Variables
gpu_py_buffer.h File Reference

Go to the source code of this file.

Classes

struct  BPyGPUBuffer
 

Macros

#define BPyGPU_Buffer_Check(v)   (Py_TYPE(v) == &BPyGPU_BufferType)
 

Typedefs

typedef struct BPyGPUBuffer BPyGPUBuffer
 

Functions

size_t bpygpu_Buffer_size (BPyGPUBuffer *buffer)
 
BPyGPUBufferBPyGPU_Buffer_CreatePyObject (int format, const Py_ssize_t *shape, int shape_len, void *buffer)
 

Variables

PyTypeObject BPyGPU_BufferType
 

Macro Definition Documentation

◆ BPyGPU_Buffer_Check

#define BPyGPU_Buffer_Check (   v)    (Py_TYPE(v) == &BPyGPU_BufferType)

Definition at line 11 of file gpu_py_buffer.h.

Typedef Documentation

◆ BPyGPUBuffer

typedef struct BPyGPUBuffer BPyGPUBuffer

Buffer Object

For Python access to GPU functions requiring a pointer.

Function Documentation

◆ BPyGPU_Buffer_CreatePyObject()

BPyGPUBuffer* BPyGPU_Buffer_CreatePyObject ( int  format,
const Py_ssize_t *  shape,
int  shape_len,
void buffer 
)

Create a buffer object

Parameters
shapeAn array of shape_len integers representing the size of each dimension.
bufferWhen not NULL holds a contiguous buffer with the correct format from which the buffer will be initialized

Definition at line 694 of file gpu_py_buffer.c.

References buffer, MEM_callocN, NULL, pygpu_buffer_calc_size(), pygpu_buffer_make_from_data(), and size().

Referenced by pygpu_buffer__tp_new(), pygpu_framebuffer_read_color(), pygpu_framebuffer_read_depth(), and pygpu_texture_read().

◆ bpygpu_Buffer_size()

size_t bpygpu_Buffer_size ( BPyGPUBuffer buffer)

Variable Documentation

◆ BPyGPU_BufferType

PyTypeObject BPyGPU_BufferType
extern