Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
| #include "ED_gpencil.h" | #include "ED_gpencil.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_transform.h" | #include "ED_transform.h" | ||||
| #include "ED_gpencil.h" | #include "ED_gpencil.h" | ||||
| #include "GPU_matrix.h" | #include "GPU_matrix.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "GPU_immediate_util.h" | #include "GPU_immediate_util.h" | ||||
| #include "GPU_legacy_stubs.h" | |||||
| #include "GPU_material.h" | #include "GPU_material.h" | ||||
| #include "GPU_viewport.h" | #include "GPU_viewport.h" | ||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| ▲ Show 20 Lines • Show All 765 Lines • ▼ Show 20 Lines | if (scene->world) { | ||||
| /* calculate full shader for background */ | /* calculate full shader for background */ | ||||
| GPU_material_bind(gpumat, 1, 1, 1.0f, false, rv3d->viewmat, rv3d->viewinv, rv3d->viewcamtexcofac, (v3d->scenelock != 0)); | GPU_material_bind(gpumat, 1, 1, 1.0f, false, rv3d->viewmat, rv3d->viewinv, rv3d->viewcamtexcofac, (v3d->scenelock != 0)); | ||||
| if (GPU_material_bound(gpumat)) { | if (GPU_material_bound(gpumat)) { | ||||
| /* TODO viewport (dfelinto): GPU_material_bind relies on immediate mode, | /* TODO viewport (dfelinto): GPU_material_bind relies on immediate mode, | ||||
| * we can't get rid of the following code without a bigger refactor | * we can't get rid of the following code without a bigger refactor | ||||
| * or we dropping this functionality. */ | * or we dropping this functionality. */ | ||||
| glBegin(GL_TRIANGLE_STRIP); | oldBegin(GL_TRIANGLE_STRIP); | ||||
| glVertex2f(-1.0f, -1.0f); | oldVertex2f(-1.0f, -1.0f); | ||||
| glVertex2f(1.0f, -1.0f); | oldVertex2f(1.0f, -1.0f); | ||||
| glVertex2f(-1.0f, 1.0f); | oldVertex2f(-1.0f, 1.0f); | ||||
| glVertex2f(1.0f, 1.0f); | oldVertex2f(1.0f, 1.0f); | ||||
| glEnd(); | oldEnd(); | ||||
| GPU_material_unbind(gpumat); | GPU_material_unbind(gpumat); | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| /* if any of the above fails */ | /* if any of the above fails */ | ||||
| view3d_draw_background_none(); | view3d_draw_background_none(); | ||||
| ▲ Show 20 Lines • Show All 1,578 Lines • Show Last 20 Lines | |||||