Rendering to a texture then rendering that to full screen.

So, figuring stuff out with lumberyard with manipulating how things get rendered (somewhat).

Figured out how to render 2d text by using the following: gEnv->pSystem->GetIRenderer()->Draw2dLabel(10, 10, 2, this->textColor, false, “TEST”); Where textColor is a ColorF type variable.

Pretty simple more or less. Now im figuring out how i can render what i want in a 2d scape on a separate texture then rendering that in full screen as a “hud” but im working on making that “hud” the game.

Anyway, Figured i’d use render targets. “this->renderTarget = this->iRenderer->CreateRenderTarget(800, 600, ETEX_Format::eTF_R32G32B32A32F);” (renderTarget is an int) Great, created a rendering target. Use it by setting the rendering target with “this->iRenderer->SetRenderTarget(this->renderTarget);” Now, im assuming to reset the rendering to the default target would have to set the rendering target to “0” or something (ala, opengl with it’s pipeline.)

Now the real question is… how to i use it as a texture and then use that texture with “Draw2dImage()” to draw it to the screen.

Any ideas?

Hi @alatnet

I’ve added a request for a code sample documenting this and will report back when it is available.

We really need a way to render a small collection of 3d-objects to a texture as well. It is one of our biggest unsolved problems.

Hi @new_user_987, Lumberyard 1.18 introduces the render to texture component which can draw 3d objects to a texture.

Will that accomplish what you want to achieve?