Nvrendertexture
NvRenderTexture
A high-performance texture object for off-screen rendering and surface manipulation.
Specific kwargs
| Argument |
Type |
Description |
size |
NvVector2 |
initial size of the render texture. |
Methods
| Name |
Kwargs |
Description |
blit / fast_blit |
texture, dest, ... |
draws another NvRenderTexture onto this one. |
blit_texture / fast_blit_texture |
texture, dest, ... |
draws a raw texture onto this one. |
clear / fast_clear |
color: Color |
clears the texture with a specific color. |
fill |
color: Color |
fills the entire texture with color. |
get_rect |
None |
returns NvRect covering the texture area. |
copy |
flip: bool = False |
returns a copy of the texture. |
kill |
None |
frees the texture memory (destroys the object). |
__enter__ / __exit__ |
None |
support for 'with' statement to start/end drawing mode. |
Static methods
| Name |
Kwargs |
ReturnType |
Description |
from_rl_render_texture |
rl_texture |
NvRenderTexture |
creates NvRenderTexture from a raw RayLib texture. |
Getters
| Name |
ReturnType |
Description |
size |
NvVector2 |
texture dimensions. |
width / height |
float |
individual dimensions. |
id |
Any |
internal GPU texture ID. |
loaded |
bool |
checks if the texture is currently loaded in memory. |
Use case
from nevu_ui import *
import pyray
window = Window((500, 500), title = "NvRenderTexture example", backend = Backend.RayLib)
texture = NvRenderTexture((500, 500))
with texture:
texture.fast_clear()
Created with GGen v1.1.0 for nevu_ui v0.7.5