def run(title, data_seed, **kwargs): LOG.info('run title: %s', title) context = RunContext('/scratch/jtb470/ssl_j/', __file__, "{}".format(data_seed)) main.args = parse_dict_args(**kwargs) main.main(context)
self.quad = self.gl.vertex_array(program, [(vb, "4f", "in_pos")], ib) self.uniform("u_resolution", (WIDTH, HEIGHT)) self.GX, self.GY, self.GZ = WIDTH // 8, HEIGHT // 8, 1 self.cs_init.run(self.GX, self.GY, self.GZ) print("compiled") except Exception as e: print(e) def render(self): if self.swap: self.buffer_0.bind_to_storage_buffer(0) self.buffer_1.bind_to_storage_buffer(1) else: self.buffer_0.bind_to_storage_buffer(1) self.buffer_1.bind_to_storage_buffer(0) self.swap = not self.swap self.cs_update.run(self.GX, self.GY, self.GZ) self.quad.render() if __name__ == "__main__": from main_2 import main main()