added hasGlobal()
added pass dynamic parameters for layered object draw