Fixed Draw.graphic not working for native targets

Added if clause to determine whether to use render or renderAtlas. Also
added a "layer" parameter to draw the graphic on a certain layer