[Bf-blender-cvs] [1556a28] blender2.8: OpenGL: draw filebrowser dropshadow with new imm mode
Thomas Beck
noreply at git.blender.org
Fri Oct 28 21:25:23 CEST 2016
Commit: 1556a28108feb097c706facdf76a2b36c9f25a83
Author: Thomas Beck
Date: Fri Oct 28 20:46:10 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB1556a28108feb097c706facdf76a2b36c9f25a83
OpenGL: draw filebrowser dropshadow with new imm mode
Part of T49043.
===================================================================
M source/blender/editors/space_file/file_draw.c
===================================================================
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 925efec..18674fa 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -398,8 +398,13 @@ static void file_draw_preview(
/* border */
if (use_dropshadow) {
- glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
- fdrawbox((float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey));
+ VertexFormat* format = immVertexFormat();
+ unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2,KEEP_FLOAT);
+
+ immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
+ immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f);
+ imm_draw_line_box(pos, (float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey));
+ immUnbindProgram();
}
but = uiDefBut(block, UI_BTYPE_LABEL, 0, "", xco, yco, ex, ey, NULL, 0.0, 0.0, 0, 0, NULL);
More information about the Bf-blender-cvs
mailing list