diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-04 02:18:21 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-04 02:18:21 +0300 |
commit | a514fea93248756b4319a5f661a2f292bb9125ae (patch) | |
tree | 5a937d54afc7ebdcfc6e914ab31c0381ed4dbc5a /source/blender/editors/include/BIF_glutil.h | |
parent | 87d5f670a0af2b0fcbf92ef591859cbb0a2a0670 (diff) |
OpenGL: remove old DrawPixels util functions
a little bit of T49043, mostly related to T49165
Thx to @fclem for marking these as unused & making shader-based replacements.
Diffstat (limited to 'source/blender/editors/include/BIF_glutil.h')
-rw-r--r-- | source/blender/editors/include/BIF_glutil.h | 58 |
1 files changed, 3 insertions, 55 deletions
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index 74c96f46cc5..e67094027f6 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -136,45 +136,6 @@ int glaGetOneInt(int param); */ void glaRasterPosSafe2f(float x, float y, float known_good_x, float known_good_y); -#if 0 /* Obsolete / unused */ -/** - * Functions like a limited glDrawPixels, except ensures that - * the image is displayed onscreen even if the \a x and \a y - * coordinates for would be clipped. The routine respects the - * glPixelZoom values, pixel unpacking parameters are _not_ - * respected. - * - * \attention This routine makes many assumptions: the rect data - * is expected to be in RGBA unsigned byte format, the coordinate - * (GLA_PIXEL_OFS, GLA_PIXEL_OFS) is assumed to be within the view frustum, - * and the modelview and projection matrices are assumed to define a - * 1-to-1 mapping to screen space. - * \attention Furthermore, in the case of zoomed or unpixel aligned - * images extending outside the view frustum, but still within the - * window, some portion of the image may be visible left and/or - * below of the given \a x and \a y coordinates. It is recommended - * to use the glScissor functionality if images are to be drawn - * with an inset view matrix. - */ -void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int format, int type, void *rect); - -/** - * glaDrawPixelsTex - Functions like a limited glDrawPixels, but actually draws the - * image using textures, which can be tremendously faster on low-end - * cards, and also avoids problems with the raster position being - * clipped when offscreen. The routine respects the glPixelZoom values, - * pixel unpacking parameters are _not_ respected. - * - * \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 - * 1-to-1 mapping to screen space. - */ -void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect); -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 */ @@ -199,22 +160,6 @@ void immDrawPixelsTex(float x, float y, int img_w, int img_h, int format, int ty void immDrawPixelsTex_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, float xzoom, float yzoom, float color[4]); -#if 0 /* Obsolete / unused */ -/** - * glaDrawPixelsAuto - Switches between texture or pixel drawing using UserDef. - * only RGBA - * needs glaDefine2DArea to be set. - */ -void glaDrawPixelsAuto(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect); -void glaDrawPixelsAuto_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); - - -void glaDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float scaleX, float scaleY); -void glaDrawPixelsTexScaled_clipping(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float scaleX, float scaleY, - float clip_min_x, float clip_min_y, float clip_max_x, float clip_max_y); -#endif - void immDrawPixelsTexScaled(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float scaleX, float scaleY, float xzoom, float yzoom, float color[4]); void immDrawPixelsTexScaled_clipping(float x, float y, int img_w, int img_h, int format, int type, int zoomfilter, void *rect, float scaleX, float scaleY, @@ -234,6 +179,9 @@ void immDrawPixelsTexScaled_clipping(float x, float y, int img_w, int img_h, int * \param screen_rect The screen rectangle to be defined for 2D drawing. */ void glaDefine2DArea(struct rcti *screen_rect); + +/* TODO(merwin): put the following 2D code to use, or build new 2D code inspired & informd by it */ + #if 0 /* UNUSED */ typedef struct gla2DDrawInfo gla2DDrawInfo; |