{"id":19746685,"url":"https://github.com/rwth-irt/scigl.jl","last_synced_at":"2026-02-11T17:34:51.482Z","repository":{"id":235008639,"uuid":"789900739","full_name":"rwth-irt/SciGL.jl","owner":"rwth-irt","description":"Efficient rendering in OpenGL and CUDA interop for julia","archived":false,"fork":false,"pushed_at":"2025-02-13T21:38:21.000Z","size":595,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T13:22:11.282Z","etag":null,"topics":["bayesian-inference","julia","opengl","pose-estimation","science"],"latest_commit_sha":null,"homepage":"https://rwth-irt.github.io/SciGL.jl/","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwth-irt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-21T21:15:02.000Z","updated_at":"2025-02-13T21:36:56.000Z","dependencies_parsed_at":"2025-02-28T00:17:23.431Z","dependency_job_id":"cc9d757a-8a6e-41d6-971d-106b8f676611","html_url":"https://github.com/rwth-irt/SciGL.jl","commit_stats":null,"previous_names":["rwth-irt/scigl.jl"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rwth-irt/SciGL.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FSciGL.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FSciGL.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FSciGL.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FSciGL.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwth-irt","download_url":"https://codeload.github.com/rwth-irt/SciGL.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FSciGL.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29339681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T16:14:43.024Z","status":"ssl_error","status_checked_at":"2026-02-11T16:14:15.258Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian-inference","julia","opengl","pose-estimation","science"],"created_at":"2024-11-12T02:15:29.194Z","updated_at":"2026-02-11T17:34:51.461Z","avatar_url":"https://github.com/rwth-irt.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Run Tests](https://github.com/rwth-irt/SciGL.jl/actions/workflows/run_tests.yml/badge.svg)](https://github.com/rwth-irt/SciGL.jl/actions/workflows/run_tests.yml)\n[![Documenter](https://github.com/rwth-irt/SciGL.jl/actions/workflows/documenter.yml/badge.svg)](https://github.com/rwth-irt/SciGL.jl/actions/workflows/documenter.yml)\n[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://rwth-irt.github.io/SciGL.jl)\n\n# About\nThis code has been produced during while writing my Ph.D. (Dr.-Ing.) thesis at the institut of automatic control, RWTH Aachen University.\nIf you find it helpful for your research please cite this:\n\u003e T. Redick, „Bayesian inference for CAD-based pose estimation on depth images for robotic manipulation“, RWTH Aachen University, 2024. doi: [10.18154/RWTH-2024-04533](https://doi.org/10.18154/RWTH-2024-04533).\n\n# SciGL.jl\nPort of [scigl_render](https://gitlab.com/rwth-irt-public/flirt/scigl_render) to julia.\n\nThe primary goal is to enable efficient rendering of multiple scenes and transferring the images to a compute device (CPU or CUDA) for **Sci**entific calculations.\n\n## examples\nTo run the examples, you need to activate the `examples` environment!\nI do not want to contaminate the main environment with the `Images.jl` packages.\n\n# Design Choices\nI try to incorporate existing Julia packages wherever possible.\nThe next section contains a list and use cases of the packages.\n\nFor performance, I use *Persistent mapping* and `glGetTextureSubImage` to transfer data between the GPU and CPU.\nThese functions require **OpenGL 4.5**, but I set the minimum version to **4.1** to support WSL2.\nIt seems like the drivers support the functions nevertheless.\n\n## Package Dependencies\n- [CoordinateTransformations](https://github.com/JuliaGeometry/CoordinateTransformations.jl): Representing and chaining transformations like rotations, translations, and perspective transformations.\n  [Rotations](https://github.com/JuliaGeometry/Rotations.jl) are handled by the equally named package.\n- [GLAbstractions](https://github.com/Tuebel/GLAbstraction.jl): Takes some of the low-level OpenGL pain away.\n  Manages the context, compiles shaders, and handles the buffers.\n- [ModernGL](https://github.com/JuliaGL/ModernGL.jl): Used by GLAbstractions to interface with the OpenGL driver.\n- [GLFW](https://github.com/JuliaGL/GLFW.jl): OpenGL context handling.\n- [MeshIO](https://github.com/JuliaIO/MeshIO.jl): Load mesh files like *.obj*, *.ply*, and *.stl*.\n  It uses the [FileIO](https://github.com/JuliaIO/FileIO.jl) interface, so this package is also included.\n\n## Reexport\nFor convenience commonly used symbols are reexported:\n- ColorTypes: AbstractRGBA, RGB, RGBA, Gray, red, blue, green, alpha\n- CoordinateTransformations: Translation\n- GLAbstraction\n- GLFW\n- Rotations: all symbols\n\n# HPC on Headless Server with VirtualGL\nInstall [TurboVNC](https://turbovnc.org/Documentation/Documentation) on the server which will be used to instantiate a render context without an attached display.\nThere are also good [instructions](https://github.com/JuliaGL/GLVisualize.jl/issues/146#issuecomment-289242168) on the GLVisualize github.\n\nUse the following script to launch julia with TurboVNC and NVIDIA as OpenGL vendor:\n```bash\n#!/bin/sh\nDIR=\"$(cd \"$(dirname \"$0\")\" \u0026\u0026 pwd)\"\nJULIA=$DIR/julia\n# VSCode reads the ouputs of julia -e using Pkg; println.(Pkg.depots())\n/opt/TurboVNC/bin/vncserver :6\nDISPLAY=:6 __GLX_VENDOR_LIBRARY_NAME=nvidia $JULIA \"$@\"%\n```\n\nMake the file executable via `chmod +x julia_nvidia.sh`\n\nMoreover, you can trick vscode that this file is the julia executable via the setting: \"julia.executablePath\": \"/path/to/julia/bin/julia_nvidia.sh\"\n\n\u003e **Tipp:** If you get an unknown CUDA Error (999) during OpenGL interop, you probably render to the integrated device instead of the NVIDIA\n\n# Devcontainer\nRecommended: Install the vscode [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) plugin and load the [devcontainer](https://code.visualstudio.com/docs/remote/containers).\nAlternatively install julia locally, activate and instantiate the SciGL.jl environment.\n\n## Switching GPUs\nOn Ubuntu 20.04 and other recent Linux distros, NVIDIA allows for on-demand switching between dedicated and integrated graphics.\nRendering on the NVIDIA GPU is mandatory if OpenGL-CUDA interop is required.\nYou can run julia with the environment variables set:\n```shell\n# NVIDIA GPU\n__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia julia script.\n# Integrated graphics\n__GLX_VENDOR_LIBRARY_NAME=mesa julia script.jl\n```\nYou can verify whether the NVIDIA GPU is used in a Julia program by the following command on the host:\n```shell\nnvidia-smi | grep julia\n```\n\n## Windows Subsystem for Linux (WSL2)\nMicrosoft [added](https://devblogs.microsoft.com/commandline/d3d12-gpu-video-acceleration-in-the-windows-subsystem-for-linux-now-available/) the Direct3D backend to the mesa driver in WSL2.\nOne drawback is that the driver version is not the latest, e.g., 4.2 for NVIDIA and 4.1 for Intel at the time of writing.\nYou can switch between the GPUs by setting the following environment variable:\n```shell\nMESA_D3D12_DEFAULT_ADAPTER_NAME=NVIDIA julia\nMESA_D3D12_DEFAULT_ADAPTER_NAME=Intel julia\n```\n\n## Debug in vscode\nLater versions of the Julia extension seem to have fixed the issue.\n\nThe vscode julia debugger crashes when loading the native OpenGL functions.\nEnabling the **Compiled Mode** as described [here](https://www.julia-vscode.org/docs/stable/userguide/debugging/) seems to be a workaround.\n\n## IJupyter\nBased on Jupyter, IJupyter can be used for explorative coding.\nTo use IJupyter, you have two choices:\n- Create a *.ipynb* file and open it in vscode.\n  The Jupyter extension will automatically launch the Jupyter server.\n- Launch `jupyter lab --allow-root` from an integrated terminal.\n  Hold Alt + Click the link to open the notebook.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwth-irt%2Fscigl.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwth-irt%2Fscigl.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwth-irt%2Fscigl.jl/lists"}