首页 > 代码库 > switch GPU sync object

switch GPU sync object

init:

NxDevice m_Device; // is nvn::Device child class
NxQueue m_Queue; //is nvn::Queue  child class

nvn::Window* m_pWindow;

 

nvn::Sync m_DisplaySync;

m_DisplaySync.Initialize(&m_Device);

 

scenebegin:

m_pWindow->AcquireTexture(&m_DisplaySync, &(GetPerFrameBuffer().m_bufferIndex));

 

sceneend:

m_DisplaySync.Wait(NVN_WAIT_TIMEOUT_MAXIMUM);

 

deconstruct:

m_DisplaySync.Finalize();

switch GPU sync object