|
Blender V5.3
|
#include <Python.h>#include "GPU_framebuffer.hh"#include "GPU_state.hh"#include "../generic/py_capi_utils.hh"#include "../generic/python_utildefines.hh"#include "gpu_py.hh"#include "gpu_py_framebuffer.hh"#include "gpu_py_state.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Macros | |
| #define | PYDOC_BLEND_LITERAL |
| #define | PYDOC_DEPTHTEST_LITERAL "Literal['NONE', 'ALWAYS', 'LESS', 'LESS_EQUAL', 'EQUAL', 'GREATER', 'GREATER_EQUAL']" |
Functions | |
Manage Stack | |
| blender::PyDoc_STRVAR (pygpu_state_blend_set_doc, ".. function:: blend_set(mode)\n" "\n" " Defines the fixed pipeline blending equation.\n" "\n" " :param mode: The type of blend mode.\n" "\n" " * ``NONE`` No blending.\n" " * ``ALPHA`` The original color channels are interpolated according to the alpha " "value.\n" " * ``ALPHA_PREMULT`` The original color channels are interpolated according to the " "alpha value with the new colors pre-multiplied by this value.\n" " * ``ADDITIVE`` The original color channels are added by the corresponding ones.\n" " * ``ADDITIVE_PREMULT`` The original color channels are added by the corresponding ones " "that are pre-multiplied by the alpha value.\n" " * ``MULTIPLY`` The original color channels are multiplied by the corresponding ones.\n" " * ``SUBTRACT`` The original color channels are subtracted by the corresponding ones.\n" " * ``INVERT`` The original color channels are replaced by its complementary color.\n" " :type mode: " PYDOC_BLEND_LITERAL "\n") | |
| static PyObject * | blender::pygpu_state_blend_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_blend_get_doc, ".. function:: blend_get()\n" "\n" " Current blending equation.\n" "\n" " :return: The current blend mode.\n" " :rtype: str\n") | |
| static PyObject * | blender::pygpu_state_blend_get (PyObject *) |
| blender::PyDoc_STRVAR (pygpu_state_clip_distances_set_doc, ".. function:: clip_distances_set(distances_enabled)\n" "\n" " Sets the number of ``gl_ClipDistance`` planes used for clip geometry.\n" "\n" " :param distances_enabled: Number of clip distances enabled.\n" " :type distances_enabled: int\n") | |
| static PyObject * | blender::pygpu_state_clip_distances_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_depth_test_set_doc, ".. function:: depth_test_set(mode)\n" "\n" " Defines the depth_test equation.\n" "\n" " :param mode: The depth test equation name.\n" " :type mode: " PYDOC_DEPTHTEST_LITERAL "\n") | |
| static PyObject * | blender::pygpu_state_depth_test_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_depth_test_get_doc, ".. function:: depth_test_get()\n" "\n" " Current depth_test equation.\n" "\n" " :return: The current depth test mode.\n" " :rtype: str\n") | |
| static PyObject * | blender::pygpu_state_depth_test_get (PyObject *) |
| blender::PyDoc_STRVAR (pygpu_state_depth_mask_set_doc, ".. function:: depth_mask_set(value)\n" "\n" " Write to depth component.\n" "\n" " :param value: True for writing to the depth component.\n" " :type value: bool\n") | |
| static PyObject * | blender::pygpu_state_depth_mask_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_depth_mask_get_doc, ".. function:: depth_mask_get()\n" "\n" " Writing status in the depth component.\n" "\n" " :return: True if writing to the depth component is enabled.\n" " :rtype: bool\n") | |
| static PyObject * | blender::pygpu_state_depth_mask_get (PyObject *) |
| blender::PyDoc_STRVAR (pygpu_state_viewport_set_doc, ".. function:: viewport_set(x, y, xsize, ysize)\n" "\n" " Specifies the viewport of the active framebuffer.\n" " Note: The viewport state is not saved upon framebuffer rebind.\n" "\n" " :param x: Lower left corner x coordinate, in pixels.\n" " :type x: int\n" " :param y: Lower left corner y coordinate, in pixels.\n" " :type y: int\n" " :param xsize: Width of the viewport.\n" " :type xsize: int\n" " :param ysize: Height of the viewport.\n" " :type ysize: int\n") | |
| static PyObject * | blender::pygpu_state_viewport_set (PyObject *, PyObject *args) |
| blender::PyDoc_STRVAR (pygpu_state_viewport_get_doc, ".. function:: viewport_get()\n" "\n" " Viewport of the active framebuffer.\n" "\n" " :return: The viewport as a tuple (x, y, xsize, ysize).\n" " :rtype: tuple[int, int, int, int]\n") | |
| static PyObject * | blender::pygpu_state_viewport_get (PyObject *, PyObject *) |
| blender::PyDoc_STRVAR (pygpu_state_scissor_set_doc, ".. function:: scissor_set(x, y, xsize, ysize)\n" "\n" " Specifies the scissor area of the active framebuffer.\n" " Note: The scissor state is not saved upon framebuffer rebind.\n" "\n" " :param x: Lower left corner x coordinate, in pixels.\n" " :type x: int\n" " :param y: Lower left corner y coordinate, in pixels.\n" " :type y: int\n" " :param xsize: Width of the scissor rectangle.\n" " :type xsize: int\n" " :param ysize: Height of the scissor rectangle.\n" " :type ysize: int\n") | |
| static PyObject * | blender::pygpu_state_scissor_set (PyObject *, PyObject *args) |
| blender::PyDoc_STRVAR (pygpu_state_scissor_get_doc, ".. function:: scissor_get()\n" "\n" " Retrieve the scissors of the active framebuffer.\n" " Note: Only valid between 'scissor_set' and a framebuffer rebind.\n" "\n" " :return: The scissor of the active framebuffer as a tuple\n" " (x, y, xsize, ysize).\n" " x, y: lower left corner of the scissor rectangle, in pixels.\n" " xsize, ysize: width and height of the scissor rectangle.\n" " :rtype: tuple[int, int, int, int]\n") | |
| static PyObject * | blender::pygpu_state_scissor_get (PyObject *, PyObject *) |
| blender::PyDoc_STRVAR (pygpu_state_scissor_test_set_doc, ".. function:: scissor_test_set(enable)\n" "\n" " Enable/disable scissor testing on the active framebuffer.\n" "\n" " :param enable:\n" " True - enable scissor testing.\n" " False - disable scissor testing.\n" " :type enable: bool\n") | |
| static PyObject * | blender::pygpu_state_scissor_test_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_line_width_set_doc, ".. function:: line_width_set(width)\n" "\n" " Specify the width of rasterized lines.\n" "\n" " :param width: New width.\n" " :type width: float\n") | |
| static PyObject * | blender::pygpu_state_line_width_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_line_width_get_doc, ".. function:: line_width_get()\n" "\n" " Current width of rasterized lines.\n" "\n" " :return: The current line width.\n" " :rtype: float\n") | |
| static PyObject * | blender::pygpu_state_line_width_get (PyObject *) |
| blender::PyDoc_STRVAR (pygpu_state_point_size_set_doc, ".. function:: point_size_set(size)\n" "\n" " Specify the diameter of rasterized points.\n" "\n" " When ``program_point_size_set(False)`` is set, this sets the ``size``\n" " uniform of point shaders. Any value set by ``uniform_float(\"size\", ...)``\n" " on a point shader will be overwritten by this function. Use\n" " ``program_point_size_set(True)`` to disable this override and control\n" " point size via ``gl_PointSize`` in the vertex shader.\n" "\n" " :param size: New diameter.\n" " :type size: float\n") | |
| static PyObject * | blender::pygpu_state_point_size_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_color_mask_set_doc, ".. function:: color_mask_set(r, g, b, a)\n" "\n" " Enable or disable writing of frame buffer color components.\n" "\n" " :param r: Red component.\n" " :type r: bool\n" " :param g: Green component.\n" " :type g: bool\n" " :param b: Blue component.\n" " :type b: bool\n" " :param a: Alpha component.\n" " :type a: bool\n") | |
| static PyObject * | blender::pygpu_state_color_mask_set (PyObject *, PyObject *args) |
| blender::PyDoc_STRVAR (pygpu_state_face_culling_set_doc, ".. function:: face_culling_set(culling)\n" "\n" " Specify whether none, front-facing or back-facing facets can be culled.\n" "\n" " :param culling: The face culling mode.\n" " :type culling: Literal['NONE', 'FRONT', 'BACK']\n") | |
| static PyObject * | blender::pygpu_state_face_culling_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_front_facing_set_doc, ".. function:: front_facing_set(invert)\n" "\n" " Specifies the orientation of front-facing polygons.\n" "\n" " :param invert: True for clockwise polygons as front-facing.\n" " :type invert: bool\n") | |
| static PyObject * | blender::pygpu_state_front_facing_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_program_point_size_set_doc, ".. function:: program_point_size_set(enable)\n" "\n" " When enabled (True), point size is taken from the shader builtin\n" " ``gl_PointSize``. When disabled (False), the global state value can\n" " be applied to the shader ``size`` uniform, overwriting any user-set\n" " value.\n" "\n" " :param enable: True to use shader ``gl_PointSize``, False for global state.\n" " :type enable: bool\n") | |
| static PyObject * | blender::pygpu_state_program_point_size_set (PyObject *, PyObject *value) |
| blender::PyDoc_STRVAR (pygpu_state_active_framebuffer_get_doc, ".. function:: active_framebuffer_get()\n" "\n" " Return the active frame-buffer in context.\n" "\n" " :return: The active framebuffer.\n" " :rtype: :class:`gpu.types.GPUFrameBuffer`\n") | |
| static PyObject * | blender::pygpu_state_active_framebuffer_get (PyObject *) |
Variables | |
Helper Functions | |
| static const PyC_StringEnumItems | blender::pygpu_state_blend_items [] |
| static const PyC_StringEnumItems | blender::pygpu_state_depthtest_items [] |
| static const PyC_StringEnumItems | blender::pygpu_state_faceculling_items [] |
Module | |
| static PyMethodDef | blender::pygpu_state__tp_methods [] |
| static PyModuleDef | blender::pygpu_state_module_def |
| blender::PyDoc_STRVAR (pygpu_state__tp_doc, "This module provides access to the gpu state.") | |
| PyObject * | blender::bpygpu_state_init () |
This file defines the gpu.state API.
Definition in file gpu_py_state.cc.
| #define PYDOC_BLEND_LITERAL |
Definition at line 27 of file gpu_py_state.cc.
Referenced by blender::PyDoc_STRVAR().
| #define PYDOC_DEPTHTEST_LITERAL "Literal['NONE', 'ALWAYS', 'LESS', 'LESS_EQUAL', 'EQUAL', 'GREATER', 'GREATER_EQUAL']" |
Definition at line 30 of file gpu_py_state.cc.
Referenced by blender::PyDoc_STRVAR().