Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grass: enable opengl #431

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

grass: enable opengl #431

wants to merge 1 commit into from

Conversation

landam
Copy link

@landam landam commented Feb 18, 2024

This PR enables OpenGL support for GRASS package.

But unfortunately 3D view in GRASS GUI doesn't work:

./src/unix/glegl.cpp(391) in InitVisual(): Failed to get an
EGLConfig for the requested attributes.

image

This bug seems to be related to wxWidgets packaging. I tested the same version of wxWidget (3.4.2) and wxPython (4.2.1) in Nix and Debian. On Debian 3D view works as expected. So probably the problem could be related to wxWidgets packaging in Nix(?)

@landam landam marked this pull request as draft February 18, 2024 11:42
@imincik
Copy link
Owner

imincik commented Feb 19, 2024

Thanks for PR.

Nix packaged software is not able to find OpenGL drivers out-of-the box. We need to use additional tools like nixGL .

Are you able to give me some copy/paste instructions how to reproduce the error you've got ?

@landam
Copy link
Author

landam commented Feb 20, 2024

  1. Download sample data
./result/bin/grass --tmp-location EPSG:4326 --exec g.download.location https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.tar.gz name=nc_basic path=~/grassdata
  1. Enter sample Location in GUI mode
 ./result/bin/grass --gui ~/grassdata/nc_basic/PERMANENT/
  1. Load elevation map from Data tab or by
d.rast elevation
  1. Switch to 3D view

image

@imincik
Copy link
Owner

imincik commented Feb 21, 2024

I confirm that 3d view works when running grass with nixGL

Running on my ubuntu 22.04 machine.

nix run --override-input nixpkgs nixpkgs/20f65b86b6485decb43c5498780c223571dd56ef --impure github:guibou/nixGL#nixGLIntel -- ./result/bin/grass

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants