Topic: enableRenderToTexture() Uses?

What can the enableRenderToTexture() function be used for?

You have a camera and an object.

Are you rendering what the camera sees to the object or to a texture?

I was wondering if this function would be used to make an inventory menu (alongside the enableCameraLayer() function perhaps?)

Is it more of a texture animation that live updates? Split screen perhaps?

Last edited by Tutorial Doctor (2014-03-05 17:52:10)

Re: enableRenderToTexture() Uses?

You can render the view of a specific camera into a texture in real-time,
for example, in a sport game you can show the point of vue of a camera in a tv screen.

It can also be used to apply post-effect, if the mesh using the texture is linked to a shader.
ex : http://www.maratis3d.org/?p=678

And for gui or split screen yes.

Re: enableRenderToTexture() Uses?

Thank you anael! I will keep that in mind. I am thinking of doing a series of projects/games that demonstrate the use of all of the API functions in an easy to grasp and useful manner. I just need to understand how to use the API, and thanks to a few users here I have a better idea of what certain functions can be used for. It would be more like an interactive documentation of the Lua API. Of course, it would have to have solid and easy to grasp commenting and example uses.

I think a third person game would be best to encompass all aspects, but I am stuck at the animation phase, as I want the animations to be good. So I am at a halt (I don't want to keep using static meshes.)