Added support for DepthMask; tweaking core32 renderer to use this new way to handle state changes. The same needs to happen for glesv2
Updated p_state functions as well.