Oh, sorry, I didn't answer all of your questions -- Yes, in HWA, the frame redraws completely every time. There's no way to preserve any data.





Oh, sorry, I didn't answer all of your questions -- Yes, in HWA, the frame redraws completely every time. There's no way to preserve any data.


Humm I was just thinking, in HWA you can pull the background surface while the frame is redrawing before shaders are composited on the frame by any object using the background register. Is it plausible an extension could grab this texture from the DX9 pipeline and save it to a buffer? I mean using pixel shaders, you can use the <backgroundtexture> parameter and it will send the background to (s1), but this texture is the compiled-in-order one thats being assembled in MMF2. If you had an object as large as your entire window, and pulled the background texture, it should be the entire frame, with everything behind it rendered and nothing in front of it (or the frame's effects).
I could easily pass this texture to the surface object via pixel shader, but it would be volatile and disappear after the first frame, I don't know any way to save data in a pixel shader
Just thinking hypothetically





No idea, sounds unlikely. It's not like you really get to do anything in Direct3D at all, all you get are 2 or 3 new image buffer types that represent textures etc. - you can't actually draw anything via Direct3D, except with an overriden Blit() function that also allows rotation and scaling... I could send Yves a PM about this, I guess. I presume that it's not possible with the current runtime though.


The trickiness I see is that even if you could have a function to pull the texture from memory when its assembled, it wouldn't work through the editor interface anyway, since the texture is only composited at the end of each event eval loop, and before or after then all you can see is the fully drawn frame. So anything would have to be interjecting itself in the dx9 pipeline, which almost certainly isn't possible via the mmf2 extension architecture, it would have to be hard coded. The only way I could see it working is if there was some way to export a texture from DX9 back to MMF2 outside of the normal pipeline, and you definitely can't do that via a pixel shader
And its not worth the effort, I was just a little curious since it could extend a function of my engine. I'm just writing a fade transition from level to level, and I can do it by saving the frame to a surface and applying a pixel shader that fades out the alpha in all sorts of fancy ways. The problem is that my game uses a shader to rotate the full frame's display, and even if I wanted to pull the rotated display, rotate it back in the surface, and have it rotated via shader when drawn, besides the lossy artifacts from 3x rotations it would be potentially missing the corners on the display because of the whole circle-circumscribed-within-a-square thing repeated twice
But like I was saying, its not a big issue since I can work around it by just ensuring all the level changes that use that transition take place from Angle = 0 to Angle = 0, or maybe even equal angles.





Alright. I can see what you mean though. I really hope MMF3's SDK will be much, much more open. Since HWA will be the default runtime for MMF3, we should easily be able to mess with any texture or shader etc. so that complex graphical effects can be written.








For some reason with the currten version, when ever i try to "save file" it crashes my app?
Anyone else experiencing this?
Thanks
Andy





Thanks for finding. I added Unicode support ages ago, when I still didn't know how to do it properly. Mixed up header files and confusions led to me linking to wrong functions, causing any File IO related stuff not to function properly
Update:
* Fix file saving / Unicode support
* Allow floating-point angles in HWA version
http://clickteam.info/looki/Extensio...Surface1.5.zip









458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm





Ah, thank you Marv! I always write down the URL by hand and don't check it. I guess I should start actually checking if it's the right one...
http://clickteam.info/looki/Extensio...Surface1.5.zip









Thanks for your work Looki.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm