Yes, sharing a data warehouse means accessing the same storage from different objects. Just like sharing a pointer means being able to access the same memory from two different locations.
This differs from using sampler objects in that there is no similarity between them. Sampler objects save the selection parameters. Texture objects have parameters that are not relevant to the selection , for example, the mipmap range , swizzle mask, and the like. This is not a sampler state; this is a state of texture.
Texture objects also have a specific texture type . Different types of the same store can have different types of textures (within) . You can have GL_TEXTURE_2D , which is a representation of a single texture layer GL_TEXTURE_2D_ARRAY . You can take GL_TEXTURE_2D_ARRAY from 6 or more layers and create GL_TEXTURE_CUBE_MAP from it.
Sampler objects cannot do this.
Texture objects have an internal format that defines how the repository should be interpreted. Different types of the same storage can have different formats (within). Samplers do not affect the format.
Sampler objects cannot do this either.
Can you use texture representations to achieve the same effect as sampler objects? No. With samplers, you separate sample parameters from texture objects. This allows you to use the same set of parameters for several different objects. And so you can change one sampler object and use it with multiple textures without going to each texture or changing it.
These are two different functions for two different purposes.
source share