I checked out that webpage but none of the examples show up... Anyway, according to the description, the example shows how to display translucent sprites.I already know how to do that because there's that draw_trans_sprite function.But how do I draw translucent primitives, like triangles?

That depends.In any case, you need to set a trans blender (or a similar blending mode).If you use the primitive triangle or polygon functions, then indeed it's set_drawing_mode() you're looking for. If you use the polygon rendering functions, then you need to pass a translucient polygon type (POLYTYPE_XXXX_TRANS).