src/text.c

changeset 239
3b78ad115ccd
parent 226
18327d2df79d
equal deleted inserted replaced
238:e22abcd22e47 239:3b78ad115ccd
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);

mercurial