PDA

View Full Version : Cost of changing dynamically texture settings



SeskaPeel
11-12-2004, 10:22 AM
I wonder how much it could impact performance to change dynamically, multiple times within a frame, the tiling and filtering of a texture ?

I have multiple map, that can use the same texture, but one would make this texture tile, and not the other maps. Should I store multiple times the texture, (suppose I have a lot of memory), or should I change dynamically the settings on a shared texture ?

And if someone would be kind enough to answer my previous question here : http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=012719

Thanks,
SeskaPeel.

idr
11-12-2004, 10:39 AM
That will vary from chip to chip (and possibly even driver version to driver version), but, in general, the "expensive" texture operations are BindTexture, TexImage / CopyTexImage, TexSubImage / CopyTexSubImage, and changing LOD settings (esp. BASE_LEVEL). The filter and wrap settings are usually pretty cheap.

SeskaPeel
11-13-2004, 10:10 AM
the "expensive" texture operations are BindTexture, TexImage / CopyTexImage, TexSubImage / CopyTexSubImage, and changing LOD settings Well, bind, copy and others actually upload some datas from system to hardware, so it makes sense that they can be expensive, but what about LOD settings ?
I'm not asking about what will happen NEXT, but what's happening immediately when I call these functions. As instance, tweaking LOD and immediately setting it back would affect performance ?

And compared to some basic state change (let's compare with back face culling, that's not supposed to do anything other than a state change as long as you don't render anything), will filter and wrap state changing be quite about the same cost, or will it happen some stuff backstage ?

Thanks,
SeskaPeel.