49 } |
49 } |
50 |
50 |
51 static void asc_shader_initialize_predefined(AscGLContext *ctx) { |
51 static void asc_shader_initialize_predefined(AscGLContext *ctx) { |
52 AscShaderSprite *sprite = &ctx->shader.sprite; |
52 AscShaderSprite *sprite = &ctx->shader.sprite; |
53 sprite->base = asc_shader_easy_compile_and_link("shader/sprite_vtx.glsl", "shader/sprite_frag.glsl"); |
53 sprite->base = asc_shader_easy_compile_and_link("shader/sprite_vtx.glsl", "shader/sprite_frag.glsl"); |
54 sprite->surface = glGetUniformLocation(sprite->base.id, "surface"); |
|
55 sprite->depth = glGetUniformLocation(sprite->base.id, "depth"); |
54 sprite->depth = glGetUniformLocation(sprite->base.id, "depth"); |
|
55 sprite->tex = glGetUniformLocation(sprite->base.id, "texture"); |
56 } |
56 } |
57 |
57 |
58 static void asc_shader_destroy_predefined(AscGLContext *ctx) { |
58 static void asc_shader_destroy_predefined(AscGLContext *ctx) { |
59 asc_shader_program_destroy(ctx->shader.sprite.base); |
59 asc_shader_program_destroy(ctx->shader.sprite.base); |
60 } |
60 } |