95 asc_set_flag_if(flags, ASC_RECTANGLE_SHADER_FLAG_FILL, filled); |
95 asc_set_flag_if(flags, ASC_RECTANGLE_SHADER_FLAG_FILL, filled); |
96 asc_set_flag_if(flags, ASC_RECTANGLE_SHADER_FLAG_ROUND, round); |
96 asc_set_flag_if(flags, ASC_RECTANGLE_SHADER_FLAG_ROUND, round); |
97 asc_set_flag_if(flags, ASC_RECTANGLE_SHADER_FLAG_BORDER, border); |
97 asc_set_flag_if(flags, ASC_RECTANGLE_SHADER_FLAG_BORDER, border); |
98 |
98 |
99 // Look up and activate the shader |
99 // Look up and activate the shader |
100 const AscShaderProgram *shader = asc_shader_lookup_or_create( |
100 const AscShaderProgram *shader = asc_shader_lookup( |
101 ASC_SHADER_RECTANGLE(flags), |
101 ASC_SHADER_RECTANGLE(flags), |
102 asc_rectangle_shader_create, flags |
102 asc_rectangle_shader_create, flags |
103 ); |
103 ); |
104 if (asc_shader_use(shader, camera)) return; |
104 if (asc_shader_use(shader, camera)) return; |
105 asc_cptr_cast(AscRectangleShader, rect_shader, shader); |
105 asc_cptr_cast(AscRectangleShader, rect_shader, shader); |
228 int flags = 0; |
228 int flags = 0; |
229 asc_set_flag_if(flags, ASC_ELLIPSIS_SHADER_FLAG_FILL, filled); |
229 asc_set_flag_if(flags, ASC_ELLIPSIS_SHADER_FLAG_FILL, filled); |
230 asc_set_flag_if(flags, ASC_ELLIPSIS_SHADER_FLAG_BORDER, border); |
230 asc_set_flag_if(flags, ASC_ELLIPSIS_SHADER_FLAG_BORDER, border); |
231 |
231 |
232 // Look up and activate the shader |
232 // Look up and activate the shader |
233 const AscShaderProgram *shader = asc_shader_lookup_or_create( |
233 const AscShaderProgram *shader = asc_shader_lookup( |
234 ASC_SHADER_ELLIPSIS(flags), |
234 ASC_SHADER_ELLIPSIS(flags), |
235 asc_ellipsis_shader_create, flags |
235 asc_ellipsis_shader_create, flags |
236 ); |
236 ); |
237 if (asc_shader_use(shader, camera)) return; |
237 if (asc_shader_use(shader, camera)) return; |
238 asc_cptr_cast(AscEllipsisShader, ellipsis_shader, shader); |
238 asc_cptr_cast(AscEllipsisShader, ellipsis_shader, shader); |