diff options
author | Laura Ekstrand <laura@jlekstrand.net> | 2015-02-02 18:19:43 -0800 |
---|---|---|
committer | Laura Ekstrand <laura@jlekstrand.net> | 2015-03-09 16:20:45 -0700 |
commit | 9698dd9dd7eb679cea5083e3c9362d9ef4d54490 (patch) | |
tree | 028f6688bb3c00e9cea75e101487c61ac6317cfd | |
parent | de6bd0bd2a5dfee6ea5c4444b90fd87fcc87dcb9 (diff) |
arb_direct_state_access: Testing BlitNamedFramebuffers.
-rw-r--r-- | tests/spec/arb_direct_state_access/framebufferblit.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/tests/spec/arb_direct_state_access/framebufferblit.c b/tests/spec/arb_direct_state_access/framebufferblit.c index 2866c78ce..fb746d1f8 100644 --- a/tests/spec/arb_direct_state_access/framebufferblit.c +++ b/tests/spec/arb_direct_state_access/framebufferblit.c @@ -94,11 +94,11 @@ display_texture(int x, int y, GLuint tex, int layers) tex, 0); /* Blit layer to screen */ - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo); - glBindFramebuffer(GL_READ_FRAMEBUFFER, tempFBO); - glBlitFramebuffer(0, 0, texWidth, texHeight, - x, y, x + texWidth, y + texDepth * texHeight, - GL_COLOR_BUFFER_BIT, GL_NEAREST); + glBlitNamedFramebuffer(tempFBO, piglit_winsys_fbo, + 0, 0, texWidth, texHeight, + x, y, x + texWidth, + y + texDepth * texHeight, + GL_COLOR_BUFFER_BIT, GL_NEAREST); } else { int i; @@ -118,19 +118,18 @@ display_texture(int x, int y, GLuint tex, int layers) } /* Blit layer to screen */ - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, piglit_winsys_fbo); - glBindFramebuffer(GL_READ_FRAMEBUFFER, tempFBO); - glBlitFramebuffer(0, 0, texWidth, texHeight, - x, - y + i * texHeight, - x + texWidth, - y + (i + 1) * texHeight, - GL_COLOR_BUFFER_BIT, GL_NEAREST); + glBlitNamedFramebuffer(tempFBO, piglit_winsys_fbo, + 0, 0, texWidth, texHeight, + x, + y + i * texHeight, + x + texWidth, + y + (i + 1) * texHeight, + GL_COLOR_BUFFER_BIT, + GL_NEAREST); } } /* Cleanup temp fbo */ - glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo); glDeleteFramebuffers(1, &tempFBO); return piglit_check_gl_error(GL_NO_ERROR); @@ -249,11 +248,9 @@ testFramebufferBlitLayered(int x, int y, bool srcLayered, bool dstLayered) } /* Blit from source to destination framebuffers */ - glBindFramebuffer(GL_READ_FRAMEBUFFER, srcFBO); - glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dstFBO); - glBlitFramebuffer(0, 0, texWidth, texHeight, - 0, 0, texWidth, texHeight, - GL_COLOR_BUFFER_BIT, GL_LINEAR); + glBlitNamedFramebuffer(srcFBO, dstFBO, 0, 0, texWidth, texHeight, + 0, 0, texWidth, texHeight, + GL_COLOR_BUFFER_BIT, GL_LINEAR); /* Display the results */ display_texture(x, y, srcTex, srcLayered ? texDepth : 1); @@ -271,7 +268,6 @@ testFramebufferBlitLayered(int x, int y, bool srcLayered, bool dstLayered) } /* Clean up */ - glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo); glDeleteFramebuffers(1, &srcFBO); glDeleteFramebuffers(1, &dstFBO); glDeleteTextures(1, &srcTex); @@ -297,7 +293,6 @@ piglit_display(void) { bool pass = true; - glBindFramebuffer(GL_FRAMEBUFFER, piglit_winsys_fbo); glClearColor(1,1,1,1); glClear(GL_COLOR_BUFFER_BIT); |