i create the effect using D3DXCreateEffectFromFile, but it must be release before Reset
so how to let the system manage it, like putting D3DPOOL_MANAGED when calling CreateVertexBuffer
Jump to content
Posted 11 June 2013 - 02:29 PM
This is correct.
An Effect in D3D9 consists of vertex shaders, pixel shaders, state blocks and a whole load of CPU-side code. In D3D9 shaders will survive a lost device, but state blocks are one of those object classes that must be destroyed and recreated, so presumably that's what the Effect OnLostDevice/OnResetDevice calls do.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.