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_or_create( |
115 ASC_SHADER_TEXT, asc_text_shader_create, 0); |
115 ASC_SHADER_TEXT(0), |
|
116 asc_text_shader_create, 0 |
|
117 ); |
116 if (asc_shader_use(shader, camera)) return; |
118 if (asc_shader_use(shader, camera)) return; |
117 asc_cptr_cast(AscTextShader, text_shader, shader); |
119 asc_cptr_cast(AscTextShader, text_shader, shader); |
118 |
120 |
119 // Upload model matrix |
121 // Upload model matrix |
120 asc_shader_upload_model_matrix(shader, node); |
122 asc_shader_upload_model_matrix(shader, node); |