class_backbuffercopy.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_BackBufferCopy:
  4. BackBufferCopy
  5. ==============
  6. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with the texscreen() shader instruction.
  11. Member Functions
  12. ----------------
  13. +----------------------------+--------------------------------------------------------------------------------------------------------+
  14. | :ref:`int<class_int>` | :ref:`get_copy_mode<class_BackBufferCopy_get_copy_mode>` **(** **)** const |
  15. +----------------------------+--------------------------------------------------------------------------------------------------------+
  16. | :ref:`Rect2<class_rect2>` | :ref:`get_rect<class_BackBufferCopy_get_rect>` **(** **)** const |
  17. +----------------------------+--------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_copy_mode<class_BackBufferCopy_set_copy_mode>` **(** :ref:`int<class_int>` copy_mode **)** |
  19. +----------------------------+--------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_rect<class_BackBufferCopy_set_rect>` **(** :ref:`Rect2<class_rect2>` rect **)** |
  21. +----------------------------+--------------------------------------------------------------------------------------------------------+
  22. Numeric Constants
  23. -----------------
  24. - **COPY_MODE_DISABLED** = **0** --- Disables the buffering mode. This means the BackBufferCopy node will directly use the portion of screen it covers.
  25. - **COPY_MODE_RECT** = **1** --- Sets the copy mode to a region.
  26. - **COPY_MODE_VIEWPORT** = **2** --- Sets the copy mode to the entire screen.
  27. Description
  28. -----------
  29. Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Accessing this buffer is done with the texscreen() shader instruction.
  30. Member Function Description
  31. ---------------------------
  32. .. _class_BackBufferCopy_get_copy_mode:
  33. - :ref:`int<class_int>` **get_copy_mode** **(** **)** const
  34. Return the copy mode currently applied to the BackBufferCopy (refer to constants section).
  35. .. _class_BackBufferCopy_get_rect:
  36. - :ref:`Rect2<class_rect2>` **get_rect** **(** **)** const
  37. Return the area covered by the BackBufferCopy.
  38. .. _class_BackBufferCopy_set_copy_mode:
  39. - void **set_copy_mode** **(** :ref:`int<class_int>` copy_mode **)**
  40. Set the copy mode of the BackBufferCopy (refer to constants section).
  41. .. _class_BackBufferCopy_set_rect:
  42. - void **set_rect** **(** :ref:`Rect2<class_rect2>` rect **)**
  43. Defines the area covered by the BackBufferCopy.