[GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn't produce any output

Here is a question to the memory of the dev group. Does anyone know if m.nviz.image has *ever* worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last working code and the current code to see what has changed.

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

Michael

______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
                                http://www.public.asu.edu/~cmbarton

On 7/12/18, 12:00 PM, "grass-dev on behalf of grass-dev-request@lists.osgeo.org" <grass-dev-bounces@lists.osgeo.org on behalf of grass-dev-request@lists.osgeo.org> wrote:

    Date: Thu, 12 Jul 2018 14:41:08 -0000
    From: "GRASS GIS" <trac@osgeo.org>
    To: undisclosed-recipients: ;
    Cc: grass-dev@lists.osgeo.org
    Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn't
      produce any output
    Message-ID: <055.8e71a8cfc36b4251baa0dfd416694c92@osgeo.org>
    Content-Type: text/plain; charset="utf-8"
    
    #3600: m.nviz.image doesn't produce any output
    --------------------------+-------------------------
      Reporter: guano | Owner: grass-dev@…
          Type: defect | Status: new
      Priority: normal | Milestone:
    Component: Default | Version: 7.0.4
    Resolution: | Keywords:
           CPU: Unspecified | Platform: MacOSX
    --------------------------+-------------------------
    
    Comment (by hcho):
    
    Replying to [comment:61 hellik]:
    > Replying to [comment:60 hcho]:
    > > Replying to [comment:58 hellik]:
    > > > Replying to [comment:54 hcho]:
    > > > > Only Windows defines double buffering; that's why Linux works
    without buffer swapping because it has only one buffer. BUT, glGetError()
    still returns GL_INVALID_OPERATION according to
    https://urldefense.proofpoint.com/v2/url?u=https-3A__www.khronos.org_registry_OpenGL-2D&d=DwIGaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=BQAjtkxyihbnoyMfjeRJrNPso08jamSBCdnDLkAxL3w&s=MMgJ_nuxOOyqQYovZ_chgzuhRPYj6z2kgBDetoMH3lo&e=
    Refpages/gl4/html/glReadBuffer.xhtml. Probably, that's why some Linux
    drivers and MacOS don't work at all.
    > > > >
    > > > > Windows is also broken because nviz draws to the back buffer, but
    it reads from the front buffer without buffer swapping.
    > > >
    > > > tested with
    > > >
    > > > {{{
    > > > GRASS version: 7.5.svn
    > > > GRASS SVN revision: r72969
    > > > Build date: 2018-07-10
    > > > Build platform: x86_64-w64-mingw32
    > > > GDAL: 2.2.4
    > > > PROJ.4: 4.9.3
    > > > GEOS: 3.5.0
    > > > SQLite: 3.17.0
    > > > Python: 2.7.14
    > > > wxPython: 2.8.12.1
    > > > Platform: Windows-10-10.0.17134 (OSGeo4W)
    > > > }}}
    > > >
    > >
    > >
    > > r72974+ has double buffering. Earlier version was incomplete without
    buffer swapping for Windows. Please try r72974+ later.
    >
    > winGRASS building is broken:
    >
    > see
    [https://urldefense.proofpoint.com/v2/url?u=https-3A__wingrass.fsv.cvut.cz_grass75_x86-5F64_logs_log-2Dr72978-2D191_error.log&d=DwIGaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=BQAjtkxyihbnoyMfjeRJrNPso08jamSBCdnDLkAxL3w&s=9pi8B6qe-k9ydWDaw-7-RwSFI1qv0CruWCXBK3Xv2No&e=
    error.log]
    >
    > {{{
    > GRASS GIS 7.5.svn r72978 compilation log
    > --------------------------------------------------
    > Started compilation: Wed Jul 11 15:02:16 2018
    > --
    > Errors in:
    > /c/msys64/usr/src/grass_trunk/lib/ogsf
    > /c/msys64/usr/src/grass_trunk/lib/nviz
    > /c/msys64/usr/src/grass_trunk/misc/m.nviz.image
    > --
    > In case of errors please change into the directory with error and run
    'make'.
    > If you get multiple errors, you need to deal with them in the order they
    > appear in the error log. If you get an error building a library, you
    will
    > also get errors from anything which uses the library.
    > --
    > Finished compilation: Wed Jul 11 15:35:12 2018
    > }}}
    >
    > and
    [https://urldefense.proofpoint.com/v2/url?u=https-3A__wingrass.fsv.cvut.cz_grass75_x86-5F64_logs_log-2Dr72978-2D191_package.log&d=DwIGaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=BQAjtkxyihbnoyMfjeRJrNPso08jamSBCdnDLkAxL3w&s=4izwLxDNf7iN91JfrST9nNeArD1BThMVT6inDjH7SZE&e=
    compiling log]
    
    Replaced wingdi.h with windows.h in r72980. Copied from nviz.h. Weird,
    according to Wingdi.h header - Win32 apps | Microsoft Learn
    /nf-wingdi-swapbuffers, SwapBuffer is defined in wingdi.h.
    
    --
    Ticket URL: <#3600 (m.nviz.image doesn't produce any output) – GRASS GIS;
    GRASS GIS <https://urldefense.proofpoint.com/v2/url?u=https-3A__grass.osgeo.org&d=DwIGaQ&c=l45AxH-kUV29SRQusp9vYR0n1GycN4_2jInuKy6zbqQ&r=lk-7X7CEOMDN8GaGVhiDsuO6gEp1wbG6nfT1XEEEtR0&m=BQAjtkxyihbnoyMfjeRJrNPso08jamSBCdnDLkAxL3w&s=DCw1mza9VtQsatUpDpGWD5mTschoG4p8DvOqiEU6Z6o&e=&gt;
    

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu>
wrote:

Here is a question to the memory of the dev group. Does anyone know if
m.nviz.image has *ever* worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last
working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows.
On Mac (and Linux) it worked, but since certain version of operating
system(s) and/or hardware it stopped working. It was reported to work even
now (before the fixes) on an old (not updated) Mac. (In other words, the
code was not broken on the way, but still needed/needs to be fixed.)

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939
https://trac.osgeo.org/grass/changeset/72948
https://trac.osgeo.org/grass/changeset/72970
https://trac.osgeo.org/grass/changeset/72972
https://trac.osgeo.org/grass/changeset/72974
https://trac.osgeo.org/grass/changeset/72980
https://trac.osgeo.org/grass/changeset/72986
https://trac.osgeo.org/grass/changeset/72987
https://trac.osgeo.org/grass/changeset/72990
https://trac.osgeo.org/grass/changeset/72997

Sort of what I suspected. So the code is not really “broken”. But we’re trying to have it work cross platform.

Michael

Michael Barton
School of Human Evolution &Social Change
Center for Social Dynamics & Complexity
Arizona State University

…Sent from my iPad

···

On Jul 19, 2018, at 7:13 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a question to the memory of the dev group. Does anyone know if m.nviz.image has ever worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows. On Mac (and Linux) it worked, but since certain version of operating system(s) and/or hardware it stopped working. It was reported to work even now (before the fixes) on an old (not updated) Mac. (In other words, the code was not broken on the way, but still needed/needs to be fixed.)

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939
https://trac.osgeo.org/grass/changeset/72948
https://trac.osgeo.org/grass/changeset/72970
https://trac.osgeo.org/grass/changeset/72972
https://trac.osgeo.org/grass/changeset/72974
https://trac.osgeo.org/grass/changeset/72980
https://trac.osgeo.org/grass/changeset/72986
https://trac.osgeo.org/grass/changeset/72987
https://trac.osgeo.org/grass/changeset/72990
https://trac.osgeo.org/grass/changeset/72997

On Thu, Jul 19, 2018 at 10:12 PM, Vaclav Petras <wenzeslaus@gmail.com>
wrote:

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu>
wrote:

Here is a question to the memory of the dev group. Does anyone know if
m.nviz.image has *ever* worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last
working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows.
On Mac (and Linux) it worked, but since certain version of operating
system(s) and/or hardware it stopped working. It was reported to work even
now (before the fixes) on an old (not updated) Mac. (In other words, the
code was not broken on the way, but still needed/needs to be fixed.)

r72997 fixed m.nviz.image on Windows 10 64-bit. The off-screen bitmap
buffer never seemed to work, so I changed it to an invisible window DC,
which also supports hardware acceleration unlike a memory DC.

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939
https://trac.osgeo.org/grass/changeset/72948
https://trac.osgeo.org/grass/changeset/72970
https://trac.osgeo.org/grass/changeset/72972
https://trac.osgeo.org/grass/changeset/72974
https://trac.osgeo.org/grass/changeset/72980
https://trac.osgeo.org/grass/changeset/72986
https://trac.osgeo.org/grass/changeset/72987
https://trac.osgeo.org/grass/changeset/72990
https://trac.osgeo.org/grass/changeset/72997

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

--
Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

Unfortunately it didn’t seem to fix the Mac, since r72998 produces a black image.

Michael

···

C. Michael Barton

Director, Center for Social Dynamics & Complexity

Professor of Anthropology, School of Human Evolution & Social Change

Head, Graduate Faculty in Complex Adaptive Systems Science

Arizona State University

Tempe, AZ 85287-2402

USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)

fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)

www: http://csdc.asu.edu, http://shesc.asu.edu

http://www.public.asu.edu/~cmbarton

From: Huidae Cho grass4u@gmail.com
Date: Thursday, July 19, 2018 at 8:17 PM
To: Vaclav Petras wenzeslaus@gmail.com
Cc: Michael Barton Michael.Barton@asu.edu, GRASS developers list grass-dev@lists.osgeo.org
Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn’t produce any output

On Thu, Jul 19, 2018 at 10:12 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a question to the memory of the dev group. Does anyone know if m.nviz.image has ever worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows. On Mac (and Linux) it worked, but since certain version of operating system(s) and/or hardware it stopped working. It was reported to work even now (before the fixes) on an old (not updated) Mac. (In other words, the code was not broken on the way, but still needed/needs to be fixed.)

r72997 fixed m.nviz.image on Windows 10 64-bit. The off-screen bitmap buffer never seemed to work, so I changed it to an invisible window DC, which also supports hardware acceleration unlike a memory DC.

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939

https://trac.osgeo.org/grass/changeset/72948

https://trac.osgeo.org/grass/changeset/72970

https://trac.osgeo.org/grass/changeset/72972

https://trac.osgeo.org/grass/changeset/72974

https://trac.osgeo.org/grass/changeset/72980

https://trac.osgeo.org/grass/changeset/72986

https://trac.osgeo.org/grass/changeset/72987

https://trac.osgeo.org/grass/changeset/72990

https://trac.osgeo.org/grass/changeset/72997


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

Michael, one thing weird is with no changes to the Mac code, it worked on my 10.12 Sierra VM yesterday. Maybe, VM vs. real hardware?

Regards,
Huidae


Huidae Cho, Ph.D., P.E. (MD), M.ASCE, CFM, GISP
Sent from my phone

On Fri, Jul 20, 2018, 1:07 PM Michael Barton <Michael.Barton@asu.edu> wrote:

Unfortunately it didn’t seem to fix the Mac, since r72998 produces a black image.

Michael


C. Michael Barton

Director, Center for Social Dynamics & Complexity

Professor of Anthropology, School of Human Evolution & Social Change

Head, Graduate Faculty in Complex Adaptive Systems Science

Arizona State University

Tempe, AZ 85287-2402

USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)

fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)

www: http://csdc.asu.edu, http://shesc.asu.edu

http://www.public.asu.edu/~cmbarton

From: Huidae Cho <grass4u@gmail.com>
Date: Thursday, July 19, 2018 at 8:17 PM
To: Vaclav Petras <wenzeslaus@gmail.com>
Cc: Michael Barton <Michael.Barton@asu.edu>, GRASS developers list <grass-dev@lists.osgeo.org>
Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn’t produce any output

On Thu, Jul 19, 2018 at 10:12 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a question to the memory of the dev group. Does anyone know if m.nviz.image has ever worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows. On Mac (and Linux) it worked, but since certain version of operating system(s) and/or hardware it stopped working. It was reported to work even now (before the fixes) on an old (not updated) Mac. (In other words, the code was not broken on the way, but still needed/needs to be fixed.)

r72997 fixed m.nviz.image on Windows 10 64-bit. The off-screen bitmap buffer never seemed to work, so I changed it to an invisible window DC, which also supports hardware acceleration unlike a memory DC.

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939

https://trac.osgeo.org/grass/changeset/72948

https://trac.osgeo.org/grass/changeset/72970

https://trac.osgeo.org/grass/changeset/72972

https://trac.osgeo.org/grass/changeset/72974

https://trac.osgeo.org/grass/changeset/72980

https://trac.osgeo.org/grass/changeset/72986

https://trac.osgeo.org/grass/changeset/72987

https://trac.osgeo.org/grass/changeset/72990

https://trac.osgeo.org/grass/changeset/72997


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

Maybe, we can try the same thing I did for Windows. Create and hide a real window and draw to it?


Huidae Cho, Ph.D., P.E. (MD), M.ASCE, CFM, GISP
Sent from my phone

On Fri, Jul 20, 2018, 1:15 PM Huidae Cho <grass4u@gmail.com> wrote:

Michael, one thing weird is with no changes to the Mac code, it worked on my 10.12 Sierra VM yesterday. Maybe, VM vs. real hardware?

Regards,
Huidae


Huidae Cho, Ph.D., P.E. (MD), M.ASCE, CFM, GISP
Sent from my phone

On Fri, Jul 20, 2018, 1:07 PM Michael Barton <Michael.Barton@asu.edu> wrote:

Unfortunately it didn’t seem to fix the Mac, since r72998 produces a black image.

Michael


C. Michael Barton

Director, Center for Social Dynamics & Complexity

Professor of Anthropology, School of Human Evolution & Social Change

Head, Graduate Faculty in Complex Adaptive Systems Science

Arizona State University

Tempe, AZ 85287-2402

USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)

fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)

www: http://csdc.asu.edu, http://shesc.asu.edu

http://www.public.asu.edu/~cmbarton

From: Huidae Cho <grass4u@gmail.com>
Date: Thursday, July 19, 2018 at 8:17 PM
To: Vaclav Petras <wenzeslaus@gmail.com>
Cc: Michael Barton <Michael.Barton@asu.edu>, GRASS developers list <grass-dev@lists.osgeo.org>
Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn’t produce any output

On Thu, Jul 19, 2018 at 10:12 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a question to the memory of the dev group. Does anyone know if m.nviz.image has ever worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows. On Mac (and Linux) it worked, but since certain version of operating system(s) and/or hardware it stopped working. It was reported to work even now (before the fixes) on an old (not updated) Mac. (In other words, the code was not broken on the way, but still needed/needs to be fixed.)

r72997 fixed m.nviz.image on Windows 10 64-bit. The off-screen bitmap buffer never seemed to work, so I changed it to an invisible window DC, which also supports hardware acceleration unlike a memory DC.

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939

https://trac.osgeo.org/grass/changeset/72948

https://trac.osgeo.org/grass/changeset/72970

https://trac.osgeo.org/grass/changeset/72972

https://trac.osgeo.org/grass/changeset/72974

https://trac.osgeo.org/grass/changeset/72980

https://trac.osgeo.org/grass/changeset/72986

https://trac.osgeo.org/grass/changeset/72987

https://trac.osgeo.org/grass/changeset/72990

https://trac.osgeo.org/grass/changeset/72997


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

I don’t know how to add that to the C code but I can compile and test it.

Michael

···

C. Michael Barton

Director, Center for Social Dynamics & Complexity

Professor of Anthropology, School of Human Evolution & Social Change

Head, Graduate Faculty in Complex Adaptive Systems Science

Arizona State University

Tempe, AZ 85287-2402

USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)

fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)

www: http://csdc.asu.edu, http://shesc.asu.edu

http://www.public.asu.edu/~cmbarton

From: Huidae Cho grass4u@gmail.com
Date: Friday, July 20, 2018 at 10:19 AM
To: Michael Barton Michael.Barton@asu.edu
Cc: Vaclav Petras wenzeslaus@gmail.com, GRASS developers list grass-dev@lists.osgeo.org
Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn’t produce any output

Maybe, we can try the same thing I did for Windows. Create and hide a real window and draw to it?


Huidae Cho, Ph.D., P.E. (MD), M.ASCE, CFM, GISP
Sent from my phone

On Fri, Jul 20, 2018, 1:15 PM Huidae Cho <grass4u@gmail.com> wrote:

Michael, one thing weird is with no changes to the Mac code, it worked on my 10.12 Sierra VM yesterday. Maybe, VM vs. real hardware?

Regards,

Huidae


Huidae Cho, Ph.D., P.E. (MD), M.ASCE, CFM, GISP
Sent from my phone

On Fri, Jul 20, 2018, 1:07 PM Michael Barton <Michael.Barton@asu.edu> wrote:

Unfortunately it didn’t seem to fix the Mac, since r72998 produces a black image.

Michael


C. Michael Barton

Director, Center for Social Dynamics & Complexity

Professor of Anthropology, School of Human Evolution & Social Change

Head, Graduate Faculty in Complex Adaptive Systems Science

Arizona State University

Tempe, AZ 85287-2402

USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)

fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)

www: http://csdc.asu.edu, http://shesc.asu.edu

http://www.public.asu.edu/~cmbarton

From: Huidae Cho <grass4u@gmail.com>
Date: Thursday, July 19, 2018 at 8:17 PM
To: Vaclav Petras <wenzeslaus@gmail.com>
Cc: Michael Barton <Michael.Barton@asu.edu>, GRASS developers list <grass-dev@lists.osgeo.org>
Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn’t produce any output

On Thu, Jul 19, 2018 at 10:12 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Jul 12, 2018 at 5:48 PM, Michael Barton <Michael.Barton@asu.edu> wrote:

Here is a question to the memory of the dev group. Does anyone know if m.nviz.image has ever worked for Mac or Windows?

If it has, any idea when it last worked? We could do a diff of the last working code and the current code to see what has changed.

Just for the record: m.nviz.image (most probably) never worked on Windows. On Mac (and Linux) it worked, but since certain version of operating system(s) and/or hardware it stopped working. It was reported to work even now (before the fixes) on an old (not updated) Mac. (In other words, the code was not broken on the way, but still needed/needs to be fixed.)

r72997 fixed m.nviz.image on Windows 10 64-bit. The off-screen bitmap buffer never seemed to work, so I changed it to an invisible window DC, which also supports hardware acceleration unlike a memory DC.

If not, it may take considerable effort to make this work.

Trying to figure out an efficient way forward

For the future readers of this:

https://trac.osgeo.org/grass/ticket/2114
https://trac.osgeo.org/grass/ticket/2998
https://trac.osgeo.org/grass/ticket/3600
https://trac.osgeo.org/grass/ticket/3606

https://trac.osgeo.org/grass/changeset/72939

https://trac.osgeo.org/grass/changeset/72948

https://trac.osgeo.org/grass/changeset/72970

https://trac.osgeo.org/grass/changeset/72972

https://trac.osgeo.org/grass/changeset/72974

https://trac.osgeo.org/grass/changeset/72980

https://trac.osgeo.org/grass/changeset/72986

https://trac.osgeo.org/grass/changeset/72987

https://trac.osgeo.org/grass/changeset/72990

https://trac.osgeo.org/grass/changeset/72997


grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

For anyone who wants to try this patch on macOS.

(attachments)

include-nviz.h.diff (1.25 KB)
lib-nviz-render.c.diff (5.12 KB)
lib-ogsf-gsd_prim.c.diff (1.8 KB)
lib-ogsf-gsd_view.c.diff (675 Bytes)

···

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

Test run for the NC sample dataset.

g.region rast=elevation
m.nviz.image elevmap=elevation output=elev format=tif persp=10 --o

···

On Sun, Jul 22, 2018 at 1:43 AM, Huidae Cho <grass4u@gmail.com> wrote:

For anyone who wants to try this patch on macOS.

---------- Forwarded message ----------
From: Huidae Cho <grass4u@gmail.com>
Date: Sun, Jul 22, 2018 at 1:41 AM
Subject: Re: [GRASS-dev] [GRASS GIS] #3600: m.nviz.image doesn’t produce any output
To: Michael Barton <Michael.Barton@asu.edu>

Michael,

Please try this patch.

cd grass_trunk
for i in ~/*.diff; do
patch -p0 < $i
done
cp include/nviz.h dist.x86_64-apple-darwin17.0.0/include/grass/nviz.h

echo “#define OPENGL_FBO 1” > dist.x86_64-apple-darwin17.0.0/include/grass/config.h # case 4 below

(cd lib/nviz; make)
(cd lib/ogsf; make)

I tried AGL and CGL with/without framebuffer objects (FBO). AGL works with and without FBO, but CGL only works with FBO, again, on my VM. We know AGL without FBO doesn’t work on your mac.

  1. AGL, no FBO: OPENGL_AGL, no OPENGL_FBO in config.h works for me, but not for you.
  2. AGL, FBO: OPENGL_AGL, OPENGL_FBO in config.h works for me.
  3. CGL, no FBO: no OPENGL_AGL, no OPENGL_FBO in config.h doesn’t work for me.
  4. CGL, FBO: OPENGL_FBO, no OPENGL_AGL in config.h works for me.

If you don’t mind, please try cases 2-4.

Best,
Huidae

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team

Huidae Cho, Ph.D., PE, M.ASCE, CFM, GISP
Senior Geospatial Engineer, MapAnything
Open Source GIS Developer, GRASS GIS Development Team