I need to create a new texture every frame. What happens with previous textures? Looks like they don’t unload, because dmengine use more and more memory.
local header = {width = SCREEN.WIDTH, height = SCREEN.HEIGHT, type = resource.TEXTURE_TYPE_2D, format = resource.TEXTURE_FORMAT_RGB, num_mip_maps = 0}
resource.set_texture(self.resource_path, header, SCREEN.BUFFER)