Draw Manager: Fix Gradient Background
This commit is contained in:
@@ -553,6 +553,9 @@ void DRW_draw_background(void)
|
||||
glStencilMask(0xFF);
|
||||
|
||||
if (UI_GetThemeValue(TH_SHOW_BACK_GRAD)) {
|
||||
float m[4][4];
|
||||
unit_m4(m);
|
||||
|
||||
/* Gradient background Color */
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
@@ -561,6 +564,10 @@ void DRW_draw_background(void)
|
||||
unsigned color = VertexFormat_add_attrib(format, "color", COMP_U8, 3, NORMALIZE_INT_TO_FLOAT);
|
||||
unsigned char col_hi[3], col_lo[3];
|
||||
|
||||
gpuPushMatrix();
|
||||
gpuLoadIdentity();
|
||||
gpuLoadProjectionMatrix(m);
|
||||
|
||||
immBindBuiltinProgram(GPU_SHADER_2D_SMOOTH_COLOR);
|
||||
|
||||
UI_GetThemeColor3ubv(TH_LOW_GRAD, col_lo);
|
||||
@@ -578,6 +585,8 @@ void DRW_draw_background(void)
|
||||
|
||||
immUnbindProgram();
|
||||
|
||||
gpuPopMatrix();
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user