Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_icons.c
| Show First 20 Lines • Show All 1,598 Lines • ▼ Show 20 Lines | static void icon_draw_cache_texture_flush_ex(GLuint texture, | ||||
| glActiveTexture(GL_TEXTURE0); | glActiveTexture(GL_TEXTURE0); | ||||
| glBindTexture(GL_TEXTURE_2D, texture); | glBindTexture(GL_TEXTURE_2D, texture); | ||||
| GPUShader *shader = GPU_shader_get_builtin_shader(GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR); | GPUShader *shader = GPU_shader_get_builtin_shader(GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR); | ||||
| GPU_shader_bind(shader); | GPU_shader_bind(shader); | ||||
| int img_loc = GPU_shader_get_uniform_ensure(shader, "image"); | int img_loc = GPU_shader_get_uniform_ensure(shader, "image"); | ||||
| int data_loc = GPU_shader_get_uniform_ensure(shader, "calls_data[0]"); | int data_loc = GPU_shader_get_uniform_ensure(shader, "calls_data"); | ||||
| glUniform1i(img_loc, 0); | glUniform1i(img_loc, 0); | ||||
| glUniform4fv(data_loc, ICON_DRAW_CACHE_SIZE * 3, (float *)texture_draw_calls->drawcall_cache); | glUniform4fv(data_loc, ICON_DRAW_CACHE_SIZE * 3, (float *)texture_draw_calls->drawcall_cache); | ||||
| GPU_draw_primitive(GPU_PRIM_TRIS, 6 * texture_draw_calls->calls); | GPU_draw_primitive(GPU_PRIM_TRIS, 6 * texture_draw_calls->calls); | ||||
| glBindTexture(GL_TEXTURE_2D, 0); | glBindTexture(GL_TEXTURE_2D, 0); | ||||
| ▲ Show 20 Lines • Show All 774 Lines • Show Last 20 Lines | |||||