/** * Map all textures for reading prior to software rendering. */ void _swrast_map_textures(struct gl_context *ctx) { if (ctx->Texture._Enabled) { struct gl_texture_object *texObj = ctx->Texture.Unit._Current; _swrast_map_texture(ctx, texObj); } }
/** * Map the texture images which the vertex program will access (if any). */ static void map_textures(struct gl_context *ctx, const struct gl_vertex_program *vp) { GLuint u; for (u = 0; u < ctx->Const.VertexProgram.MaxTextureImageUnits; u++) { if (vp->Base.TexturesUsed[u]) { /* Note: _Current *should* correspond to the target indicated * in TexturesUsed[u]. */ _swrast_map_texture(ctx, ctx->Texture.Unit[u]._Current); } } }
static void span_map_unmap(struct gl_context *ctx, GLboolean map) { int i; framebuffer_map_unmap(ctx, ctx->DrawBuffer, map); if (ctx->ReadBuffer != ctx->DrawBuffer) framebuffer_map_unmap(ctx, ctx->ReadBuffer, map); for (i = 0; i < ctx->Const.MaxTextureUnits; i++) if (map) _swrast_map_texture(ctx, ctx->Texture.Unit[i]._Current); else _swrast_unmap_texture(ctx, ctx->Texture.Unit[i]._Current); }