85 |
85 |
86 const int flags = asc_texture_is_uv_normalized(sprite->texture) ? 0 : 1; |
86 const int flags = asc_texture_is_uv_normalized(sprite->texture) ? 0 : 1; |
87 |
87 |
88 // Activate shader |
88 // Activate shader |
89 // TODO: scene should know which shader we are going to activate s.t. it can pre-sort nodes |
89 // TODO: scene should know which shader we are going to activate s.t. it can pre-sort nodes |
90 const AscShaderProgram *shader = asc_shader_lookup_or_create( |
90 const AscShaderProgram *shader = asc_shader_lookup( |
91 ASC_SHADER_SPRITE(flags), |
91 ASC_SHADER_SPRITE(flags), |
92 asc_sprite_shader_create, flags |
92 asc_sprite_shader_create, flags |
93 ); |
93 ); |
94 if (asc_shader_use(shader, camera)) return; |
94 if (asc_shader_use(shader, camera)) return; |
95 asc_cptr_cast(AscSpriteShader, sprite_shader, shader); |
95 asc_cptr_cast(AscSpriteShader, sprite_shader, shader); |