clearAll option of setRenderTarget doesn't work?

Started by MichaelJPCT, November 01, 2020, 08:17:09 AM

Previous topic - Next topic

EgonOlsen

I don't see why that should be the case, to be honest. Can you provide a test case for this?

MichaelJPCT

ha, i found the reason.
blitting must have enabled depth test, while the following RTT operation requires depth test off.
i can fix it now.

MichaelJPCT

Hi Egon,
i have another question: if a RTT target texture is rendered with depth test off, can the DepthBuffer of this texture be deleted? saving vram is the main concern.

EgonOlsen

Quote from: MichaelJPCT on November 15, 2020, 07:34:11 PM
i have another question: if a RTT target texture is rendered with depth test off, can the DepthBuffer of this texture be deleted? saving vram is the main concern.
Maybe...but setting the DepthBuffer to null wouldn't help. The renderer would create a new, internal one on the next the render call. Currently, there's no way to suppress this. If you are using multiple textures of that kind, you could share the buffers between them so that only one is (not) used.

MichaelJPCT

thanks.
i.have multiple rtt textures , but their sizes (some) are different. your way can still save some ram though.
if the pointed vram space is only 1x1 in size, that would be great.