Funny proof of concept here.
This commit is contained in:
commit
68e9f04b4a
12 changed files with 1151 additions and 0 deletions
34
zscript/ft_testhandler.zsc
Normal file
34
zscript/ft_testhandler.zsc
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// let's test that this madness works, then
|
||||
Class FireTextureTestHandler : StaticEventHandler
|
||||
{
|
||||
ui FireTexture testme;
|
||||
ui TextureID testtex;
|
||||
ui double timers[3];
|
||||
|
||||
override void UiTick()
|
||||
{
|
||||
if ( testme && testme.Initialized() )
|
||||
{
|
||||
timers[0] = MSTimeF();
|
||||
testme.Tick();
|
||||
timers[1] = MSTimeF();
|
||||
testme.Render();
|
||||
timers[2] = MSTimeF();
|
||||
}
|
||||
}
|
||||
|
||||
override void RenderOverlay( RenderEvent e )
|
||||
{
|
||||
if ( !testme ) testme = FireTexture.Load("Pad_FX.ftx");
|
||||
if ( !testme.Initialized() ) return;
|
||||
if ( !testtex.IsValid() ) testtex = TexMan.CheckForTexture("Pad_FX");
|
||||
Screen.DrawTexture(testtex,false,8,8,
|
||||
DTA_ScaleX,CleanXFac_1,DTA_ScaleY,CleanYFac_1);
|
||||
Screen.DrawText(NewSmallFont,Font.CR_RED,16+testme.GetWidth()*CleanXFac_1,16,
|
||||
"← procedural texture running in real time\n no japes here",
|
||||
DTA_ScaleX,CleanXFac_1,DTA_ScaleY,CleanYFac_1);
|
||||
Screen.DrawText(NewSmallFont,Font.CR_RED,16,16+testme.GetHeight()*CleanYFac_1,
|
||||
"tick: "..(timers[1]-timers[0]).."ms\nrender: "..(timers[2]-timers[1]).."ms",
|
||||
DTA_ScaleX,CleanXFac_1,DTA_ScaleY,CleanYFac_1);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue