Update: actually it doesn't work in freshly restarted ZGE Preview either until the RenderTarget1.ClearBeforeUse is ticked on and then ticked off again.
Are you using the ZGameEditor.exe I provided in the RenderText thread? That will generate incorrect binaries until I've rebuilt the runtime engines to match the changes.
It doesn't want to render on my end, I must be doing something wrong - will investigate a bit more during the week (I think I'm about to catch a cold) and report back.
The beta is updated with my change that makes it work 100% in preview, but I notice now that it is still black in exe-file. I notice something unusual with your project though, you do some rendering in OnBeginRenderPass. I would try to just set things up in OnBeginRenderPass and then do the actual rendering in App.OnRender, using Condition component and testing App.CurrentRenderPass. That is how it is meant to be used. Also you seem to have App.RenderPasses set to 1 and I'm not sure if that is intentional.
You can ignore OnBeginRenderPass completely and render all in one renderpass, see Projects/RenderTexture demo project.
Hey Ville, how does RenderPass affect things that are rendered in a model? I see that the example for RenderPass has the rendering part wrapped in "return 1;//App.CurrentRenderPass>=0;", why is that? (Maybe just to hint at possibilities and encourage people like me to experiment.)
If the number of rendering passes is set to 2, is the model actually rendered twice unless the OnRender events are wrapped in a condition? As you can see I'm completely clueless as to how this works I tried to test it and it seems this is indeed the case:
Yes, indeed everything is rendered in every render pass . So you need to test CurrentRenderPass everywhere to use it like you want. If you have ideas on how to improve this feature, go ahead. It has not been used much as far as I know (but it is quite powerful feature).
Hmm in my project I have too many models and AppStates to go back and wrap all of them into a Condition... I guess I should have set it up differently.
The reason I'm asking all this (and why in the previous posts I rendered some stuff in OnBeginRenderPass) is because I'm using the "wallpaper" for everything in a project I'm working on. So first a 2d image is rendered in the back of everything and then all the models and various OnRenders and the rest. To complicate matters I also use RenderTarget etc.
The way I have it set up right now it works perfectly (meaning fast + reliable) but I'm trying to find out whether I can set this "wallpaper system" up a bit better for an eventual future project. Thanks for confirming
Actually one feature that would make it a bit smoother and cut the need for rendering the wallpaper in OnBeginRenderPass in my particular case is if there were an option of "clearing" RenderTarget with a bitmap as opposed to just filling it up with a color... That's what I'm (clumsily ) doing manually right now.