GPU Python: Implement gpu.texture.from_image

It can be useful to replace `image.bindcode` and `image.gl_load`.

Used for example in https://docs.blender.org/api/current/gpu.html#d-image

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D10458
This commit is contained in:
Germano Cavalcante
2021-03-01 17:35:10 -03:00
committed by Germano Cavalcante
parent f39143bc2e
commit 6c6b1c015c
4 changed files with 70 additions and 4 deletions

View File

@@ -253,6 +253,7 @@ else:
"gpu.select",
"gpu.shader",
"gpu.state",
"gpu.texture",
"gpu_extras",
"idprop.types",
"mathutils",
@@ -1981,10 +1982,11 @@ def write_rst_importable_modules(basepath):
"imbuf.types": "Image Buffer Types",
"gpu": "GPU Shader Module",
"gpu.types": "GPU Types",
"gpu.matrix": "GPU Matrix",
"gpu.select": "GPU Select",
"gpu.shader": "GPU Shader",
"gpu.state": "GPU State",
"gpu.matrix": "GPU Matrix Utilities",
"gpu.select": "GPU Select Utilities",
"gpu.shader": "GPU Shader Utilities",
"gpu.state": "GPU State Utilities",
"gpu.texture": "GPU Texture Utilities",
"bmesh": "BMesh Module",
"bmesh.ops": "BMesh Operators",
"bmesh.types": "BMesh Types",