10-24-2018, 05:17 PM
Congratulations! That is the idea, to use a streaming texture (optimized for frequent writes) as the target surface, and the use that texture inside the regular rendering pipeline of the framework.
I recommend you a change inside the code: use the Engine method UpdateFrame() instead of the BeginFrame() / DrawNextScanline() pair:
I exported those methods for situations where the use of callbacks (delegates in C# terminology) is not possible on the binded language, so one must do active calls of the rendering scanlines AND the raster effect function. That's not the case in C#.
Take a look at this link. It explains the original C API, but you got the idea:
http://www.tilengine.org/doc/page_render.html
I recommend you a change inside the code: use the Engine method UpdateFrame() instead of the BeginFrame() / DrawNextScanline() pair:
Code:
void Update () {
trialEngine.UpdateFrame(Time.frameCount);
trialTexture.LoadRawTextureData(trialBuffer);
trialTexture.Apply();
}
I exported those methods for situations where the use of callbacks (delegates in C# terminology) is not possible on the binded language, so one must do active calls of the rendering scanlines AND the raster effect function. That's not the case in C#.
Take a look at this link. It explains the original C API, but you got the idea:
http://www.tilengine.org/doc/page_render.html