Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_framebuffer.c
| Show First 20 Lines • Show All 937 Lines • ▼ Show 20 Lines | void GPU_offscreen_bind(GPUOffScreen *ofs, bool save) | ||||
| if (save) { | if (save) { | ||||
| gpuPushAttr(GPU_SCISSOR_BIT | GPU_VIEWPORT_BIT); | gpuPushAttr(GPU_SCISSOR_BIT | GPU_VIEWPORT_BIT); | ||||
| GPUFrameBuffer *fb = GPU_framebuffer_active_get(); | GPUFrameBuffer *fb = GPU_framebuffer_active_get(); | ||||
| gpuPushFrameBuffer(fb); | gpuPushFrameBuffer(fb); | ||||
| } | } | ||||
| glDisable(GL_SCISSOR_TEST); | glDisable(GL_SCISSOR_TEST); | ||||
| GPUFrameBuffer *ofs_fb = gpu_offscreen_fb_get(ofs); | GPUFrameBuffer *ofs_fb = gpu_offscreen_fb_get(ofs); | ||||
| GPU_framebuffer_bind(ofs_fb); | GPU_framebuffer_bind(ofs_fb); | ||||
| glDisable(GL_FRAMEBUFFER_SRGB); | |||||
| } | } | ||||
| void GPU_offscreen_unbind(GPUOffScreen *UNUSED(ofs), bool restore) | void GPU_offscreen_unbind(GPUOffScreen *UNUSED(ofs), bool restore) | ||||
| { | { | ||||
| GPUFrameBuffer *fb = NULL; | GPUFrameBuffer *fb = NULL; | ||||
| if (restore) { | if (restore) { | ||||
| gpuPopAttr(); | gpuPopAttr(); | ||||
| ▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines | |||||