GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


rgb bytes by JazzD
    if ( colorSet ) {
        int        r, g, b;

        r = color[0] * 255;
        if ( r > 255 ) {
            r = 255;
        }
        g = color[1] * 255;
        if ( g > 255 ) {
            g = 255;
        }
        b = color[2] * 255;
        if ( b > 255 ) {
            b = 255;
        }

        ent->s.constantLight = r | ( g << 8 ) | ( b << 16 );
    }