# HG changeset patch # User John W. Eaton # Date 1423868806 18000 # Node ID ce0a1bd0cd47bb1060d39172bf9c5985539e8aa8 # Parent 5cfb3ccbf24a3dedc1876f1ad9966e414a0e15bb fix omission from changeset 1170c849952b diff -r 5cfb3ccbf24a -r ce0a1bd0cd47 libinterp/dldfcn/__osmesa_print__.cc --- a/libinterp/dldfcn/__osmesa_print__.cc Fri Feb 13 16:46:21 2015 -0500 +++ b/libinterp/dldfcn/__osmesa_print__.cc Fri Feb 13 18:06:46 2015 -0500 @@ -116,11 +116,8 @@ int Width = bb(2); int Height = bb(3); - OSMesaContext ctx; - void *buffer; - // Create an RGBA-mode context, specify Z=16, stencil=0, accum=0 sizes - ctx = OSMesaCreateContextExt (OSMESA_RGBA, 16, 0, 0, NULL); + OSMesaContext ctx = OSMesaCreateContextExt (OSMESA_RGBA, 16, 0, 0, NULL); if (! ctx) { error ("__osmesa_print__: OSMesaCreateContext failed!\n"); @@ -128,7 +125,7 @@ } // Allocate the image buffer - OCTAVE_LOCAL_BUFFER (GLubyte, 4 * Width * Height, buffer); + OCTAVE_LOCAL_BUFFER (GLubyte, buffer, 4 * Width * Height); // Bind the buffer to the context and make it current if (! OSMesaMakeCurrent (ctx, buffer, GL_UNSIGNED_BYTE, Width, Height))