diff options
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 304 |
1 files changed, 152 insertions, 152 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index cb5c5df20ec..1c00040a894 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -141,23 +141,23 @@ void immDrawPixelsTexScaledFullSize(const IMMDrawPixelsTexState *state, GPU_texture_free(tex); } -void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state, - float x, - float y, - int img_w, - int img_h, - eGPUTextureFormat gpu_format, - bool use_filter, - void *rect, - float scaleX, - float scaleY, - float clip_min_x, - float clip_min_y, - float clip_max_x, - float clip_max_y, - float xzoom, - float yzoom, - const float color[4]) +void immDrawPixelsTexTiled_scaling_clipping(IMMDrawPixelsTexState *state, + float x, + float y, + int img_w, + int img_h, + eGPUTextureFormat gpu_format, + bool use_filter, + void *rect, + float scaleX, + float scaleY, + float clip_min_x, + float clip_min_y, + float clip_max_x, + float clip_max_y, + float xzoom, + float yzoom, + const float color[4]) { int subpart_x, subpart_y, tex_w = 256, tex_h = 256; int seamless, offset_x, offset_y, nsubparts_x, nsubparts_y; @@ -311,103 +311,103 @@ void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state, GPU_unpack_row_length_set(0); } -void immDrawPixelsTexScaled(IMMDrawPixelsTexState *state, - float x, - float y, - int img_w, - int img_h, - eGPUTextureFormat gpu_format, - bool use_filter, - void *rect, - float scaleX, - float scaleY, - float xzoom, - float yzoom, - const float color[4]) +void immDrawPixelsTexTiled_scaling(IMMDrawPixelsTexState *state, + float x, + float y, + int img_w, + int img_h, + eGPUTextureFormat gpu_format, + bool use_filter, + void *rect, + float scaleX, + float scaleY, + float xzoom, + float yzoom, + const float color[4]) { - immDrawPixelsTexScaled_clipping(state, - x, - y, - img_w, - img_h, - gpu_format, - use_filter, - rect, - scaleX, - scaleY, - 0.0f, - 0.0f, - 0.0f, - 0.0f, - xzoom, - yzoom, - color); + immDrawPixelsTexTiled_scaling_clipping(state, + x, + y, + img_w, + img_h, + gpu_format, + use_filter, + rect, + scaleX, + scaleY, + 0.0f, + 0.0f, + 0.0f, + 0.0f, + xzoom, + yzoom, + color); } -void immDrawPixelsTex(IMMDrawPixelsTexState *state, - float x, - float y, - int img_w, - int img_h, - eGPUTextureFormat gpu_format, - bool use_filter, - void *rect, - float xzoom, - float yzoom, - const float color[4]) +void immDrawPixelsTexTiled(IMMDrawPixelsTexState *state, + float x, + float y, + int img_w, + int img_h, + eGPUTextureFormat gpu_format, + bool use_filter, + void *rect, + float xzoom, + float yzoom, + const float color[4]) { - immDrawPixelsTexScaled_clipping(state, - x, - y, - img_w, - img_h, - gpu_format, - use_filter, - rect, - 1.0f, - 1.0f, - 0.0f, - 0.0f, - 0.0f, - 0.0f, - xzoom, - yzoom, - color); + immDrawPixelsTexTiled_scaling_clipping(state, + x, + y, + img_w, + img_h, + gpu_format, + use_filter, + rect, + 1.0f, + 1.0f, + 0.0f, + 0.0f, + 0.0f, + 0.0f, + xzoom, + yzoom, + color); } -void immDrawPixelsTex_clipping(IMMDrawPixelsTexState *state, - float x, - float y, - int img_w, - int img_h, - eGPUTextureFormat gpu_format, - bool use_filter, - void *rect, - float clip_min_x, - float clip_min_y, - float clip_max_x, - float clip_max_y, - float xzoom, - float yzoom, - const float color[4]) +void immDrawPixelsTexTiled_clipping(IMMDrawPixelsTexState *state, + float x, + float y, + int img_w, + int img_h, + eGPUTextureFormat gpu_format, + bool use_filter, + void *rect, + float clip_min_x, + float clip_min_y, + float clip_max_x, + float clip_max_y, + float xzoom, + float yzoom, + const float color[4]) { - immDrawPixelsTexScaled_clipping(state, - x, - y, - img_w, - img_h, - gpu_format, - use_filter, - rect, - 1.0f, - 1.0f, - clip_min_x, - clip_min_y, - clip_max_x, - clip_max_y, - xzoom, - yzoom, - color); + immDrawPixelsTexTiled_scaling_clipping(state, + x, + y, + img_w, + img_h, + gpu_format, + use_filter, + rect, + 1.0f, + 1.0f, + clip_min_x, + clip_min_y, + clip_max_x, + clip_max_y, + xzoom, + yzoom, + color); } /* **** Color management helper functions for GLSL display/transform ***** */ @@ -478,40 +478,40 @@ void ED_draw_imbuf_clipping(ImBuf *ibuf, } if (format != 0) { - immDrawPixelsTex_clipping(&state, - x, - y, - ibuf->x, - ibuf->y, - format, - use_filter, - ibuf->rect_float, - clip_min_x, - clip_min_y, - clip_max_x, - clip_max_y, - zoom_x, - zoom_y, - NULL); + immDrawPixelsTexTiled_clipping(&state, + x, + y, + ibuf->x, + ibuf->y, + format, + use_filter, + ibuf->rect_float, + clip_min_x, + clip_min_y, + clip_max_x, + clip_max_y, + zoom_x, + zoom_y, + NULL); } } else if (ibuf->rect) { /* ibuf->rect is always RGBA */ - immDrawPixelsTex_clipping(&state, - x, - y, - ibuf->x, - ibuf->y, - GPU_RGBA8, - use_filter, - ibuf->rect, - clip_min_x, - clip_min_y, - clip_max_x, - clip_max_y, - zoom_x, - zoom_y, - NULL); + immDrawPixelsTexTiled_clipping(&state, + x, + y, + ibuf->x, + ibuf->y, + GPU_RGBA8, + use_filter, + ibuf->rect, + clip_min_x, + clip_min_y, + clip_max_x, + clip_max_y, + zoom_x, + zoom_y, + NULL); } IMB_colormanagement_finish_glsl_draw(); @@ -530,21 +530,21 @@ void ED_draw_imbuf_clipping(ImBuf *ibuf, if (display_buffer) { IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR); - immDrawPixelsTex_clipping(&state, - x, - y, - ibuf->x, - ibuf->y, - GPU_RGBA8, - use_filter, - display_buffer, - clip_min_x, - clip_min_y, - clip_max_x, - clip_max_y, - zoom_x, - zoom_y, - NULL); + immDrawPixelsTexTiled_clipping(&state, + x, + y, + ibuf->x, + ibuf->y, + GPU_RGBA8, + use_filter, + display_buffer, + clip_min_x, + clip_min_y, + clip_max_x, + clip_max_y, + zoom_x, + zoom_y, + NULL); } IMB_display_buffer_release(cache_handle); |