-/* $Id: blend.c,v 1.2 1999/08/19 15:48:01 brianp Exp $ */
+/* $Id: blend.c,v 1.3 1999/09/30 11:18:21 keithw Exp $ */
/*
* Mesa 3-D graphics library
ctx->Color.BlendFunc = NULL;
ctx->NewState |= NEW_RASTER_OPS;
+
+ if (ctx->Driver.BlendFuncSeparate) {
+ (*ctx->Driver.BlendFuncSeparate)( ctx, sfactorRGB, dfactorRGB,
+ sfactorA, dfactorA );
+ }
}
ctx->Color.BlendFunc = NULL;
ctx->NewState |= NEW_RASTER_OPS;
+
+ if (ctx->Driver.BlendEquation)
+ ctx->Driver.BlendEquation( ctx, mode );
}
-/* $Id: dd.h,v 1.2 1999/09/18 20:41:22 keithw Exp $ */
+/* $Id: dd.h,v 1.3 1999/09/30 11:18:21 keithw Exp $ */
/*
* Mesa 3-D graphics library
*/
+ GLboolean (*IsTextureResident)( GLcontext *ctx,
+ struct gl_texture_object *t );
+ /*
+ * Allows the driver to implement the AreTexturesResident tests without
+ * knowing about Mesa's internal hash tables for textures.
+ */
+
+ void (*PrioritizeTexture)( GLcontext *ctx,
+ struct gl_texture_object *t,
+ GLclampf priority );
+ /*
+ * Notify driver of priority change for a texture.
+ */
+
+
+
+
/***
*** NEW in Mesa 3.x
***/
* the driver's UpdateState() function must do.
*/
void (*AlphaFunc)(GLcontext *ctx, GLenum func, GLclampf ref);
+ void (*BlendEquation)(GLcontext *ctx, GLenum mode);
void (*BlendFunc)(GLcontext *ctx, GLenum sfactor, GLenum dfactor);
+ void (*BlendFuncSeparate)( GLcontext *ctx, GLenum sfactorRGB,
+ GLenum dfactorRGB, GLenum sfactorA,
+ GLenum dfactorA );
void (*ClearDepth)(GLcontext *ctx, GLclampd d);
void (*CullFace)(GLcontext *ctx, GLenum mode);
void (*FrontFace)(GLcontext *ctx, GLenum mode);
void (*Enable)(GLcontext* ctx, GLenum cap, GLboolean state);
void (*Fogfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
void (*Hint)(GLcontext *ctx, GLenum target, GLenum mode);
+ void (*Lightfv)(GLcontext *ctx, GLenum light,
+ GLenum pname, const GLfloat *params, GLint nparams );
+ void (*LightModelfv)(GLcontext *ctx, GLenum pname, const GLfloat *params);
void (*PolygonMode)(GLcontext *ctx, GLenum face, GLenum mode);
void (*Scissor)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
void (*ShadeModel)(GLcontext *ctx, GLenum mode);
-/* $Id: light.c,v 1.2 1999/09/18 20:41:23 keithw Exp $ */
+/* $Id: light.c,v 1.3 1999/09/30 11:18:22 keithw Exp $ */
/*
* Mesa 3-D graphics library
break;
}
+ if (ctx->Driver.Lightfv)
+ ctx->Driver.Lightfv( ctx, light, pname, params, nparams );
+
ctx->NewState |= NEW_LIGHTING;
}
gl_error( ctx, GL_INVALID_ENUM, "glLightModel" );
break;
}
+
+ if (ctx->Driver.LightModelfv)
+ ctx->Driver.LightModelfv( ctx, pname, params );
+
ctx->NewState |= NEW_LIGHTING;
}
-/* $Id: texobj.c,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
+/* $Id: texobj.c,v 1.2 1999/09/30 11:18:22 keithw Exp $ */
/*
* Mesa 3-D graphics library
HashLookup(ctx->Shared->TexObjects, texName[i]);
if (t) {
t->Priority = CLAMP( priorities[i], 0.0F, 1.0F );
+
+ if (ctx->Driver.PrioritizeTexture)
+ ctx->Driver.PrioritizeTexture( ctx, t, t->Priority );
}
}
}
/*
- * Execute glAreTexturesResident
+ * Execute glAreTexturesResident
*/
GLboolean gl_AreTexturesResident( GLcontext *ctx, GLsizei n,
const GLuint *texName,
t = (struct gl_texture_object *)
HashLookup(ctx->Shared->TexObjects, texName[i]);
if (t) {
- /* we consider all valid texture objects to be resident */
- residences[i] = GL_TRUE;
+ if (ctx->Driver.IsTextureResident)
+ residences[i] = ctx->Driver.IsTextureResident( ctx, t );
+ else
+ residences[i] = GL_TRUE;
}
else {
gl_error( ctx, GL_INVALID_VALUE, "glAreTexturesResident(textures)" );