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:
authorGermano Cavalcante <germano.costa@ig.com.br>2017-03-23 20:56:42 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2017-03-23 20:56:42 +0300
commit96e1b46791d57b81ac34ab42b782471c0099d291 (patch)
treeae5baa51bfd55e8c5bb088934d3e3794b59151d6 /source/blender/editors/space_image
parent3de5e7150194717f5977e437aaf966f1db7a900a (diff)
OpenGL Immediate Mode: finalize `image_draw`
The directive `#if 0` was ignored. Part of T49043
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_draw.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index d5258869968..e8b32789cbf 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -481,7 +481,6 @@ static void draw_image_buffer(const bContext *C, SpaceImage *sima, ARegion *ar,
{
int x, y;
- /* set zoom */
glaDefine2DArea(&ar->winrct);
/* find window pixel coordinates of origin */
@@ -548,9 +547,6 @@ static void draw_image_buffer(const bContext *C, SpaceImage *sima, ARegion *ar,
if (sima->flag & SI_USE_ALPHA)
glDisable(GL_BLEND);
}
-
- /* reset zoom */
- glPixelZoom(1.0f, 1.0f);
}
static unsigned int *get_part_from_buffer(unsigned int *buffer, int width, short startx, short starty, short endx, short endy)
@@ -918,8 +914,12 @@ void draw_image_cache(const bContext *C, ARegion *ar)
/* Draw current frame. */
x = (cfra - sfra) / (efra - sfra + 1) * ar->winx;
- UI_ThemeColor(TH_CFRAME);
- glRecti(x, 0, x + ceilf(framelen), 8 * UI_DPI_FAC);
+ unsigned pos = add_attrib(immVertexFormat(), "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT);
+ immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
+ immUniformThemeColor(TH_CFRAME);
+ immRecti(pos, x, 0, x + ceilf(framelen), 8 * UI_DPI_FAC);
+ immUnbindProgram();
+
ED_region_cache_draw_curfra_label(cfra, x, 8.0f * UI_DPI_FAC);
if (mask != NULL) {