|
Blender V5.3
|
#include <Python.h>#include "BLI_utildefines.hh"#include "GPU_batch.hh"#include "GPU_state.hh"#include "../generic/py_capi_utils.hh"#include "../generic/python_compat.hh"#include "gpu_py.hh"#include "gpu_py_element.hh"#include "gpu_py_shader.hh"#include "gpu_py_vertex_buffer.hh"#include "gpu_py_batch.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Functions | |
Utility Functions | |
| static bool | blender::pygpu_batch_is_program_or_error (BPyGPUBatch *self) |
Public API | |
| PyObject * | blender::BPyGPUBatch_CreatePyObject (gpu::Batch *batch) |
GPUBatch Type | |
| static PyMethodDef | blender::pygpu_batch__tp_methods [] |
| PyTypeObject | blender::BPyGPUBatch_Type |
| static PyObject * | blender::pygpu_batch__tp_new (PyTypeObject *, PyObject *args, PyObject *kwds) |
| blender::PyDoc_STRVAR (pygpu_batch_vertbuf_add_doc, ".. method:: vertbuf_add(buf)\n" "\n" " Add another vertex buffer to the Batch.\n" " It is not possible to add more vertices to the batch using this method.\n" " Instead it can be used to add more attributes to the existing vertices.\n" " A good use case would be when you have a separate\n" " vertex buffer for vertex positions and vertex normals.\n" " Current a batch can have at most " STRINGIFY(GPU_BATCH_VBO_MAX_LEN) " vertex buffers.\n" "\n" " :param buf: The vertex buffer that will be added to the batch.\n" " :type buf: :class:`gpu.types.GPUVertBuf`\n") | |
| static PyObject * | blender::pygpu_batch_vertbuf_add (BPyGPUBatch *self, BPyGPUVertBuf *py_buf) |
| static void | blender::pygpu_batch_shader_set_reference_only (BPyGPUBatch *self, BPyGPUShader *py_shader) |
| static void | blender::pygpu_batch_shader_set (BPyGPUBatch *self, BPyGPUShader *py_shader) |
| blender::PyDoc_STRVAR (pygpu_batch_program_set_doc, ".. method:: program_set(program)\n" "\n" " Assign a shader to this batch that will be used for drawing when not overwritten later.\n" " Note: This method has to be called in the draw context that the batch will be drawn in.\n" " This function does not need to be called when you always\n" " set the shader when calling :meth:`gpu.types.GPUBatch.draw`.\n" "\n" " :param program: The program/shader the batch will use in future draw calls.\n" " :type program: :class:`gpu.types.GPUShader`\n") | |
| static PyObject * | blender::pygpu_batch_program_set (BPyGPUBatch *self, BPyGPUShader *py_shader) |
| static const char * | blender::pygpu_shader_check_compatibility (gpu::Batch *batch) |
| blender::PyDoc_STRVAR (pygpu_batch_draw_doc, ".. method:: draw(shader=None)\n" "\n" " Run the drawing shader with the parameters assigned to the batch.\n" "\n" " :param shader: Shader that performs the drawing operations.\n" " If ``None`` is passed, the last shader set to this batch will run.\n" " :type shader: :class:`gpu.types.GPUShader` | None\n") | |
| static PyObject * | blender::pygpu_batch_draw (BPyGPUBatch *self, PyObject *args, PyObject *kw) |
| blender::PyDoc_STRVAR (pygpu_batch_draw_instanced_doc, ".. method:: draw_instanced(program, *, instance_start=0, instance_count=0)\n" "\n" " Draw multiple instances of the drawing program with the parameters assigned\n" " to the batch. In the vertex shader, ``gpu_InstanceIndex`` will contain the instance\n" " number being drawn including the ``instance_start``.\n" "\n" " :param program: Program that performs the drawing operations.\n" " :type program: :class:`gpu.types.GPUShader`\n" " :param instance_start: Number of the first instance to draw.\n" " :type instance_start: int\n" " :param instance_count: Number of instances to draw. When not provided or set to 0\n" " the number of instances will be determined by the number of rows in the first\n" " vertex buffer.\n" " :type instance_count: int\n") | |
| static PyObject * | blender::pygpu_batch_draw_instanced (BPyGPUBatch *self, PyObject *args, PyObject *kw) |
| blender::PyDoc_STRVAR (pygpu_batch_draw_range_doc, ".. method:: draw_range(program, *, elem_start=0, elem_count=0)\n" "\n" " Run the drawing program with the parameters assigned to the batch. " "Only draw the ``elem_count`` elements of the index buffer starting at ``elem_start``.\n" "\n" " :param program: Program that performs the drawing operations.\n" " :type program: :class:`gpu.types.GPUShader`\n" " :param elem_start: First index to draw. When not provided or set to 0 drawing\n" " will start from the first element of the index buffer.\n" " :type elem_start: int\n" " :param elem_count: Number of elements of the index buffer to draw. When not\n" " provided or set to 0 all elements from ``elem_start`` to the end of the\n" " index buffer will be drawn.\n" " :type elem_count: int\n") | |
| static PyObject * | blender::pygpu_batch_draw_range (BPyGPUBatch *self, PyObject *args, PyObject *kw) |
| static PyObject * | blender::pygpu_batch_program_use_begin (BPyGPUBatch *self) |
| static PyObject * | blender::pygpu_batch_program_use_end (BPyGPUBatch *self) |
| static int | blender::pygpu_batch__tp_traverse (BPyGPUBatch *self, visitproc visit, void *arg) |
| static int | blender::pygpu_batch__tp_clear (BPyGPUBatch *self) |
| static int | blender::pygpu_batch__tp_is_gc (BPyGPUBatch *self) |
| static void | blender::pygpu_batch__tp_dealloc (BPyGPUBatch *self) |
| blender::PyDoc_STRVAR (pygpu_batch__tp_doc, ".. class:: GPUBatch\n" "\n" " Reusable container for drawable geometry.\n" "\n" " .. method:: __init__(type, buf, elem=None)\n" "\n" " :param type: The primitive type of geometry to be drawn.\n" " :type type: " PYDOC_PRIMTYPE_LITERAL "\n" " :param buf: Vertex buffer containing all or some of the attributes required for " "drawing.\n" " :type buf: :class:`gpu.types.GPUVertBuf`\n" " :param elem: An optional index buffer.\n" " :type elem: :class:`gpu.types.GPUIndexBuf` | None\n") | |
This file defines the off-screen functionalities of the 'gpu' module used for off-screen OpenGL rendering.
Definition in file gpu_py_batch.cc.