Exemplo n.º 1
0
static void wine_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
    WineD3DContext *ctx = getActiveContext();
    ctx->color[0] = r;
    ctx->color[1] = g;
    ctx->color[2] = b;
    ctx->color[3] = a;
    old_fogcoord_glColor4f(r, g, b, a);
}
Exemplo n.º 2
0
static void WINE_GLAPI wine_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) {
    struct wined3d_context *ctx = context_get_current();
    ctx->color[0] = r;
    ctx->color[1] = g;
    ctx->color[2] = b;
    ctx->color[3] = a;
    old_fogcoord_glColor4f(r, g, b, a);
}
Exemplo n.º 3
0
static void WINE_GLAPI wine_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
    WineD3DContext *ctx = getActiveContext();
    if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) {
        GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]};
        GLfloat i;

        i = (ctx->fogend - ctx->fog_coord_value) / (ctx->fogend - ctx->fogstart);
        c[0] = i * c[0] + (1.0 - i) * ctx->fogcolor[0];
        c[1] = i * c[1] + (1.0 - i) * ctx->fogcolor[1];
        c[2] = i * c[2] + (1.0 - i) * ctx->fogcolor[2];

        old_fogcoord_glColor4f(c[0], c[1], c[2], c[3]);
        old_fogcoord_glVertex4f(x, y, z, w);
    } else {
        old_fogcoord_glVertex4f(x, y, z, w);
    }
}