109 // early exit when the text has no width |
109 // early exit when the text has no width |
110 if (text->dimension.width == 0) return; |
110 if (text->dimension.width == 0) return; |
111 |
111 |
112 // Activate shader |
112 // Activate shader |
113 // TODO: scene should know which shader we are going to activate s.t. it can pre-sort nodes |
113 // TODO: scene should know which shader we are going to activate s.t. it can pre-sort nodes |
114 const AscShaderProgram *shader = asc_shader_lookup_or_create( |
114 const AscShaderProgram *shader = asc_shader_lookup( |
115 ASC_SHADER_TEXT(0), |
115 ASC_SHADER_TEXT(0), |
116 asc_text_shader_create, 0 |
116 asc_text_shader_create, 0 |
117 ); |
117 ); |
118 if (asc_shader_use(shader, camera)) return; |
118 if (asc_shader_use(shader, camera)) return; |
119 asc_cptr_cast(AscTextShader, text_shader, shader); |
119 asc_cptr_cast(AscTextShader, text_shader, shader); |