Quote:Original post by Evil SteveOk sounds good to me.:PQuote:Original post by CarlMLRendering will probably fail, or may display corrupt. If it works on your card, then that's just luck. If the texture is locked, it means that the CPU is accessing it. Because the GPU can be up to 2.5 frames behind the CPU, the GPU might not read the texture at the time you render, but might try to read it at some other point, after you've modified the texture again, or even in the middle of a memcpy() operation.
A question though... what happens if you lock the texture, alter pixel data and then display the texture without unlocking? Then unlock after displaying. In my test there doesn't seem to be any issue with doing that and the texture is displayed ok. Could it lead to issues?
The Debug Runtimes will probably shout at you for doing that, and I suppose it's technically possible to crash the video card driver and bring down the whole system in an absolute worst case scenario.
Nah, but what I'm doing is rendering the mesh along with the texture manually at a certain time so there shouldn't be anything else trying to access the texture at that time. It could be as you say I'm just having luck with my card though. I might be back to locking/unlocking twice then argh.. unless I want to do a super hack and check in a hundred places if the texture needs to be reset before doing something.