[gfx3d] Get rid of magic constants and replace them with enum values.