static void
nouveau_tex_parameter(struct gl_context *ctx,
- struct gl_texture_object *t, GLenum pname,
- const GLfloat *params)
+ struct gl_texture_object *t, GLenum pname)
{
switch (pname) {
case GL_TEXTURE_MAG_FILTER:
* Changes variables and flags for a state update, which will happen at the
* next UpdateTextureState
*/
-static void r200TexParameter( struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLenum pname, const GLfloat *params )
+static void r200TexParameter(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLenum pname)
{
radeonTexObj* t = radeon_tex_obj(texObj);
static void radeonTexParameter( struct gl_context *ctx,
struct gl_texture_object *texObj,
- GLenum pname, const GLfloat *params )
+ GLenum pname )
{
radeonTexObj* t = radeon_tex_obj(texObj);
/** Set texture environment parameters */
void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname,
const GLfloat *param);
- /** Set texture parameters */
+ /** Set texture parameter (callee gets param value from the texObj) */
void (*TexParameter)(struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLenum pname, const GLfloat *params);
+ struct gl_texture_object *texObj, GLenum pname);
/** Set the viewport */
void (*Viewport)(struct gl_context *ctx);
/*@}*/
if (ctx->Driver.TexParameter) {
if (offset != oldOffset) {
- ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_OFFSET,
- (const GLfloat *) &offset);
+ ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_OFFSET);
}
if (size != oldSize) {
- ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_SIZE,
- (const GLfloat *) &size);
+ ctx->Driver.TexParameter(ctx, texObj, GL_TEXTURE_BUFFER_SIZE);
}
}
obj->Sampler.MinFilter = filter;
obj->Sampler.MagFilter = filter;
if (ctx->Driver.TexParameter) {
- static const GLfloat fparam_wrap[1] = {(GLfloat) GL_CLAMP_TO_EDGE};
- const GLfloat fparam_filter[1] = {(GLfloat) filter};
- ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_S, fparam_wrap);
- ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_T, fparam_wrap);
- ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_R, fparam_wrap);
- ctx->Driver.TexParameter(ctx, obj,
- GL_TEXTURE_MIN_FILTER, fparam_filter);
- ctx->Driver.TexParameter(ctx, obj,
- GL_TEXTURE_MAG_FILTER, fparam_filter);
+ /* XXX we probably don't need to make all these calls */
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_S);
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_T);
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_WRAP_R);
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_MIN_FILTER);
+ ctx->Driver.TexParameter(ctx, obj, GL_TEXTURE_MAG_FILTER);
}
break;
}
if (ctx->Driver.TexParameter && need_update) {
- ctx->Driver.TexParameter(ctx, texObj, pname, ¶m);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
}
if (ctx->Driver.TexParameter && need_update) {
- ctx->Driver.TexParameter(ctx, texObj, pname, params);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
}
if (ctx->Driver.TexParameter && need_update) {
- GLfloat fparam = (GLfloat) param;
- ctx->Driver.TexParameter(ctx, texObj, pname, &fparam);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
}
if (ctx->Driver.TexParameter && need_update) {
- GLfloat fparams[4];
- fparams[0] = INT_TO_FLOAT(params[0]);
- if (pname == GL_TEXTURE_BORDER_COLOR ||
- pname == GL_TEXTURE_CROP_RECT_OES) {
- fparams[1] = INT_TO_FLOAT(params[1]);
- fparams[2] = INT_TO_FLOAT(params[2]);
- fparams[3] = INT_TO_FLOAT(params[3]);
- }
- ctx->Driver.TexParameter(ctx, texObj, pname, fparams);
+ ctx->Driver.TexParameter(ctx, texObj, pname);
}
}
*/
static void
st_TexParameter(struct gl_context *ctx,
- struct gl_texture_object *texObj,
- GLenum pname, const GLfloat *params)
+ struct gl_texture_object *texObj, GLenum pname)
{
struct st_context *st = st_context(ctx);
struct st_texture_object *stObj = st_texture_object(texObj);