3D Models Viewer
Posted
#1
(In Topic #958)
Regular

<IMG src="https://i.imgur.com/vCFgXNS.png">
</IMG>Here I share with you this program we made together with TercoIDE to experiment with OpenGL in 3D.
The latest version is in the Gambas Farm and also in the gitlab repo. Belmotek / 3D Model Viewer · GitLab
<IMG src="https://i.imgur.com/grfbClo.png">
</IMG><IMG src="https://i.imgur.com/lpT1skE.png">
</IMG><LIST>
- <LI>
- 1 - Open a 3D model</LI>
<LI> - 2 - Load texture</LI>
<LI> - 3 - Object color</LI>
<LI> - 4 - Background color</LI>
<LI> - 5 - Wireframe on-off</LI>
<LI> - 6 - Texture on-off</LI>
<LI> - 7 - Othogonal view estandar</LI>
<LI> - 8 - Ortographic camera on-off</LI>
The other buttons that are not listed are either not relevant to the operation of the programme or do not yet work.
<IMG src="https://i.imgur.com/uBYrb9j.png">
</IMG>Enjoy it.
Posted
Expert


On run, I get a 'cannot find dynamic library libGl.so'
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Regular

ok, you have two possibilities, either the library is not installed on your system or the module cannot load it.Quincunxian said
On run, I get a 'cannot find dynamic library libGl.so'
I have added a patch to warn, when the program ir running from the IDE, with a dialog box in case the library is not installed.
On the other hand it may happen that you do have the library installed so there are other diferent situation.
Please follow these steps to help me to debug the program.
1 - Download the new code from gitlab.
2 - Inform if you get any message about the distribution or about the libGL library status.
3 - Install the libgl-dev package (in ubuntu)
4 - If it still doesn't work, tell me what distro you are using with the output from:
cat /etc/[A-Za-z]*[_-][rv]e[lr]*
And this
locate libGL.so
Thanks for the fedback
Posted
Expert


Help [? menu] & System Information.
It gives a lot more data than the cat statement you provided.
locate fails to find libGl.so - assume that this is becaue the version on my machine is named libGl.so.1.7.0 (highlighted in red below)
[System]
Gambas=3.17.3
OperatingSystem=Linux
Kernel=5.4.0-135-generic
Architecture=x86_64
Distribution=Linux Mint 20.3 Una
Desktop=CINNAMON
Font=Ubuntu,10
Scale=7
Theme=mint-y
Language=en_AU.UTF-8
Memory=15882M
[Libraries]
Cairo=libcairo.so.2.11600.0
Curl=libcurl.so.4.6.0
DBus=libdbus-1.so.3.19.11
GDK2=libgdk-x11-2.0.so.0.2400.32
GDK3=libgdk-3.so.0.2404.16
GStreamer=libgstreamer-1.0.so.0.1603.0
GTK+2=libgtk-x11-2.0.so.0.2400.32
GTK+3=libgtk-3.so.0.2404.16
<COLOR color="#FF0000">OpenGL=libGL.so.1.7.0</COLOR>
Poppler=libpoppler.so.97.0.0
QT5=libQt5Core.so.5.12.8
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6
[Environment]
CINNAMON_VERSION=5.2.7
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEFAULTS_PATH=/usr/share/gconf/cinnamon.default.path
DESKTOP_SESSION=cinnamon
DISPLAY=:0
GB_GUI=gb.gtk3
GDMSESSION=cinnamon
GDM_LANG=en_AU
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=13288
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
GTK3_MODULES=xapp-gtk3-module
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=1
HOME=<home>
LANG=en_AU.UTF-8
LANGUAGE=en_AU.UTF-8
LC_ALL=en_AU.UTF-8
LOGNAME=<user>
MANDATORY_PATH=/usr/share/gconf/cinnamon.mandatory.path
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD=<home>
QT_ACCESSIBILITY=1
QT_LOGGING_RULES=*.debug=false
QT_QPA_PLATFORMTHEME=qt5ct
SESSION_MANAGER=local/<hostname>
SHELL=/bin/bash
SHLVL=0
SSH_AGENT_PID=1214
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg
XDG_CURRENT_DESKTOP=X-Cinnamon
XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:<home>/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<user>
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=cinnamon
XDG_SESSION_ID=c2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
Full system file search for libGl.so
If you need anything else or for more testing - let me know.
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Regular

hehe, sometimes a lot of information is at the same time no information at all. Besides, the information provided by gambas is "ordered", I prefer raw data.Quincunxian said
You can also get the system information from Gambas.
Help [? menu] & System Information.
It gives a lot more data than the cat statement you provided.
locate fails to find libGl.so - assume that this is becaue the version on my machine is named libGl.so.1.7.0 (highlighted in red below)
In this case the information you send doesn't allow me to know if you have or don't have the libgl-dev package installed on your system.
Just to check I have uninstalled the package on my system, then gambas info continues to deliver the same information as before which is the same as the one you send.
<IMG src="https://imgur.com/DXvL35h.png">
</IMG>So that leaves us to check outside of gambas what is installed on your system, with apt or synaptic maybe.
I add some codeo to check it but you can do it by the terminal also:
dpkg-query -W -f='${Status}\n' libgl-dev
Posted
Expert


dpkg-query: no packages found matching libgl-dev
So that answers that question.
Next steps ?
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Regular

Quincunxian said
The output from the last command:
dpkg-query: no packages found matching libgl-dev
So that answers that question.
Next steps ?
if your distro is "Linux Mint 20.3 Una" wich is based on Ubuntu 20.04 LTS (Focal Fossa).
I read in the ubuntu package list there is libgl-dev:
Ubuntu – Error
Ubuntu – Error
Then in Ubuntu 22.04 LTS (Jammy Jellyfish) based versions there is also the package.
Apparently the package does not exist in previous versions like Ubuntu 18.04 (Bionic Beaver).
So your system is not 20.30, it is not up to date or there is some other problem whose solution is beyond my scope.
I don't use Mint, but try
sudo apt update && sudo apt dist-upgrade && sudo apt install libgl-dev
Sorry, but if you fail to install the libgl-dev package 3D Model viewer will not work.
Best regards.
Martin.
Posted
Expert


I'll give it a try and see where I get to.
Cheers - Quin.
I code therefore I am
I code therefore I am
Posted
Regular

Posted
Regular

Hello, a moment ago I uploaded the changes to fix this error.Technopeasant said
Installed from the Farm and got a type error.
I hope it works fine now.
Thanks for the feedback.
Martin.
Posted
Regular

Posted
Regular

Technopeasant said
That did get rid of the error, but I can not seem to find libgl-dev in the Fedora repositories.
ok, after creating a fedora 37 xfce virtual machine I have made a test and as the libGL library is not installed in the system I get the same error, but after installing the libglvnd-devel package everything works correctly.
<IMG src="https://i.imgur.com/WfNkv26.png">
</IMG>Best regards
Martin.
Posted
Regular

Quincunxian said
The output from the last command:
dpkg-query: no packages found matching libgl-dev
So that answers that question.
Next steps ?
Ok, after creating a linux mint xfce 21.1 virtual machine I installed gambas stable from PPA 3.17.3 and I couldn't find the library because it was not installed.
Then with the command apt search libgl-dev I found that the libgl-dev package does exist. Then with sudo apt install libgl-dev everything should be working correctly on your system, which is a linux mint 21.1 right?
<IMG src="https://i.imgur.com/KUMsqwc.png">
</IMG>Best regards
Martin
1 guest and 0 members have just viewed this.





