https://github.com/vimichael/2d-pygame-renderer-for-moderngl
Renders 2D elements using the Pygame library
https://github.com/vimichael/2d-pygame-renderer-for-moderngl
Last synced: 10 months ago
JSON representation
Renders 2D elements using the Pygame library
- Host: GitHub
- URL: https://github.com/vimichael/2d-pygame-renderer-for-moderngl
- Owner: vimichael
- Created: 2023-05-28T16:04:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-28T16:08:36.000Z (over 2 years ago)
- Last Synced: 2025-02-16T02:41:44.966Z (11 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2D-Pygame-Renderer-for-Moderngl
Renders 2D elements using the Pygame library
This is a simple script that converts a pygame surface to a moderngl texture and renders it to the screen.
This script works with a 3D context with little to no issues. Just make sure you disable depth testing before rendering.
I would recommend creating a new method (something like "pg_render") where you do all of your drawing onto the surface and convert at the end.
Make sure to call the destroy method upon closing the application as moderngl doesn't have garbage collection!
Thank you!