garbage collection
This commit is contained in:
@ -6,12 +6,14 @@ import moderngl
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from konabot.plugins.marchtoy.command import Scene
|
||||
async def render(instruction: str, res: tuple[int, int]):
|
||||
fs = Scene(instruction).compile()
|
||||
|
||||
async def render(command: str, res: tuple[int, int]):
|
||||
fs = Scene(command).compile()
|
||||
PATH = pathlib.Path(__file__).parent / "shaders"
|
||||
with (PATH / "vert.glsl").open(encoding='utf-8') as f:
|
||||
vs = f.read()
|
||||
ctx = moderngl.create_context(standalone=True)
|
||||
ctx.gc_mode = "auto"
|
||||
try:
|
||||
program = ctx.program(
|
||||
vertex_shader=vs,
|
||||
|
||||
Reference in New Issue
Block a user