Sil Tutorials January 3, 2017 2016 Gallery 7: DirectX Initial Tests Sil Tutorials January 3, 2017 View fullsize Copied some code for making a sphere and converted it to C for DirectX. The colors are simply set by the (x,y,z) coordinates of each vertex View fullsize Enabled default lighting in DirectX and generated random colors for the sphere. Also added a cube View fullsize Had a spot of trouble when trying to pass texture information to DirectX View fullsize Eventually got the texture problem fixed. View fullsize Changed the background color, tested drawing a single vertex buffer with different transform matrices, and got the 2D rendering working on top of the 3D world. View fullsize Trying to get stb_truetype.h to render text for me. Had a problem with DirectX wanting square textures View fullsize Fixed it by simply rendering all the characters into a packed texture. (Well to be fair, I didn't do the packing, the stb library did. Thanks Sean Barrett!!) View fullsize The emerald texture for Sphax PureBDCraft texture pack had a nice color to it View fullsize Adding a skybox makes everything look so nice! View fullsize Tried generating a heightmap from a bitmap. Grass texture was made by me, looks pretty terrible. View fullsize Loading in .obj files. .mtl file loading isn't working yet. View fullsize Got the texures working for obj model. Also made a simple function to print strings on the screen using the font pack made earlier. (stb_truetype is awesome, you should go check it out: https://github.com/nothings/stb/blob/master/stb_truetype.h) View fullsize Loaded a model ripped from Super Mario 64. Good ol' Whomp's Fortress. View fullsize All of the matrix math in the engine was done by me so there are still some bugs to be worked out. For some reason when I changed the near and far distance it messed up my FOV View fullsize Stress testing a dynamic buffer in DirectX.