static void r300BindProgram(GLcontext *ctx, GLenum target, struct program *prog)
{
+ /*
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct r300_vertex_program *vp=(void *)prog;
+ */
switch(target){
case GL_VERTEX_PROGRAM_ARB:
switch(target){
case GL_VERTEX_PROGRAM_ARB:
vp=CALLOC_STRUCT(r300_vertex_program);
- return _mesa_init_vertex_program(ctx, &vp->mesa_program, target, id);
-
+ return _mesa_init_vertex_program(ctx, &vp->mesa_program, target, id);
case GL_FRAGMENT_PROGRAM_ARB:
#if USE_ARB_F_P == 1
fp=CALLOC_STRUCT(r300_fragment_program);
fp->ctx = ctx;
- return _mesa_init_fragment_program(ctx, &fp->mesa_program, target, id);
+ return _mesa_init_fragment_program(ctx, &fp->mesa_program, target, id);
#else
fp=CALLOC_STRUCT(fragment_program);
- return _mesa_init_fragment_program(ctx, fp, target, id);
+ return _mesa_init_fragment_program(ctx, fp, target, id);
#endif
case GL_FRAGMENT_PROGRAM_NV:
+#if USE_ARB_F_P == 1
+ fp=CALLOC_STRUCT(r300_fragment_program);
+ return _mesa_init_fragment_program(ctx, &fp->mesa_program, target, id);
+#else
fp=CALLOC_STRUCT(fragment_program);
- return _mesa_init_fragment_program(ctx, fp, target, id);
-
+ return _mesa_init_fragment_program(ctx, fp, target, id);
+#endif
case GL_FRAGMENT_SHADER_ATI:
afs=CALLOC_STRUCT(ati_fragment_shader);
- return _mesa_init_ati_fragment_shader(ctx, afs, target, id);
+ return _mesa_init_ati_fragment_shader(ctx, afs, target, id);
+ default:
+ _mesa_problem(ctx, "Bad target in r300NewProgram");
}
return NULL;
static void r300ProgramStringNotify(GLcontext *ctx, GLenum target,
struct program *prog)
{
- struct r300_vertex_program *vp=(void *)prog;
+ /*struct r300_vertex_program *vp=(void *)prog;*/
#if USE_ARB_F_P == 1
- struct r300_fragment_program *fp=(void *)prog;
+ struct r300_fragment_program *fp = (struct r300_fragment_program *) prog;
#endif
switch(target) {
static void disable_tex(GLcontext * ctx, int unit)
{
+#if 0 /* This needs to be redone.. or done elsewhere */
r300ContextPtr rmesa = R300_CONTEXT(ctx);
-#if 0 /* This needs to be redone.. or done elsewhere */
if (rmesa->hw.ctx.cmd[CTX_PP_CNTL] & (R200_TEX_0_ENABLE << unit)) {
/* Texture unit disabled */
if (rmesa->state.texture.unit[unit].texobj != NULL) {
void r300UpdateTextureState(GLcontext * ctx)
{
+#if 0
r300ContextPtr rmesa = R300_CONTEXT(ctx);
- GLboolean ok;
GLuint dbg;
int i;
+#endif
+ GLboolean ok;
ok = (r300UpdateTextureUnit(ctx, 0) &&
r300UpdateTextureUnit(ctx, 1) &&