if (m_rcv.ReceiveImage(m_pBuffer))
{
if (m_rcv.IsUpdated()) {
SAFE_DELETE_ARRAY(m_pBuffer);
int width = m_rcv.GetSenderWidth();
int height = m_rcv.GetSenderHeight();
m_format = m_rcv.GetSenderFormat();
m_bufferSize = width * height * 4;
m_pBuffer = new byte[m_bufferSize];
}
double fps = m_rcv.GetSenderFps();
return SPOUT_ERR_OK;
}
Where m_rcv is SpoutReceiver. It works on my desktop, but it doesn’t work on my notebook, notebook specs: Lenovo Yoga 2, i5-12500H, 16GB Ram, Intel Iris Xe and nVidia GeForce RTX 2050 as graphic cards.
When I test the Spout using OBS on this notebook, it works well. But my code doesn’t (even though the m_rcv.ReceiveImage returns true). The buffer is always full of 0. Any idea, what might go wrong?
Most likely this is a dual graphics notebook with integrated graphics. All programs have to use the same GPU. The easiest way is to use Windows Graphics Settings and set all spout programs to high performance. You can also use Nvidia control panel to create a high performance profile for each program.