{"id":31936510,"url":"https://github.com/shlomnissan/vglx","last_synced_at":"2025-10-14T07:43:16.762Z","repository":{"id":291422152,"uuid":"838069756","full_name":"shlomnissan/vglx","owner":"shlomnissan","description":"✨ A fast cross-platform 3D rendering engine for modern C++","archived":false,"fork":false,"pushed_at":"2025-10-06T14:59:20.000Z","size":18566,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T16:29:50.972Z","etag":null,"topics":["3d","cpp","opengl","rendering","vulkan"],"latest_commit_sha":null,"homepage":"https://vglx.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shlomnissan.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-04T21:10:45.000Z","updated_at":"2025-10-06T14:59:24.000Z","dependencies_parsed_at":"2025-07-01T21:28:17.642Z","dependency_job_id":"9f881c63-3be0-4c94-9a27-f0d95224bda8","html_url":"https://github.com/shlomnissan/vglx","commit_stats":null,"previous_names":["shlomnissan/engine","shlomnissan/gleam-engine","shlomnissan/gl3x","shlomnissan/vglx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shlomnissan/vglx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlomnissan%2Fvglx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlomnissan%2Fvglx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlomnissan%2Fvglx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlomnissan%2Fvglx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shlomnissan","download_url":"https://codeload.github.com/shlomnissan/vglx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlomnissan%2Fvglx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018217,"owners_count":26086308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["3d","cpp","opengl","rendering","vulkan"],"created_at":"2025-10-14T07:43:09.020Z","updated_at":"2025-10-14T07:43:16.748Z","avatar_url":"https://github.com/shlomnissan.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VGLX\nA fast cross-platform 3D rendering engine for modern C++.\n\n![ubuntu-badge](https://github.com/shlomnissan/vglx/actions/workflows/ubuntu.yml/badge.svg)\n![windows-badge](https://github.com/shlomnissan/vglx/actions/workflows/windows.yml/badge.svg)\n![macos-badge](https://github.com/shlomnissan/vglx/actions/workflows/macos.yml/badge.svg)\n[![docs-badge](https://img.shields.io/badge/docs-online-blue.svg)](https://shlomnissan.github.io/vglx/)\n\n## Table of Contents\n- [Overview](#overview)\n- [Features](#features)\n- [Getting Started](#getting-started)\n   - [Requirements](#requirements)\n   - [Dependencies](#dependencies)\n   - [Building VGLX](#building-vglx)\n   - [Installation and Usage](#installation-and-usage)\n- [Documentation](https://shlomnissan.github.io/vglx/)\n- [Asset Generation Pipeline](#asset-generation-pipeline)\n- [License](#license)\n\n---\n\n## Overview\n\nVGLX is a lightweight, high-performance 3D rendering engine written in modern C++. It follows a clean, scene-oriented architecture that provides fine-grained control over rendering, lighting, and assets through a minimal and expressive API. Built for native performance and modularity, VGLX is ideal for interactive tools, visualization applications, and real-time rendering workflows that don't need the weight of a full game engine.\n\n## Features\n\n- Real-time forward renderer – Cameras, meshes, lighting, and materials supported out of the box.\n- Cross-platform – Runs on Windows, macOS, and Linux with consistent behavior.\n- Modern C++ architecture – Written in C++23 with strong typing and minimal overhead.\n- Windowing and event system – Built-in support for input and context management.\n- Flexible lighting system – Directional, point, and spot lights with attenuation support.\n- Rich material system – Supports multiple shading models and user-defined shaders.\n- Precompiled asset pipeline – Converts raw assets into optimized GPU-ready formats.\n- Constexpr-first math – Header-only types and math utilities designed for compile-time use.\n- Strong API boundaries – Internal symbols are hidden; public interface is clearly scoped.\n- Comprehensive documentation – Grouped, consistent, and cross-linked via [Doxygen](https://doxygen.nl/).\n\n## Getting Started\n\nThis section covers how to build VGLX, install it, and integrate it into your own project. VGLX is easy to consume: all dependencies are vendored, and no global packages are required.\n\n### Requirements\n\nVGLX requires a C++23-compatible toolchain, CMake 3.20 or newer, and an OpenGL 4.1+ context. It is actively tested on:\n\n- ![Ubuntu](https://raw.githubusercontent.com/EgoistDeveloper/operating-system-logos/master/src/16x16/UBT.png) 24.04 and GCC 11.3.0\n- ![macOS](https://raw.githubusercontent.com/EgoistDeveloper/operating-system-logos/master/src/16x16/MAC.png) macOS 14 and Clang 15.0.0\n- ![Windows](https://raw.githubusercontent.com/EgoistDeveloper/operating-system-logos/master/src/16x16/WIN.png) Windows 10 and MSVC 19.44\n\n### Dependencies\n\nVGLX vendors all required libraries directly into the repository. The only runtime dependencies are:\n\n| Dependency | Version  | Location        | Description |\n|------------|----------|----------------|-------------|\n| Glad   | 0.1.36   | `vendor/glad`  | OpenGL function loader generated from [glad.dav1d.de](https://glad.dav1d.de/). |\n| GLFW   | 3.5.0    | `vendor/glfw`  | Cross-platform window/input/context management (with minor internal modifications). |\n| ImGui  | 1.92.1   | `vendor/imgui` | Optional immediate-mode UI library for in-engine tools and examples. |\n\nEach dependency includes license information in its respective `vendor/` folder. Additional libraries may be used in asset tooling but are not part of the engine runtime.\n\n### Building VGLX\n\nVGLX uses [CMake](https://cmake.org/download/) to configure and build the project. You can toggle build components using options or presets.\n\n#### CMake Options\n\nThe following options control which components are built:\n\n| Option                 | Description                                              |\n|------------------------|----------------------------------------------------------|\n| `VGLX_BUILD_DOCS`     | Build Doxygen documentation.                             |\n| `VGLX_BUILD_EXAMPLES` | Build example applications.                              |\n| `VGLX_BUILD_IMGUI`    | Enable ImGui support for debug UI/tools.                 |\n| `VGLX_BUILD_TESTS`    | Build unit tests.                                        |\n| `VGLX_BUILD_TOOLS`    | Build command-line tools.                                |\n\nDefaults are preset-dependent.\n\n#### CMake Presets\n\nTo streamline the build process, VGLX provides a set of [CMake presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) with common configurations:\n\n- `dev-debug` – Debug build with all features enabled.\n- `dev-release` – Optimized build with tools and examples.\n- `install-debug` – Debug build for install (used by MSVC).\n- `install-release` – Optimized release build for install.\n\n#### Build Instructions\n\n```bash\n# Clone the repository\ngit clone --recursive https://github.com/shlomnissan/vglx.git\ncd vglx\n\n# Create output directory\nmkdir build\ncd build\n\n# Configure with a preset\ncmake .. --preset dev-debug --config Debug\n\n# Build the engine\ncmake --build . --config Debug\n```\n\nIf examples are enabled, you can run them to verify that everything is working as expected.\n\n### Installation and Usage\n\nVGLX can be installed via the provided script and integrated into your project using CMake’s standard `find_package` and `target_link_libraries` pattern. Alternatively, you can link VGLX manually by including headers and linking the compiled library directly.\n\n#### Install Script\n\n- macOS/Linux: `sudo scripts/install.sh`\n- Windows (PowerShell as Admin): `scripts\\install.bat`\n\nThe script uses the `install-release` preset on Unix. On MSVC, both `install-debug` and `install-release` are installed due to ABI differences. Elevated privileges are required in both cases. By default, VGLX is installed as a **shared library**. This enforces a clean API boundary and hides internal symbols using platform-specific visibility controls.\n\n#### CMake Integration\n\n```cmake\nfind_package(vglx REQUIRED)\ntarget_link_libraries(MyApp PRIVATE vglx::vglx)\n```\n\nCMake automatically selects the correct configuration (Debug/Release) based on your project settings.\n\n#### Platform Notes\n\n- VGLX disables RTTI by default. You can match this in your project:\n  ```cmake\n  target_compile_options(MyApp PRIVATE\n    $\u003c$\u003cCXX_COMPILER_ID:GNU\u003e:-fno-rtti\u003e\n    $\u003c$\u003cCXX_COMPILER_ID:Clang\u003e:-fno-rtti\u003e\n    $\u003c$\u003cCXX_COMPILER_ID:AppleClang\u003e:-fno-rtti\u003e\n    $\u003c$\u003cCXX_COMPILER_ID:MSVC\u003e:/GR-\u003e\n  )\n  ```\n- On MSVC: You may need to copy the VGLX DLL next to your executable. Automate this with:\n  ```cmake\n  if(WIN32)\n    add_custom_command(TARGET MyApp POST_BUILD\n      COMMAND ${CMAKE_COMMAND} -E copy_if_different\n      $\u003cTARGET_FILE:vglx::vglx\u003e\n      $\u003cTARGET_FILE_DIR:MyApp\u003e\n    )\n  endif()\n  ```\n\n## Asset Generation Pipeline\n\nVGLX does not parse raw assets at runtime. Instead, assets are preprocessed using asset_builder, a command-line tool built with `VGLX_BUILD_TOOLS`. It converts raw asset formats into compact, runtime-ready formats.\n\n#### Supported Formats\n\n| Input          | Output | Type    | Description |\n|----------------|--------|---------|-------------|\n| `.png`, `.jpg` | `.tex` | Texture | Converts 2D images into a GPU-ready format |\n| `.obj`         | `.msh` | Mesh    | Converts geometry and material files for runtime loading |\n\n#### Usage\n\n```bash\nasset_builder --input model.obj\nasset_builder --input texture.png --output texture.tex\n```\n\n#### Building `asset_builder`\n\n`asset_builder` is built by default with any CMake preset. If installed with VGLX, it will be available on the system `PATH` by default on Unix systems. On Windows, you may need to add it manually, for example: `$env:PATH += \";C:\\path\\to\\vglx\\bin\"` in PowerShell.\n\n## License\n```\n ________  ___      ________     ___    ___\n|\\   ____\\|\\  \\    |\\_____  \\   |\\  \\  /  /|\n\\ \\  \\___|\\ \\  \\   \\|____|\\ /_  \\ \\  \\/  / /\n \\ \\  \\  __\\ \\  \\        \\|\\  \\  \\ \\    / /\n  \\ \\  \\|\\  \\ \\  \\____  __\\_\\  \\  /     \\/\n   \\ \\_______\\ \\_______\\\\_______\\/  /\\   \\\n    \\|_______|\\|_______\\|_______/__/ /\\ __\\\n                                |__|/ \\|__|\n\n\nCopyright (c) 2024–present Shlomi Nissan\n\nThe MIT License (MIT)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlomnissan%2Fvglx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshlomnissan%2Fvglx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlomnissan%2Fvglx/lists"}