PDA

View Full Version : glTexImage2D... then I can free my own storage?



Raeldor
07-10-2005, 01:04 PM
Once I have called glTexImage2D to specify my texture, can I then free my own storage area which I passed as the last parameter? Ie, does this function take a copy of my texture locally (or on the video card)?

Thanks

07-10-2005, 04:50 PM
Once I have called glTexImage2D to specify my texture, can I then free my own storage area which I passed as the last parameter?Yes.

Hlz

07-10-2005, 06:34 PM
does this function take a copy of my texture locally (or on the video card)?Where your texture ends up is up for grabs. It could end up in video, AGP, or system memory. It depends on many factors and is implementation dependent. You can rely on a good driver to do the right thing, but this can be a point of contention for applications that push video memory to the limits.

I think it's generally a good idea to know roughly how much video memory your app requires to run smoothly and have a baseline hardware requirement to meet that need. If it runs on the baseline system it'll fly on the rest.

Hlz