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);

Questions about programming?Chat with your personal AI assistant