Exemplo n.º 1
0
SGColor SG_EXPORT sgColorDiv(SGColor a, SGColor b)
{
    return sgColor4f(a.r / b.r,
                     a.g / b.g,
                     a.b / b.b,
                     a.a / b.a);
}
Exemplo n.º 2
0
SGColor SG_EXPORT sgColorSub(SGColor a, SGColor b)
{
    return sgColor4f(a.r - b.r,
                     a.g - b.g,
                     a.b - b.b,
                     a.a - b.a);
}
Exemplo n.º 3
0
SGColor SG_EXPORT sgColorMul(SGColor a, SGColor b)
{
    return sgColor4f(a.r * b.r,
                     a.g * b.g,
                     a.b * b.b,
                     a.a * b.a);
}
Exemplo n.º 4
0
SGColor SG_EXPORT sgColorMix(SGColor a, SGColor b, float t)
{
    return sgColor4f(a.r + t * (b.r - a.r),
                     a.g + t * (b.g - a.g),
                     a.b + t * (b.b - a.b),
                     a.a + t * (b.a - a.a));
}
Exemplo n.º 5
0
SGColor SG_EXPORT sgColorAdd(SGColor a, SGColor b)
{
    return sgColor4f(a.r + b.r,
                     a.g + b.g,
                     a.b + b.b,
                     a.a + b.a);
}
Exemplo n.º 6
0
SGColor SG_EXPORT sgColor4ub(SGubyte r, SGubyte g, SGubyte b, SGubyte a)
{
    return sgColor4f(r / 255.0, g / 255.0, b / 255.0, a / 255.0);
}
Exemplo n.º 7
0
SGColor SG_EXPORT sgColorNan(void)
{
    return sgColor4f(SG_NAN, SG_NAN, SG_NAN, SG_NAN);
}
Exemplo n.º 8
0
SGColor SG_EXPORT sgColor1f(float g)
{
    return sgColor4f(g, g, g, 1.0);
}
Exemplo n.º 9
0
SGColor SG_EXPORT sgColor4fv(const float* rgba)
{
    return sgColor4f(rgba[0], rgba[1], rgba[2], rgba[3]);
}
Exemplo n.º 10
0
SGColor SG_EXPORT sgColor3f(float r, float g, float b)
{
    return sgColor4f(r, g, b, 1.0);
}
Exemplo n.º 11
0
SGColor SG_EXPORT sgColor2f(float g, float a)
{
    return sgColor4f(g, g, g, a);
}
Exemplo n.º 12
0
Arquivo: color.c Projeto: SIEGE/siege
SGColor SG_CALL sgColorNan(void)
{
    return sgColor4f(SG_NAN, SG_NAN, SG_NAN, SG_NAN);
}
Exemplo n.º 13
0
Arquivo: color.c Projeto: SIEGE/siege
SGColor SG_CALL sgColor4fp(const float* rgba)
{
    return sgColor4f(rgba[0], rgba[1], rgba[2], rgba[3]);
}
Exemplo n.º 14
0
Arquivo: color.c Projeto: SIEGE/siege
SGColor SG_CALL sgColor1f(float g)
{
    return sgColor4f(g, g, g, 1.0);
}
Exemplo n.º 15
0
Arquivo: color.c Projeto: SIEGE/siege
SGColor SG_CALL sgColor2f(float g, float a)
{
    return sgColor4f(g, g, g, a);
}
Exemplo n.º 16
0
Arquivo: color.c Projeto: SIEGE/siege
SGColor SG_CALL sgColor3f(float r, float g, float b)
{
    return sgColor4f(r, g, b, 1.0);
}