Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2017-03-27 08:43:12 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-27 08:43:12 +0300
commit271471bbe6ad26a1b96b9bc76dfba4e5f70b2d89 (patch)
tree27d9098ea520c743e26c9e4ae4f019d1343d3a7b /source/blender
parentb95ee78ed3f1851443aea871ffd1b1fd36e5ab1b (diff)
OpenGL: remove matrix manip from framebuffer setup
It doesn't really belong here... Any code using framebuffers will set up its own matrices. Part of T49450
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index e807c5523a6..5b3ffe9a93f 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -220,14 +220,9 @@ void GPU_texture_bind_as_framebuffer(GPUTexture *tex)
glEnable(GL_MULTISAMPLE);
}
- /* push matrices and set default viewport and matrix */
+ /* set default viewport */
glViewport(0, 0, GPU_texture_width(tex), GPU_texture_height(tex));
GG.currentfb = fb->object;
-
- glMatrixMode(GL_PROJECTION);
- gpuPushMatrix();
- glMatrixMode(GL_MODELVIEW);
- gpuPushMatrix();
}
void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
@@ -258,14 +253,9 @@ void GPU_framebuffer_slots_bind(GPUFrameBuffer *fb, int slot)
glDrawBuffers(numslots, attachments);
glReadBuffer(GL_COLOR_ATTACHMENT0 + slot);
- /* push matrices and set default viewport and matrix */
+ /* set default viewport */
glViewport(0, 0, GPU_texture_width(fb->colortex[slot]), GPU_texture_height(fb->colortex[slot]));
GG.currentfb = fb->object;
-
- glMatrixMode(GL_PROJECTION);
- gpuPushMatrix();
- glMatrixMode(GL_MODELVIEW);
- gpuPushMatrix();
}
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
@@ -308,12 +298,6 @@ void GPU_framebuffer_bind(GPUFrameBuffer *fb)
void GPU_framebuffer_texture_unbind(GPUFrameBuffer *UNUSED(fb), GPUTexture *UNUSED(tex))
{
- /* restore matrix */
- glMatrixMode(GL_PROJECTION);
- gpuPopMatrix();
- glMatrixMode(GL_MODELVIEW);
- gpuPopMatrix();
-
/* restore attributes */
glPopAttrib();
}