Skip to main content
GameDev.net gamedev.net
🔒 Locked

Clear vertex buffer

Started by richy_ Aug 4, 2006 at 10:44 AM 5 replies 1.4k views
Original Post
richy_
richy_
Somebody knows a way to clear all the vertex buffers without having the buffers ID's ?
V-man
V-man
What do you mean by clear?
Delete the VBOs? No, you need their ID
richy_
richy_
I want to be sure the video memory is empty when I start my application. Some test programs dont clear de buffers so I want to be sure that I am using all the available video memory for vertex buffers because I need it.
Morpheus011
Morpheus011
you really can't control where in memory openGL allocates space for your buffers. Just bind your buffers normally, if you are using all of the space in your video ram, then it won't even mater if it's cleared, openGL will write over anything that's already there.
V-man
V-man
Quote:
Original post by richy_
I want to be sure the video memory is empty when I start my application. Some test programs dont clear de buffers so I want to be sure that I am using all the available video memory for vertex buffers because I need it.


You can't do anything about it. Hopefully, when those other test programs close, the driver will release the VBO memory for you. The same can be said for other GL objects (textures, FBO, PBO, shaders).
hplus0603
hplus0603
The vertex buffer name space is specific to your process. Even if some other process uses buffer 123, you can also use buffer 123; because they're in different processes, they are different buffers.

That being said, it is the drivers responsibility to clean up un-deallocated resources on process exit. On NT based kernels (Win 2k, XP, Vista), this pretty much always happens; on DOS-based Windows (98, ME) it sometimes happens, and sometimes not.
enum Bool { True, False, FileNotFound };
richy_
richy_
Tank you very much guys. Your answers have been helpful.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.