-
Notifications
You must be signed in to change notification settings - Fork 0
class_texture
reduz edited this page Feb 23, 2014
·
10 revisions
Inherits: Resource\n\n### Brief Description
Texture for 2D and 3D.
- int get_width" ( ) const
- int get_height" ( ) const
- Vector2 get_size" ( ) const
- RID get_rid" ( ) const
- bool has_alpha" ( ) const
- void set_flags" ( int flags )
- int get_flags" ( ) const
- void draw" ( RID canvas_item, Vector2 pos, Color modulate=Color(1,1,1,1) ) const
- void draw_rect" ( RID canvas_item, Rect2 rect, bool tile, Color modulate=Color(1,1,1,1) ) const
- void draw_rect_region" ( RID canvas_item, Rect2 rect, Rect2 src_rect, Color modulate=Color(1,1,1,1) ) const
- FLAG_MIPMAPS = 1 - Generate mipmaps.
- FLAG_REPEAT = 2 - Repeat (instead of clamp to edge).
- FLAG_FILTER = 4 - Turn on magnifying filter.
- FLAG_VIDEO_SURFACE = 16 - Texture is a video surface
- FLAGS_DEFAULT = 7 - Default flags
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D sprite or GUI controls.
== get_width ==
- int get_width" ( ) const \ Return the texture width. == get_height ==
- int get_height" ( ) const \ Return the texture height. == get_size ==
- Vector2 get_size" ( ) const \ Return the texture size. == get_rid ==
- RID get_rid" ( ) const \ Return the texture RID as used in the visualserver. == set_flags ==
- void set_flags" ( int flags ) \ Change the texture flags. == get_flags ==
- int get_flags" ( ) const \ Return the current texture flags. == draw ==
- void draw" ( RID canvas_item, Vector2 pos, Color modulate=Color(1,1,1,1) ) const \ Draw the texture into a a visualserver canvas item.