No one has posted a working version compatible with the latest version of BMax. And no one has posted a version compatiblel with both OGL and Bmax.
I find it truely amazing that you had actually found time to post that in your busy life... For what good it was! Oo
This process is called "Render To Texture" btw.
Offically, by the nice chaps who make the DirectX API, they are called Render Targets...
http://msdn.microsoft.com/en-us/library/bb976073.aspx... btw
But, your probably too busy to read it! :P Hehehe
Can you please post a working example so I can get a better idea how it works?
Basically, its no more than what I've posted up there in C++, the one thing you have to remember is that the backbuffer is also a render target, so after you've setup DirectX, you need to grab the backbuffer surface too:-
pD3DDevice->GetRenderTarget(0,&pBackBuffer);
Then, when you want to return drawing to the back buffer, you use:-
pD3DDevice->SetRenderTarget(0,pBackBuffer);
When you generally setup a render target in DirectX , it starts off as non transparent black, which is obviously a bit of a bugger... BUT, you can clear the target with 0 alpha, then draw on it as usual.. Which creates a masking effect (Doesnt work on the backbuffer though)! :)
This is all in DirectX9 (Though, I wouldnt have a clue about DirectX7) and is currently implemented in my own engine which I'm building.
Dabz