deleting previously saved buffer region on the video RAM?

Hi All,

In Nvidia specs of WGL_ARB_buffer_region it says:

“The saved buffer region area can be freed by calling
wglSaveBufferRegionARB with <width> or <height> set to a value
of 0.”

In my application I save the depth buffer every frame. Before saving the next frame depth buffer I deallocate it with the command:
wglSaveBufferRegionARB(context, 0, 0, 0, 0);.

As a result, I get very corrupted rendering :-(.

Why??

When I don’t deallocate the saved region the rendering is fine, but I am afraid from memory leakage in the video card.

Any idea??

Are you saying the front buffer looks corrupted?

Other than, that why do you deallocate?
You can keep it hanging around until the user shuts down, in which case you call wglDeleteBufferRegionARB.

Originally posted by ymish:
[b][…] Before saving the next frame depth buffer I deallocate it with the command:
wglSaveBufferRegionARB(context, 0, 0, 0, 0);.

As a result, I get very corrupted rendering :-(.

Why??

When I don’t deallocate the saved region the rendering is fine, but I am afraid from memory leakage in the video card.

Any idea??[/b]

don’t be afraid… it works!
i have implemented ARB_buffer_region and KTX_buffer_region, and i never thought about releasing the buffer region every frame…
how did you came up with this idea anyway ?