Ejemplo n.º 1
0
/**
 * Unmap all textures for reading prior to software rendering.
 */
void
_swrast_unmap_textures(struct gl_context *ctx)
{
   if(ctx->Texture._Enabled) {
      struct gl_texture_object *texObj = ctx->Texture.Unit._Current;
      
      _swrast_unmap_texture(ctx, texObj);
   }
}
Ejemplo n.º 2
0
/**
 * Unmap the texture images which were used by the vertex program (if any).
 */
static void
unmap_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_unmap_texture(ctx, ctx->Texture.Unit[u]._Current);
      }
   }
}
Ejemplo n.º 3
0
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);
}