Font

2016 Gallery 7: DirectX Initial Tests

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

Enabled default lighting in DirectX and generated random colors for the sphere. Also added a cube

Had a spot of trouble when trying to pass texture information to DirectX

Eventually got the texture problem fixed.

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.

Trying to get stb_truetype.h to render text for me. Had a problem with DirectX wanting square textures

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!!)

The emerald texture for Sphax PureBDCraft texture pack had a nice color to it

Adding a skybox makes everything look so nice!

Tried generating a heightmap from a bitmap. Grass texture was made by me, looks pretty terrible.

Loading in .obj files. .mtl file loading isn't working yet.

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)

Loaded a model ripped from Super Mario 64. Good ol' Whomp's Fortress.

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

Stress testing a dynamic buffer in DirectX.

2016 Gallery 5: Bitmap Font Creator

I toyed with the idea of making a editor that would handle creating the meta-data I needed to load in and draw a bitmap font. It wasn't very useful once I found some libraries to actually render TrueType Font files into a bitmap but it was a fun project to work on.

First attempt at finding the different image parts. I believe the problem was a simple for loop comparing the y with width instead of height

Found all the characters. We are drawing them with random colors to show that they are separated

Some stuff is coming together. The blue lines indicated the alignment to the bottom of the line. The width of the characters was not adjustable yet.

Added the ability to specify the width of each character so they fit together better when drawn in a word/sentence. Also added some alignment guides

Loading a smaller font

Had some fun with shaders again and made a cool moving background for the selected and hovering characters. Added a message in the bottom right for outputting information. Also, not in the image, I tried making a Lua console that you could call C functions from. It used the fonts created from the program.