gpu_extras submodule (gpu_extras.presets)¶
-
gpu_extras.presets.draw_circle_2d(position, color, radius, segments=32)¶ Draw a circle.
Parameters: - position (2D Vector) – Position where the circle will be drawn.
- color (tuple containing RGBA values) – Color of the circle. To use transparency GL_BLEND has to be enabled.
- radius (float) – Radius of the circle.
- segments (int) – How many segments will be used to draw the circle. Higher values give besser results but the drawing will take longer.
-
gpu_extras.presets.draw_texture_2d(texture_id, position, width, height)¶ Draw a 2d texture.
Parameters: - texture_id (int) – OpenGL id of the texture (e.g.
bpy.types.Image.bindcode). - position (2D Vector) – Position of the lower left corner.
- width (float) – Width of the image when drawn (not necessarily the original width of the texture).
- height (float) – Height of the image when drawn.
- texture_id (int) – OpenGL id of the texture (e.g.