[GRASS-dev] [GRASS GIS] #3606: m.nviz.image produces a screenshot

GRASS GIS trac at osgeo.org
Thu Jul 19 07:46:58 PDT 2018


#3606: m.nviz.image produces a screenshot
-----------------------+-------------------------
  Reporter:  epifanio  |      Owner:  grass-dev@…
      Type:  defect    |     Status:  new
  Priority:  major     |  Milestone:
 Component:  Display   |    Version:  svn-trunk
Resolution:            |   Keywords:
       CPU:  x86-64    |   Platform:  Linux
-----------------------+-------------------------

Comment (by hcho):

 Replying to [comment:17 hcho]:
 > Replying to [comment:14 cmbarton]:
 > > When this is at a point where it seems to be working on Windows, let
 me know and I'll recompile it for the Mac and test some more.
 >
 > r72997 works on Windows at least for me, but no changes to the Mac code.

 Check this code from
 https://www.panda3d.org/reference/1.7.2/cxx/osxGraphicsBuffer.cxx_source.php
 {{{
 if (_pbuffer == NULL) {
      GLenum target = GL_TEXTURE_RECTANGLE_ARB;
      if (_x_size == Texture::up_to_power_2(_x_size) &&
          _y_size == Texture::up_to_power_2(_x_size)) {
        // It's a power-of-two size, so we can use GL_TEXTURE_2D as the
        // target.  Dunno, but maybe this will be more likely to work on
        // some hardware.
        target = GL_TEXTURE_2D;
      }
      if (!aglCreatePBuffer(_x_size, _y_size, target, GL_RGBA, 0,
 &_pbuffer)) {
        report_agl_error("aglCreatePBuffer");
        close_buffer();
        return false;
      }
 }}}

 They use GL_TEXTURE_RECTANGLE_ARB for non-powers of 2 size and
 GL_TEXTURE_2D for powers of 2. Probably, you can try
 GL_TEXTURE_RECTANGLE_ARB in line 146 in lib/nviz/render.c. Wish I had a
 Mac. :-(

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:18>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list