Hello,
I my game I have always the same background image. but I need to display it in every ProcessNextFrame.
As creating this surface takes 40ms on my device, I'd like to create it once on start up and then blitting it to the backbuffer every time I need.
But it doesn't work if I don't create the surface right before blitting it...
the code :
I my game I have always the same background image. but I need to display it in every ProcessNextFrame.
As creating this surface takes 40ms on my device, I'd like to create it once on start up and then blitting it to the backbuffer every time I need.
But it doesn't work if I don't create the surface right before blitting it...
the code :
- Code:
virtual HRESULT ProcessNextFrame(CGapiSurface& backbuffer, DWORD dwFlags)
{
BackGround.CreateSurface(GDSURFACE_CLEAR, m_config.hInstance, IDB_FOND,NULL);
backbuffer.BltFast(0, 0, &BackGround;, 0, 0, 0);
[...]
}