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

#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. :frowning:

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

#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 cmbarton):

Just compiled and tested on Mac with trunk r72998. It creates a solid
black image in both PPM and TIF.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:19&gt;
GRASS GIS <https://grass.osgeo.org>

#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:19 cmbarton]:
> Just compiled and tested on Mac with trunk r72998. It creates a solid
black image in both PPM and TIF.

Used Homebrew to install dependencies and compiled trunk r72999 on macOS
10.12 Sierra. It worked for me (attached).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:20&gt;
GRASS GIS <https://grass.osgeo.org>

#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
-----------------------+-------------------------
Changes (by hcho):

* Attachment "screenshot.png" added.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606&gt;
GRASS GIS <https://grass.osgeo.org>

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

* status: new => closed
* resolution: => fixed

Comment:

In [changeset:"73006" 73006]:
{{{
#!CommitTicketReference repository="" revision="73006"
nviz, ogsf: Use framebuffer objects for off-screen GL rendering; Use Core
OpenGL (CGL) for the MacOS instead of deprecated 32-bit only AGL (Fix
#3600, #2114, #3606)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:21&gt;
GRASS GIS <https://grass.osgeo.org>

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

* milestone: => 7.6.0

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:22&gt;
GRASS GIS <https://grass.osgeo.org>

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

Comment (by martinl):

Milestone set to 7.6. Please consider changing to 7.4 and do backport (see
related issues).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:23&gt;
GRASS GIS <https://grass.osgeo.org>

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

* milestone: 7.6.0 => 7.4.2

Comment:

Backported to 7.2 & 7.4.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3606#comment:24&gt;
GRASS GIS <https://grass.osgeo.org>