# HG changeset patch # User Rik # Date 1398543155 25200 # Node ID 8c537222f1e5941e19e30130b822906d615cb851 # Parent 99d1ef340de42b3eb067b3a1294fd439ab10e70a gl-render.cc: Use class prefix, opengl_renderer or opengl_texture, when printing warning. * gl-render.cc (draw_axes, draw_surface, draw_image, render_text) : Use class prefix, opengl_renderer or opengl_texture, when printing warning. diff -r 99d1ef340de4 -r 8c537222f1e5 libinterp/corefcn/gl-render.cc --- a/libinterp/corefcn/gl-render.cc Sat Apr 26 15:44:50 2014 +0200 +++ b/libinterp/corefcn/gl-render.cc Sat Apr 26 13:12:35 2014 -0700 @@ -1424,7 +1424,7 @@ if (x_max > floatmax || y_max > floatmax || z_max > floatmax || x_min < -floatmax || y_min < -floatmax || z_min < -floatmax) { - warning ("gl-render: data values greater than float capacity. (1) Scale data, or (2) Use gnuplot"); + warning ("opengl_renderer: data values greater than float capacity. (1) Scale data, or (2) Use gnuplot"); return; } @@ -1589,7 +1589,7 @@ Matrix a; if (props.facelighting_is ("phong") || props.edgelighting_is ("phong")) - warning ("opengl_renderer::draw: phong light model not supported"); + warning ("opengl_renderer: phong light model not supported"); int fc_mode = (props.facecolor_is_rgb () ? 0 : (props.facecolor_is ("flat") ? 1 : @@ -2621,7 +2621,7 @@ if (xisnan (p0(0)) || xisnan (p0(1)) || xisnan (p1(0)) || xisnan (p1(1))) { - warning ("gl-render: image X,Y data too large to draw"); + warning ("opengl_renderer: image X,Y data too large to draw"); return; } @@ -2654,9 +2654,8 @@ nor_dy = 1; } - // OpenGL won't draw the image if it's origin is outside the - // viewport/clipping plane so we must do the clipping ourselves--only draw - // part of the image. + // OpenGL won't draw any of the image if it's origin is outside the + // viewport/clipping plane so we must do the clipping ourselves. int j0, j1, i0, i1; j0 = 0, j1 = w; @@ -2755,10 +2754,10 @@ draw_pixels (j1-j0, i1-i0, GL_RGB, GL_UNSIGNED_BYTE, a); } else - warning ("opengl_texture::draw: invalid image data type (expected double, uint16, or uint8)"); + warning ("opengl_renderer: invalid image data type (expected double, uint8, or uint16)"); } else - warning ("opengl_texture::draw: invalid image size (expected n*m*3 or n*m)"); + warning ("opengl_renderer: invalid image size (expected MxNx3 or MxN)"); glPixelZoom (1, 1); } @@ -3154,7 +3153,7 @@ return bbox; #else - ::warning ("render_text: cannot render text, FreeType library not available"); + warning ("opengl_renderer: cannot render text, FreeType library not available"); return Matrix (1, 4, 0.0); #endif }