natiny_render_texture
void natiny_render_texture(
NatinyTexture texture,
float x, float y, float w, float h
);
Draws a texture at the specified position and size using the current draw color.
Parameters
| Name | Type | Description |
|---|---|---|
texture |
NatinyTexture |
Texture handle from natiny_texture_create |
x |
float |
X position in pixels |
y |
float |
Y position in pixels |
w |
float |
Positive draw width in pixels |
h |
float |
Positive draw height in pixels |
Example
natiny_window_bind(win);
natiny_render_set_color(1.0f, 1.0f, 1.0f, 1.0f);
natiny_render_texture(tex, 100.0f, 50.0f, 64.0f, 64.0f);
natiny_window_unbind();
Notes
wandhare required. Non-positive sizes do not draw anything.