Only flush and set the depth test bits if depth is currently enabled already. (#1375)
Only flush and set the depth test bits if depth is currently enabled already. (#1375)

This removes a bug where you could blow away the options set in a previous call to setState() which can enabled/disable depth testing.
jdryg/bgfx,attilaz/bgfx,jdryg/bgfx,LWJGL-CI/bgfx,mendsley/bgfx,attilaz/bgfx,jpcy/bgfx,jpcy/bgfx,LWJGL-CI/bgfx,jpcy/bgfx,attilaz/bgfx,bkaradzic/bgfx,LWJGL-CI/bgfx,mendsley/bgfx,jdryg/bgfx,MikePopoloski/bgfx,septag/bgfx,emoon/bgfx,fluffyfreak/bgfx,MikePopoloski/bgfx,mendsley/bgfx,fluffyfreak/bgfx,septag/bgfx,bkaradzic/bgfx,emoon/bgfx,fluffyfreak/bgfx,septag/bgfx,jpcy/bgfx,LWJGL-CI/bgfx,jdryg/bgfx,emoon/bgfx,fluffyfreak/bgfx,bkaradzic/bgfx,MikePopoloski/bgfx,bkaradzic/bgfx