Jump to content
  • Advertisement
Sign in to follow this  
Dark Adept

Allegro Blender Function Ignored

This topic is 5392 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!