octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #43873] large image gets cropped if size/heigh


From: Andreas Weber
Subject: [Octave-bug-tracker] [bug #43873] large image gets cropped if size/height exceeds OpenGL limit
Date: Tue, 23 Dec 2014 08:44:16 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0

URL:
  <http://savannah.gnu.org/bugs/?43873>

                 Summary: large image gets cropped if size/height exceeds
OpenGL limit
                 Project: GNU Octave
            Submitted by: andy1978
            Submitted on: Di 23 Dez 2014 08:44:15 GMT
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Any

    _______________________________________________________

Details:

If I try to show a large image with graphics_toolkit fltk (gnuplot is fine)


image (randi (255, 10, 9000))


the width gets cropped at 8192 because GL_MAX_TEXTURE_SIZE is 8192 on my GPU.
I think the best would be to split the glDrawPixels calls in this case or at
least show an warning.

I made a quick change to gl-render.cc:2723 to check the maximum possible width
and height but this will be shown every time a refresh is made for example
moving the FLTK window or moving the mouse over the window.


void
opengl_renderer::draw_pixels (GLsizei width, GLsizei height, GLenum format,
                              GLenum type, const GLvoid *data)
{
  int max_texture_size;
  glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max_texture_size);
  if (width > max_texture_size)
    warning ("opengl_renderer::draw_pixels: width exceeds maximum texture size
%i of your GPU. Output will be cropped", max_texture_size);
  if (height > max_texture_size)
    warning ("opengl_renderer::draw_pixels: height exceeds maximum texture
size %i of your GPU. Output will be cropped", max_texture_size);

  glDrawPixels (width, height, format, type, data);
}


Any ideas how we should handle this?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43873>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]