This will be used by glBindTextures() so we don't have to look it up
for each texture.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
GLuint Name; /**< the user-visible texture object ID */
GLchar *Label; /**< GL_KHR_debug */
GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
+ gl_texture_index TargetIndex; /**< The gl_texture_unit::CurrentTex index.
+ Only valid when Target is valid. */
struct gl_sampler_object Sampler;
const struct gl_texture_object *src )
{
dest->Target = src->Target;
+ dest->TargetIndex = src->TargetIndex;
dest->Name = src->Name;
dest->Priority = src->Priority;
dest->Sampler.BorderColor.f[0] = src->Sampler.BorderColor.f[0];
mtx_unlock(&ctx->Shared->Mutex);
}
newTexObj->Target = target;
+ newTexObj->TargetIndex = targetIndex;
}
assert(valid_texture_object(newTexObj));