r/opengl • u/Rayterex • 11h ago
r/opengl • u/Parvez_Shit • 15h ago
blackhole simulation using openGL and c++

i made a simulation of the blackhole gargantua that is also seen in intersteller
It's written in C++ and openGL
i managed to optimize it to a point i ran on my i3 intel iGPU, although i added very low to high quality toggles, it's my first time writing in glsl so yeah, i was a lot inspired by the yt video of Kavan about making a blackhole in cpp, so i just wanted to make it more realistic, my astrophysics lectures kinda came in clutch
github repository : https://github.com/dummy3ye/blackholegl (star the repo if you like it)
r/opengl • u/sharjith • 1d ago
ModelViewer 2026.11: I added a CPU/OptiX ray tracer next to the OpenGL PBR renderer
Some of you saw earlier versions of ModelViewer. The new release (2026.11) is the biggest one yet.
The raster side is still OpenGL: PBR with the glTF KHR material extensions (clearcoat, transmission, iridescence, sheen), shadows, AO, and section views. New is a ray tracer, Embree on the CPU and OptiX on NVIDIA GPUs, with OIDN denoising, plus a live hybrid mode that blends the two in the viewport. Making the ray-traced and raster images agree on materials and lighting was the hardest part, and I'm still working on it.
It also gained a simulation-results viewer (VTK, CalculiX, Exodus, OpenFOAM), 3D data plotting, and measurement and mesh tools. Free and open source (GPL-3.0), Windows and Ubuntu.
Release: https://github.com/sharjith/ModelViewer-Qt/releases/tag/Release-2026.11.0
Video tutorials: https://www.youtube.com/playlist?list=PLffd2GzvPeAY
Happy to answer questions about the renderer, and I'd welcome feedback on anything that looks wrong.
r/opengl • u/Trichord808 • 1d ago
Island Demo (Portfolio Project) - A glMultiDrawElementsIndirectCount Renderer
Good Evening r/OpenGL! This project started off as LearnOpenGL tutorials and slowly morphed into a heavily GPU driven renderer, so that my school laptop wouldn't die running it :) It's not really an 'engine', its a finished, one-off demo to show off what I learned.
I modeled the island myself and put a lot of time into picking assets that I could actually host on GitHub. I'd love to hear any feedback you have on the repo, the demo, anything really.
Slight annoyance: the pre-compiled binary will have the "untrusted developer" pop-up from Windows Defender SmartScreen. Seems getting a certificate is not exactly cheap these days.
Thanks!
Repo:
https://github.com/Trichord/Island-Graphics-Demo
Direct Download:
https://github.com/Trichord/Island-Graphics-Demo/releases/download/v1.0.0/IslandDemo-windows-x64.zip
r/opengl • u/ChaosTheDevil • 2d ago
I still remember when it was an RGB triangle...
Since my first triangle I always wanted to get to find out what it takes to make an actual game.
The difference between my graphics demo apps and full games just felt like unknowable magic, but now I feel like the secret ingredient is lots of combined layers of work.
This is the first project I’ve taken all the way to the point of being a full game, and it feels surreal.
The project has been 15 years of engine dev, and 6 years of game dev. I wanted to push myself to make a 3d platformer in the ps1 style, and even with all the changes in tech that have happened in that time, I’m really happy with how I spent those years.
If your interested in checking it out, I just released the demo for NextFest!
r/opengl • u/ovenmittheels • 3d ago
Setup on Intel Mac without Homebrew
Does anyone have a nice way to setup OpenGL for Intel Macs? I feel like it became so much more complicated when Homebrew stopped working.
I'm new to OpenGL and I have tried to puzzle together different tutorials just to understand the general idea. From what I have understood, GLFW and GLAD are kind of necessary, and I guess I should setup with CMake from the beginning. I've heard Xcode is simpler, but I have more experience with VS Code from using Windows. So far I've failed my setup multiple times on both.
I know I can download the library files without Homebrew. I just have a hard time understanding what goes where, and the tutorials contain A LOT of manual setup (and every tutorial does it differently).
And that brings up my next question. What's your routine when setting up a new project? Do you have a base folder that you copy? Do you go through the manual setup process every time? Or is there another easier way that I have missed?
I'm excited to learn OpenGL but the setup is really getting in the way.
r/opengl • u/MuffinCompiler • 4d ago
I managed to crash AMD's OpenGL driver by adding a comment to a GLSL shader
The other day, I was debugging a rather weird crash in the AMD OpenGL driver when linking a fairly complex GLSL shader on Windows.
It was really frustrating. The crash seemed almost random. Moving some code around, removing seemingly unrelated functions, or even just adding a comment could make it appear or disappear.
After quite some time narrowing it down, I eventually discovered something absolutely ridiculous: Having the literal word main in a comment before the shader's entry point can crash the AMD driver.
Of course, there are some additional conditions involved (GLSL subroutines, in particular), but I've managed to reduce it to a tiny reproducible example.
#version 430
// main <----
subroutine vec3 gradType(vec3 p);
subroutine uniform gradType grad;
subroutine(gradType) vec3 gradA(vec3 p) { return p; }
vec3 f(vec3 p) { return grad(p); }
void main() {}
The shader compiles just fine, but glLinkProgram crashes the application with 0xC0000409 (STATUS_STACK_BUFFER_OVERRUN). Remove the comment in line 2, edit it, spell Main capitalized, write mainly instead, or move the comment below main() and it links!
I find this absolutely hilarious and terrifying at the same time. Thought some of you might appreciate this little gem of a driver bug.
Anyway, here's the minimal reproducer, tested on an RX 7900 GRE with drivers 26.8.1 and 26.9.2 on Windows 11. Would be interesting whether that happens on other AMD drivers or different systems, too.
https://github.com/MuffinCompiler/amd_glsl_main_comment_crash
r/opengl • u/ForeverVivid4041 • 5d ago
My mobile city and traffic sandbox: C++ core, OpenGL ES 3 on Android, Metal on iOS
Hi r/opengl! I wanted to share the technology behind Traffic Sandbox: City Builder, a solo-developed mobile project now available on Android and iOS.
The game uses a custom native C++ core rather than Unity or Unreal. Android renders with OpenGL ES 3, while the iOS version uses Metal. Both share the core simulation logic.
The current systems include:
- Runtime terrain editing: raise, dig, flatten and smooth.
- Procedural road geometry generated from freehand input.
- A road network used for routing and lane-based vehicle movement.
- Buildings and traffic connections that support town growth.
The interesting challenge is that the world isn’t static: players can edit the terrain and road network while the simulation is running. Keeping road geometry, vehicle placement and rendering consistent is an ongoing part of development.
My next focus is profiling larger scenes on real devices and improving behaviour around complex junctions.
I’d be interested in hearing from others working with editable geometry on mobile OpenGL ES: what helped you most when profiling mesh updates and GPU buffer uploads?
Android:
https://play.google.com/store/apps/details?id=com.BuildingSand.game
iOS:
https://apps.apple.com/tr/app/traffic-sandbox-city-builder/id6816645498?l=tr
r/opengl • u/Nokris666 • 6d ago
A molecule viewer (first small OpenGL Project)
galleryI started a small OpenGL Project where you can load .pdb models of molecules from rcsb.org and view them, I also added a volumetric view for them.
It's pretty barebones, I plan to make the configuration simpler so you can swap molecules during runtime and the volumetric rendering should look a lot nicer.
Maybe it would also be possible to add the computation for the volumetric models instead of having VMD do it.
For now I'm glad I managed to implement the volumetric rendering properly, the molecule view itself was relatively easy though.
I'd love to hear some opinions/suggestions, please remember it's just a start though and I didn't do much on github before this. Thanks! :)
Here's the github link if you're interested:
https://github.com/Nokris01/molecule-viewer
The molecules you can see in the pictures are:
11ON
37NQ
9ZZZ
r/opengl • u/Health_engine • 8d ago
A simple showcase of the lighting system, featuring dynamic shadows and a day-night cycle as sunlight gradually illuminates the scene
A simple showcase of the lighting system, featuring dynamic shadows and a day-night cycle as sunlight gradually illuminates the scene.
r/opengl • u/ayoubdeadbeef • 8d ago
ElectroBench : an open source GPU benchmark based off OpenGL for low-end PCs
I started this project in 2022 as a means to just show something at the Google DevFest 2022 conference in Agadir, Morocco and as a way to learn graphics programming, back then it was pretty awful, only a spinning teapot, and newer versions added lighting, procedural texture through perlin noise and other noise algorithms superposed on each other but that was it.
A year ago I changed the code quite a lot and managed to load OBJs on it. It was broken but I had school so I had to leave it there.
4 weeks ago I decided that I would reset the codebase and start off from the latest version (that was still broken and had a few bugs) that was available on my GitHub.
After 4 weeks of hard work, skipping classes, my Toshiba P200's charger burning in the middle of my working session. I present ElectroBench
It's a 4 scene benchmark, and even explaining what it does is gonna take an essay. First scene uses OpenGL 2.1 (for compatibility with my older daily driver), all the others use 3.3 OpenGL (for modernity's sake and also because my Toshiba P200's GPU supported OpenGL 3.3). The benchmark renders at 720p fullscreen
I've also managed to compile release builds for Windows. Linux and Mac users can compile it from source or wait for me to get my Linux laptop and my M4 MacBook Air out of my mother's confinement.
Anyway guys here is the benchmark : https://github.com/deadbeef7/ElectroBench
Windows users can grab release 0.4, there is a 32 bit version (compatible with XP) and a 64 bit version.
Guys please tell me overall score if you tested it with your hardware specs and any new ideas for the benchmark.
r/opengl • u/DefinitelyNotEmu • 9d ago
Physics Ball
This ball is an axis-aligned-bounding-box (AABB) and is super cheap to calculate physics.
physics.py - part of the Fio game creation toolkit (github.com/ViciousSquid/Fio)
r/opengl • u/Adriz_Xade • 10d ago
This is my custom engine's Render Window and Keyframe animation,Gameplay, In-built Vegetation........
v.redd.itr/opengl • u/Longjumping_Shirt953 • 12d ago
Opengl mipmaps only work on horizontal surfaces not vertical surfaces.
Hi I am trying to make a Minecraft clone in opengl for learning and school purposes, but the mipmaps only work on the floor and roof not on the sides at all ive tried messing with my texture and mipmap settings but nothing has fixed it ive even looked into my meshing code because I thought it might be an issue with flipped sides but that wasnt it either does anyone know how to fix this?

r/opengl • u/Health_engine • 13d ago
Reflections in Dark Environments
On October 10, the engine will be officially released. A free trial version will also be available before purchasing, so you can try it out first. 🙏
r/opengl • u/bensanm • 14d ago
The (now) shadowed billboards congregate around a test box (C++/OpenGL/GLSL)
galleryr/opengl • u/Informal-Bluebird217 • 16d ago
Pokemon Otherside Open GL 2.0
Bonjour, j'essaie de lancer ce jeu depuis hier mais cela m'affiche toujours que ce jeu nécessite une version open gl 2.0 ou supérieur, ma carte graphique supporte 3.1.
Savez vous quel est le souci ? Merci bien !
r/opengl • u/Fishfrothemeditrean • 18d ago
My first proper multi object scene in opengl es!!!!!!!!
I made this pyramid orbiting a cube using opengl es, glm 1.0, and sdl2(for the window) all on android im soooo happy and i hope others find good resources for opengl and opengl es because almost all resources are very bad. Maybe one day i could be teaching opengl es!!!
r/opengl • u/Japanga • 19d ago
Game engine in OpenGL
youtu.beWorldsGL is a game engine I wrote in Java/Python with OpenGL libraries. Learn more about the project at https://worldsgl.pages.dev!
