Lines Matching refs:bitmask

614  * Given a face and pname value (ala glColorMaterial), compute a bitmask
621 GLuint bitmask = 0;
623 /* Make a bitmask indicating what material attribute(s) we're updating */
626 bitmask |= MAT_BIT_FRONT_EMISSION | MAT_BIT_BACK_EMISSION;
629 bitmask |= MAT_BIT_FRONT_AMBIENT | MAT_BIT_BACK_AMBIENT;
632 bitmask |= MAT_BIT_FRONT_DIFFUSE | MAT_BIT_BACK_DIFFUSE;
635 bitmask |= MAT_BIT_FRONT_SPECULAR | MAT_BIT_BACK_SPECULAR;
638 bitmask |= MAT_BIT_FRONT_SHININESS | MAT_BIT_BACK_SHININESS;
641 bitmask |= MAT_BIT_FRONT_AMBIENT | MAT_BIT_BACK_AMBIENT;
642 bitmask |= MAT_BIT_FRONT_DIFFUSE | MAT_BIT_BACK_DIFFUSE;
645 bitmask |= MAT_BIT_FRONT_INDEXES | MAT_BIT_BACK_INDEXES;
653 bitmask &= FRONT_MATERIAL_BITS;
656 bitmask &= BACK_MATERIAL_BITS;
663 if (bitmask & ~legal) {
668 return bitmask;
676 _mesa_update_material( struct gl_context *ctx, GLuint bitmask )
681 _mesa_debug(ctx, "_mesa_update_material, mask 0x%x\n", bitmask);
683 if (!bitmask)
687 if (bitmask & MAT_BIT_FRONT_AMBIENT) {
698 if (bitmask & MAT_BIT_BACK_AMBIENT) {
710 if (bitmask & (MAT_BIT_FRONT_EMISSION | MAT_BIT_FRONT_AMBIENT)) {
716 if (bitmask & (MAT_BIT_BACK_EMISSION | MAT_BIT_BACK_AMBIENT)) {
723 if (bitmask & MAT_BIT_FRONT_DIFFUSE) {
734 if (bitmask & MAT_BIT_BACK_DIFFUSE) {
746 if (bitmask & MAT_BIT_FRONT_SPECULAR) {
757 if (bitmask & MAT_BIT_BACK_SPECULAR) {
772 * according to the bitmask in _ColorMaterialBitmask, which is
778 GLbitfield bitmask = ctx->Light._ColorMaterialBitmask;
781 while (bitmask) {
782 const int i = u_bit_scan(&bitmask);
796 GLuint bitmask;
807 bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial");
808 if (bitmask == 0)
811 if (ctx->Light._ColorMaterialBitmask == bitmask &&
817 ctx->Light._ColorMaterialBitmask = bitmask;