Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/gpencil/gpencil_render.c
| Show First 20 Lines • Show All 297 Lines • ▼ Show 20 Lines | if (fbl->main) { | ||||
| GPU_framebuffer_texture_attach(fbl->main, ((GPENCIL_Data *)vedata)->render_color_tx, 0, 0); | GPU_framebuffer_texture_attach(fbl->main, ((GPENCIL_Data *)vedata)->render_color_tx, 0, 0); | ||||
| /* clean first time the buffer */ | /* clean first time the buffer */ | ||||
| float clearcol[4] = {0.0f, 0.0f, 0.0f, 0.0f}; | float clearcol[4] = {0.0f, 0.0f, 0.0f, 0.0f}; | ||||
| GPU_framebuffer_bind(fbl->main); | GPU_framebuffer_bind(fbl->main); | ||||
| GPU_framebuffer_clear_color_depth(fbl->main, clearcol, 1.0f); | GPU_framebuffer_clear_color_depth(fbl->main, clearcol, 1.0f); | ||||
| } | } | ||||
| /* loop all objects and draw */ | /* loop all objects and draw */ | ||||
| DRW_render_object_iter(vedata, engine, draw_ctx->depsgraph, GPENCIL_render_cache); | DRW_render_object_iter(vedata, engine, draw_ctx->depsgraph, GPENCIL_render_cache, OB_GPENCIL); | ||||
| GPENCIL_cache_finish(vedata); | GPENCIL_cache_finish(vedata); | ||||
| DRW_render_instance_buffer_finish(); | DRW_render_instance_buffer_finish(); | ||||
| GPENCIL_draw_scene(vedata); | GPENCIL_draw_scene(vedata); | ||||
| /* combined data */ | /* combined data */ | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||