Freeing the memory of a SkyBox?

Everything related to 3D programming
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Freeing the memory of a SkyBox?

Post by Samuel »

I'm not sure how you free up the memory of the SkyBox() images when you no longer need them.
Do you just use the FreeImage() on each individual image? If so then how do you get the handle of each individual image? Since, you never assign
handles to them or the Skybox().
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Freeing the memory of a SkyBox?

Post by DK_PETER »

Samuel wrote:I'm not sure how you free up the memory of the SkyBox() images when you no longer need them.
Do you just use the FreeImage() on each individual image? If so then how do you get the handle of each individual image? Since, you never assign
handles to them or the Skybox().
Hi

Simple:
SkyBox("")

Best regards
Peter
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Freeing the memory of a SkyBox?

Post by Samuel »

Hello DK_PETER,

Thank you for the quick reply. Using SkyBox("") does remove the images from the screen, but they are still in memory.
You can notice it a lot more with larger images. I need a way to free up that memory. Which is why I asked about the FreeImage() command.
Thanks though and if you have any other ideas let me know.
User avatar
DK_PETER
Addict
Addict
Posts: 904
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Freeing the memory of a SkyBox?

Post by DK_PETER »

Samuel wrote:Hello DK_PETER,

Thank you for the quick reply. Using SkyBox("") does remove the images from the screen, but they are still in memory.
You can notice it a lot more with larger images. I need a way to free up that memory. Which is why I asked about the FreeImage() command.
Thanks though and if you have any other ideas let me know.
You can't. You can however construct your own skybox using planes
and thereby have total control.

Best regards
Peter
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Freeing the memory of a SkyBox?

Post by Samuel »

Thank you DK_PETER,

That's what I've been doing lately as my workaround. If this is the only way then that's OK. Not to hard for me to manage a couple of planes. I just thought it would be nice if there was a way. Since, pretty much every thing else with PureBasic has a way to free up memory.
Thanks again.
Post Reply