From: Steinar H. Gunderson Date: Wed, 3 Oct 2012 18:25:54 +0000 (+0200) Subject: Yet another use-NULL-instead-of-giving-in-empty-stuff cleanup. X-Git-Tag: 1.0~393 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=c5ec91799b647b647c57da323acbf5076f9518de;hp=a22465673fce8a9db2cf88bccbee72db0e5b4c5e Yet another use-NULL-instead-of-giving-in-empty-stuff cleanup. --- diff --git a/effect_chain.cpp b/effect_chain.cpp index c55ee26..7cc23ff 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -263,10 +263,7 @@ void EffectChain::finalize() check_error(); glBufferData(GL_PIXEL_UNPACK_BUFFER_ARB, width * height * bytes_per_pixel, NULL, GL_STREAM_DRAW); check_error(); - - void *mapped_pbo = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_WRITE_ONLY); - memset(mapped_pbo, 0, width * height * bytes_per_pixel); - glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB); + glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); check_error(); glGenTextures(1, &source_image_num); @@ -275,9 +272,7 @@ void EffectChain::finalize() check_error(); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); check_error(); - glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, BUFFER_OFFSET(0)); - check_error(); - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); + glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, GL_UNSIGNED_BYTE, NULL); check_error(); finalized = true;