|
From: Keith W. <kw...@cs...> - 2004-08-03 19:19:08
|
Well, presently what I've hacked is that after duplicating a trimesh (which invariably copies the texture unfortunately) I then get the shaders and textures from the two trimeshes and insert the old texture into the new shader immediately, before the trimesh is ever submitted, even for the first time. The profiler reflects that I am getting a single copy of the texture now and the program runs smoother too, I guess because it isn't constantly paging in and out of VRAM. So cool. I still wonder if can get increased efficiency by not copying the texture in the first place (which can be a large chunk of storage of course and might be time consuming to copy pointlessly), but that's a less serious problem. I assume that when I do what I described above, the act of setting one texture automatically decrements the ref count of the texture being replaced and that texture is subsequently erased completely from memory (I mean RAM, not VRAM), right? Thanks, you're a patient lot. ________________________________________________________________________ Keith Wiley kw...@cs... http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley "Yet mark his perfect self-contentment, and hence learn his lesson, that to be self-contented is to be vile and ignorant, and that to aspire is better than to be blindly and impotently happy." -- Edwin A. Abbott, Flatland ________________________________________________________________________ |