Lines Matching defs:ctx

163         struct wined3d_context *ctx = context_get_current();
164 ctx->fog_enabled = 1;
165 if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
173 struct wined3d_context *ctx = context_get_current();
174 ctx->fog_enabled = 0;
175 if(ctx->gl_fog_source != GL_FRAGMENT_DEPTH_EXT) return;
182 struct wined3d_context *ctx = context_get_current();
185 ctx->gl_fog_source = param;
187 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
194 ctx->fogstart = (float) param;
196 ctx->fogend = (float) param;
204 struct wined3d_context *ctx = context_get_current();
206 ctx->gl_fog_source = *param;
208 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
215 ctx->fogstart = (float) *param;
217 ctx->fogend = (float) *param;
225 struct wined3d_context *ctx = context_get_current();
227 ctx->gl_fog_source = (GLint) param;
229 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
236 ctx->fogstart = param;
238 ctx->fogend = param;
246 struct wined3d_context *ctx = context_get_current();
248 ctx->gl_fog_source = (GLint) *param;
250 if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
257 ctx->fogcolor[0] = param[0];
258 ctx->fogcolor[1] = param[1];
259 ctx->fogcolor[2] = param[2];
260 ctx->fogcolor[3] = param[3];
262 ctx->fogstart = *param;
264 ctx->fogend = *param;
285 struct wined3d_context *ctx = context_get_current();
286 if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) {
287 GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]};
290 i = (ctx->fogend - ctx->fog_coord_value) / (ctx->fogend - ctx->fogstart);
291 c[0] = i * c[0] + (1.0f - i) * ctx->fogcolor[0];
292 c[1] = i * c[1] + (1.0f - i) * ctx->fogcolor[1];
293 c[2] = i * c[2] + (1.0f - i) * ctx->fogcolor[2];
315 struct wined3d_context *ctx = context_get_current();
316 ctx->color[0] = r;
317 ctx->color[1] = g;
318 ctx->color[2] = b;
319 ctx->color[3] = a;
343 struct wined3d_context *ctx = context_get_current();
344 ctx->fog_coord_value = f;