Mercurial > octave
changeset 19710:ce0a1bd0cd47
fix omission from changeset 1170c849952b
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 13 Feb 2015 18:06:46 -0500 |
parents | 5cfb3ccbf24a |
children | b59aabc08e63 |
files | libinterp/dldfcn/__osmesa_print__.cc |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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))