🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Allegro Blender Function Ignored

Started by
-1 comments, last by Dark Adept 19 years, 9 months ago
Hi. I'm working on a 3D engine using Allegro. I'm using the set_multiply_blender() function to shade my textured polygons, but I'm having some trouble. When I run my program using Allegro's z-buffer, I have no problems. My shaded polygons (textured or otherwise) come out looking fine. However, if I use Allegro's scanline algorithm (eg. create_scene, clear_scene, scene_polygon3d, etc.), the parameters in the blender function appear to be ignored. What's going on? I've been at this for hours.

if (rendering_mode == RM_SCANLINE) {
        for (i = 0; i < 6; i++) {
            p = &point;
            ptmp = &tmp;
            p->c = 255;
        }

        num_v = clip3d_f(POLYTYPE_PTEX_LIT, 0., 1000., 3,
                        (AL_CONST V3D_f**)p, p, ptmp, out);
        for (i = 0; i < num_v; i++) {
            persp_project_f(p->x, p->y, p->z,
                          &p->x, &p->y);
            p->y = SCR_HEIGHT - p->y;
        }

        set_multiply_blender (r, g, b, 255);
        scene_polygon3d_f(POLYTYPE_PTEX_LIT, pic[tex], num_v, p);
}


The business section is the two lines at the end. r, g, and b are what I want to multiply the colours on the polygon by. Anything you guys could tell me would be great. Thanks in advance. Edit: Figured out how to use the source tags
"It is not enough to merely faces one's fears. One must run screaming toward them,"

This topic is closed to new replies.

Advertisement