Wednesday, May 22, 2013

9: Mixing 2D and 3D

Finally! The Skybox in the game is fixed since I have a little more time to actually work on the engine. The lines outlining the skybox would display in the game and I had to make sure they went away. Its tricky when the program is drawing 2d and 3d together on the same screen under the 'Draw Method'. Thanks to Shawn Hargreaves who provided the most efficient way to go in his blog post, I was able to fix my skybox.

When I was mixing 3D rendering with 2D objects using SpriteBatch, I noticed that my 3D graphics no longer drew correctly after I rendered sprites. All of the models triangles and polygons appeared to be disoriented and stretched leaving tons of gaps and holes. This is because the SpriteBatch changes several device renderstates to values that may not be appropriate for drawing in 3D.


  1. A debt of gratitude is in order for sharing the information, keep doing awesome... I truly delighted in investigating your site. great asset...
    game developer

    1. Thank you Richard! �� I greatly appreciate your support and I am overwhelmed with joy to hear you like this website. It has been and continues to be an incredible journey. Thank you for your comment.