Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-07-29 16:50:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-29 16:54:51 +0300
commit2d89cd7dd5b2345ca5cc36cb20edacb04ef90036 (patch)
tree2a0f47059f83383ce7a55a32984c14708cf77d4a /source/blender/gpu/GPU_draw.h
parent99d0b3b79377d38d3936fd9beba8d647e938f0c1 (diff)
Cleanup: GPU: Move Image based function to GPU_draw.h
This makes it less confusing what functions are for blender structures.
Diffstat (limited to 'source/blender/gpu/GPU_draw.h')
-rw-r--r--source/blender/gpu/GPU_draw.h45
1 files changed, 29 insertions, 16 deletions
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index 8110920527d..0d8acfa0279 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -25,6 +25,8 @@
#define __GPU_DRAW_H__
#include "BLI_utildefines.h"
+
+#include "DNA_image_types.h"
#include "DNA_object_enums.h"
#ifdef __cplusplus
@@ -32,38 +34,49 @@ extern "C" {
#endif
struct FluidModifierData;
-struct ImBuf;
+struct GPUTexture;
struct Image;
struct ImageUser;
+struct ImBuf;
struct Main;
+struct MovieClip;
+struct MovieClipUser;
-/* OpenGL drawing functions related to shading. */
+/* Texture creation from blender datablocks. */
+struct GPUTexture *GPU_texture_from_blender(struct Image *ima,
+ struct ImageUser *iuser,
+ struct ImBuf *ibuf,
+ eGPUTextureTarget target);
-/* Mipmap settings
- * - these will free textures on changes */
+struct GPUTexture *GPU_texture_from_movieclip(struct MovieClip *clip,
+ struct MovieClipUser *cuser,
+ eGPUTextureTarget target);
-void GPU_paint_set_mipmap(struct Main *bmain, bool mipmap);
-
-/* Image updates and free
- * - these deal with images bound as opengl textures */
+/* Fluid simulation. */
+void GPU_create_smoke(struct FluidModifierData *fmd, int highres);
+void GPU_create_smoke_coba_field(struct FluidModifierData *fmd);
+void GPU_create_smoke_velocity(struct FluidModifierData *fmd);
-void GPU_paint_update_image(
- struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h);
+/* Image updates and free. */
void GPU_free_image(struct Image *ima);
+void GPU_free_movieclip(struct MovieClip *clip);
+void GPU_free_smoke(struct FluidModifierData *fmd);
+void GPU_free_smoke_velocity(struct FluidModifierData *fmd);
+
void GPU_free_images(struct Main *bmain);
void GPU_free_images_anim(struct Main *bmain);
void GPU_free_images_old(struct Main *bmain);
-/* gpu_draw_smoke.c */
-void GPU_free_smoke(struct FluidModifierData *fmd);
-void GPU_free_smoke_velocity(struct FluidModifierData *fmd);
-void GPU_create_smoke(struct FluidModifierData *fmd, int highres);
-void GPU_create_smoke_coba_field(struct FluidModifierData *fmd);
-void GPU_create_smoke_velocity(struct FluidModifierData *fmd);
+void GPU_paint_update_image(
+ struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h);
+void GPU_paint_set_mipmap(struct Main *bmain, bool mipmap);
/* Delayed free of OpenGL buffers by main thread */
void GPU_free_unused_buffers(void);
+/* For internal use. */
+struct GPUTexture *GPU_texture_create_error(eGPUTextureTarget target);
+
#ifdef __cplusplus
}
#endif