Sign in to follow this  
kc_0045

Best way to "Render to texture"

Recommended Posts

What im trying to do is create a Video camara that is displayed on a t.v/screen in my game that is live(So in other words, it renders the world, saves it to a texture or somthing, then renders it onto a face) I dont care so much about the code(but an example would be nice :P) I just dont know what would be the best way to go about this, If anyone could give me some terms I could research that would be great. Also, im using TGE(Torque) so would the render for the Camara need to be saved before the Player view is rendered? just wondering how that would work and if im gonna have to do digging into TGE main code, or if I can manage to put all the code for it inside a Seperate objects render function.

Share this post


Link to post
Share on other sites
this is typically called a portal
its pretty straight forward

position camera at tv cams pos + dir
render scene
copy to texture

setup normal viewpoint
draw tv sceen with the above texture applied

Share this post


Link to post
Share on other sites
Quote:
Original post by zedzeek
this is typically called a portal
its pretty straight forward

position camera at tv cams pos + dir
render scene
copy to texture

setup normal viewpoint
draw tv sceen with the above texture applied


okay thank you

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this