Home | Info | Community | Development | myReactOS | Contact Us
[static]
Fetch a texel with given lod. Called via machine->FetchTexelLod()
Definition at line 40 of file s_fragprog.c.
Referenced by init_machine().
{ const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; if (texObj) { SWcontext *swrast = SWRAST_CONTEXT(ctx); GLchan rgba[4]; lambda = CLAMP(lambda, texObj->MinLod, texObj->MaxLod); /* XXX use a float-valued TextureSample routine here!!! */ swrast->TextureSample[unit](ctx, texObj, 1, (const GLfloat (*)[4]) texcoord, &lambda, &rgba); color[0] = CHAN_TO_FLOAT(rgba[0]); color[1] = CHAN_TO_FLOAT(rgba[1]); color[2] = CHAN_TO_FLOAT(rgba[2]); color[3] = CHAN_TO_FLOAT(rgba[3]); } else { color[0] = color[1] = color[2] = 0.0F; color[3] = 1.0F; } }