• RenderTarget help
    4 replies, posted
Hello, facepunch community. I'm working on my gamemode and I was thinking about making bobbing hud. I got an idea about creating a render target and then drawing on it, then putting that onto custom material, and draw the material on screen with different angle using surface.DrawTexturedRectRotated But, I need to clear the render target every frame before re-drawing the hud again. Is there a way to clear render target completely, make it transparent, like it was created again? Please, do not post stupid ideas like: Do not clear it at all Draw every hud element with rotating (it has lots of details that can not be rotated) Creating new render target every frame (it will "eat" all the ram you have)
What is the point in having a rendertarget if you render elements on it every frame? Just render them directly on your screen then. Also, you can't clear rendertarget 0 alpha, it's a bug that garry won't fix.
I am rendering them directly on screen, but I want to make bobbing hud, so i need to rotate all the elements hud.
Uh, you don't need a rendertarget to make a bobbing hud, just use the cam library.
Hm, thanks for idea.
Sorry, you need to Log In to post a reply to this thread.