diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-02-24 13:11:43 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-02-24 14:38:50 +0300 |
commit | 1e7475a5d7878642057ea0cb313b5ee0d4a8545e (patch) | |
tree | 7367c569551f13849c081aca731174289513b470 /source/blender/editors/include/BIF_glutil.h | |
parent | 0584c82ad7c1c2f133f617c52de28be15f6840d4 (diff) |
Opengl glaDrawPixels removal: More descriptive setup.
Diffstat (limited to 'source/blender/editors/include/BIF_glutil.h')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index a3161b49d41..0b85517f334 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -210,6 +210,12 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, int ty void glaDrawPixelsTex_clipping(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y); #endif + +/* To be used before calling immDrawPixelsTex + * Default shader is GPU_SHADER_2D_IMAGE_COLOR + * Returns a shader to be able to set uniforms */ +struct GPUShader *immDrawPixelsTexSetup(int builtin); + /** * immDrawPixelsTex - Functions like a limited glDrawPixels, but actually draws the * image using textures, which can be tremendously faster on low-end @@ -217,6 +223,8 @@ void glaDrawPixelsTex_clipping(float x, float y, int img_w, int img_h, int forma * clipped when offscreen. Pixel unpacking parameters and * the glPixelZoom values are _not_ respected. * + * \attention Use immDrawPixelsTexSetup before calling this function. + * * \attention This routine makes many assumptions: the rect data * is expected to be in RGBA byte or float format, and the * modelview and projection matrices are assumed to define a |