void* buf = drm_buf_alloc(width, height, bpp, &fd, &handle, &size, flags); if (buf == nullptr) { std::cerr << "Failed to allocate DRM buffer!" << std::endl; return -1; } std::cout << "DRM buffer allocated successfully:" << std::endl; std::cout << " FD: " << fd...