ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static void fetch_texel_lod ( GLcontext *  ctx,
const GLfloat  texcoord[4],
GLfloat  lambda,
GLuint  unit,
GLfloat  color[4] 
) [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;
   }
}

Generated on Sat May 26 2012 04:58:21 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.