PDA

View Full Version : deleting previously saved buffer region on the video RAM?



ymish
12-29-2003, 09:05 AM
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??

V-man
12-29-2003, 09:25 AM
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.

AdrianD
12-29-2003, 12:42 PM
Originally posted by ymish:
[..] 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??

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 ?