moderngl / moderngl-window

A cross platform utility library for ModernGL making window creation and resource loading simple
MIT License
245 stars 60 forks source link

Add an SSAO example #161

Closed erikstrand closed 2 years ago

erikstrand commented 2 years ago

I've run it on Mac and Linux. It's a little slow when run with an integrated GPU.

I made one change to OrbitCamera. Previously, its matrix property computed its position (from angles and radius) and didn't save it. It's a bit of a hack, but now it calls self.set_position so that self.position reflects the last time the matrix was computed. I grepped for "OrbitCamera" and it looks like the only other place it's used is in examples/orbit_camera.py. That example still runs fine.

One question to consider: The dragon mesh I added is 6.8MB. Is it worth decimating it a bit to reduce the filesize?