added depth buffer implementation, fixed resource twice loading