Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_draw.c
| Context not available. | |||||
| coldown[1] = max_ff(0.0f, color[1] + shadedown); | coldown[1] = max_ff(0.0f, color[1] + shadedown); | ||||
| coldown[2] = max_ff(0.0f, color[2] + shadedown); | coldown[2] = max_ff(0.0f, color[2] + shadedown); | ||||
| glShadeModel(GL_SMOOTH); | |||||
| glBegin(mode); | glBegin(mode); | ||||
| /* start with corner right-bottom */ | /* start with corner right-bottom */ | ||||
| Context not available. | |||||
| } | } | ||||
| glEnd(); | glEnd(); | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| /* linear vertical shade within button or in outline */ | /* linear vertical shade within button or in outline */ | ||||
| Context not available. | |||||
| colRight[1] = max_ff(0.0f, color[1] + shadeRight); | colRight[1] = max_ff(0.0f, color[1] + shadeRight); | ||||
| colRight[2] = max_ff(0.0f, color[2] + shadeRight); | colRight[2] = max_ff(0.0f, color[2] + shadeRight); | ||||
| glShadeModel(GL_SMOOTH); | |||||
| glBegin(mode); | glBegin(mode); | ||||
| /* start with corner right-bottom */ | /* start with corner right-bottom */ | ||||
| Context not available. | |||||
| } | } | ||||
| glEnd(); | glEnd(); | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| /* plain antialiased unfilled rectangle */ | /* plain antialiased unfilled rectangle */ | ||||
| Context not available. | |||||
| } | } | ||||
| else { | else { | ||||
| /* under the curve */ | /* under the curve */ | ||||
| glShadeModel(GL_FLAT); | |||||
| glBegin(GL_TRIANGLE_STRIP); | glBegin(GL_TRIANGLE_STRIP); | ||||
| glVertex2f(x, y); | glVertex2f(x, y); | ||||
| glVertex2f(x, y + (data[0] * h)); | glVertex2f(x, y + (data[0] * h)); | ||||
| Context not available. | |||||
| GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); | GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); | ||||
| /* layer: color ramp */ | /* layer: color ramp */ | ||||
| glShadeModel(GL_FLAT); | |||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| CBData *cbd = coba->data; | CBData *cbd = coba->data; | ||||
| Context not available. | |||||
| glEnd(); | glEnd(); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| glShadeModel(GL_SMOOTH); | |||||
| /* layer: box outline */ | /* layer: box outline */ | ||||
| glColor4f(0.0, 0.0, 0.0, 1.0); | glColor4f(0.0, 0.0, 0.0, 1.0); | ||||
| Context not available. | |||||
| qobj = gluNewQuadric(); | qobj = gluNewQuadric(); | ||||
| gluQuadricDrawStyle(qobj, GLU_FILL); | gluQuadricDrawStyle(qobj, GLU_FILL); | ||||
| glShadeModel(GL_SMOOTH); | int bound_options = GPU_basic_shader_bound_options(); | ||||
| GPU_basic_shader_bind(bound_options); | |||||
| gluSphere(qobj, 100.0, 32, 24); | gluSphere(qobj, 100.0, 32, 24); | ||||
| glShadeModel(GL_FLAT); | |||||
| gluDeleteQuadric(qobj); | gluDeleteQuadric(qobj); | ||||
| glEndList(); | glEndList(); | ||||
| Context not available. | |||||
| void UI_draw_box_shadow(unsigned char alpha, float minx, float miny, float maxx, float maxy) | void UI_draw_box_shadow(unsigned char alpha, float minx, float miny, float maxx, float maxy) | ||||
| { | { | ||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| glShadeModel(GL_SMOOTH); | |||||
| glBegin(GL_QUADS); | glBegin(GL_QUADS); | ||||
| Context not available. | |||||
| glEnd(); | glEnd(); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| glShadeModel(GL_FLAT); | |||||
| } | } | ||||
| Context not available. | |||||