|
|
None | __init__ (self, QAbstractOpenGLFunctions open_gl_binding_object, int fallback_width=1, int fallback_height=1, QOpenGLTexture.Filter aa_filter=QOpenGLTexture.Filter.Nearest) |
| int | getTextureId (self) |
|
int | getWidth (self) |
|
int | getHeight (self) |
|
QImage | getImage (self) |
| | bind (self, texture_unit) |
| None | updateImagePart (self, QRect region) |
| | release (self, texture_unit) |
| | load (self, file_name) |
|
| setImage (self, image) |
|
"Texture" | __deepcopy__ (self, memo) |
|
|
None | _performSubImageUpdates (self) |
|
|
| _qt_texture = QOpenGLTexture(QOpenGLTexture.Target.Target2D) |
|
| _gl = open_gl_binding_object |
|
| _file_name = None |
|
| _image = None |
|
| _fallback_width = fallback_width |
|
| _fallback_height = fallback_height |
|
| _aa_filter = aa_filter |
|
Optional[QRect] | _image_update_part = None |
A class describing the interface to be used for texture objects.
This interface should be implemented by OpenGL implementations to handle texture
objects.
◆ bind()
| UM.View.GL.Texture.Texture.bind |
( |
| self, |
|
|
| texture_unit ) |
Bind the texture to a certain texture unit.
:param texture_unit: The texture unit to bind to.
◆ getTextureId()
| int UM.View.GL.Texture.Texture.getTextureId |
( |
| self | ) |
|
Get the OpenGL ID of the texture.
◆ load()
| UM.View.GL.Texture.Texture.load |
( |
| self, |
|
|
| file_name ) |
Load an image and upload it to the texture.
:param file_name: The file name of the image to load.
◆ release()
| UM.View.GL.Texture.Texture.release |
( |
| self, |
|
|
| texture_unit ) |
Release the texture from a certain texture unit.
:param texture_unit: The texture unit to release from.
◆ updateImagePart()
| None UM.View.GL.Texture.Texture.updateImagePart |
( |
| self, |
|
|
QRect | region ) |
Update the texture based on a part of the image that has been updated
:param region: The region of the image that has been updated
The documentation for this class was generated from the following file: