gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Can't get edge-marking to work.

#141233 - Peter - Sun Sep 23, 2007 10:42 am

I don't get edge-marking to work. I thought I would just have to enable the edge-marking bit in DISPCNT3D, and set a different PolygonID in POLYGON_ATTR than the Rear-Plane uses. Maybe optionally setup the edge-table-colors. But for some reason it does not work and I don't get why.

Here is what I'm doing in some sort of pseudo-code:
Code:

CLEAR_COLOR.PolygonID = 0;

DISP3DCNT.PolygonAttrShading = ToonShading; // no idea if necessary
DISP3DCNT.EdgeMarking = 1;
DISP3DCNT.RearPlaneMode = Blank;

POLYGON_ATTR.PolygonMode=ToonShading; // no idea if necessary
POLYGON_ATTR.PolygonID = 8;

EDGE_COLOR = 0; // set all entries to black

RenderQuad(); // renders a quad which is made out of two triangles (triangle-list)

Now I expected the polygones to have black edges, but they don't. Actually it makes no difference if I enable edge-marking or not.

Any idea what I'm doing wrong?
_________________
Kind Regards,
Peter

#141371 - Peter - Mon Sep 24, 2007 8:03 pm

I found why it didn't work. I logically OR'ed the PolygonID into the DISP3DCNT, but it must be OR'ed into POLYGON_ATTR of course. yay!
_________________
Kind Regards,
Peter