Lines Matching defs:ctx

159         struct wined3d_context *ctx = context_get_current();
160 ctx->fog_enabled = 1;
161 if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
169 struct wined3d_context *ctx = context_get_current();
170 ctx->fog_enabled = 0;
171 if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
178 struct wined3d_context *ctx = context_get_current();
181 ctx->gl_fog_source = param;
183 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
190 ctx->fogstart = param;
192 ctx->fogend = param;
200 struct wined3d_context *ctx = context_get_current();
202 ctx->gl_fog_source = *param;
204 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
211 ctx->fogstart = *param;
213 ctx->fogend = *param;
221 struct wined3d_context *ctx = context_get_current();
223 ctx->gl_fog_source = (GLint) param;
225 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
232 ctx->fogstart = param;
234 ctx->fogend = param;
242 struct wined3d_context *ctx = context_get_current();
244 ctx->gl_fog_source = (GLint) *param;
246 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
253 ctx->fogcolor[0] = param[0];
254 ctx->fogcolor[1] = param[1];
255 ctx->fogcolor[2] = param[2];
256 ctx->fogcolor[3] = param[3];
258 ctx->fogstart = *param;
260 ctx->fogend = *param;
281 struct wined3d_context *ctx = context_get_current();
282 if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) {
283 GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]};
286 i = (ctx->fogend - ctx->fog_coord_value) / (ctx->fogend - ctx->fogstart);
287 c[0] = i * c[0] + (1.0f - i) * ctx->fogcolor[0];
288 c[1] = i * c[1] + (1.0f - i) * ctx->fogcolor[1];
289 c[2] = i * c[2] + (1.0f - i) * ctx->fogcolor[2];
311 struct wined3d_context *ctx = context_get_current();
312 ctx->color[0] = r;
313 ctx->color[1] = g;
314 ctx->color[2] = b;
315 ctx->color[3] = a;
339 struct wined3d_context *ctx = context_get_current();
340 ctx->fog_coord_value = f;