Generation

generate functionSun, 13 Nov 2022

get opengl texture data into libtorch tensor via cuda, then write the tensor data to new texture

#include <torch/torch.h> void get_texture_data(GLuint texture, int width, int height, torch::Tensor &out); void set_texture_data(GLuint texture, int width, int height, torch::Tensor &in);

Want to kickstart your project?Use the new AI Studio to create your code