public void Draw(GameTime gameTime, SpriteBatch spriteBatch) { if (!readFinished) { //2D spriteBatch.Begin(); webCamBackground.Draw(spriteBatch); takeImageButton.Draw(spriteBatch); cameraIcon.Draw(spriteBatch); confirmReadedColors.Draw(spriteBatch); rubiksReadedColors.Draw(spriteBatch); colorSelector.Draw(spriteBatch); scrambleButton.Draw(spriteBatch); spriteBatch.End(); } else { spriteBatch.Begin(); if (moveTimeTimer >= moveTimeRate && setSolvePosition == false) { solveButton.Draw(spriteBatch); } spriteBatch.End(); } //3D GraphicsDevice.DepthStencilState = DepthStencilState.Default; cube.Draw(cubeCamera); }