Graphics API
My graphics API is built on the DirectX 11 framework. Here is a slideshow that displays the evolution of the project, starting with the drawing of triangles and ending with a scene composed of complex 3D models, textures, and lighting.
The project is built on top of the baseline DirectX application in this text book. The purpose is to create graphics tools that would be easy to use in a game engine.
The building blocks of the project are the basic classes: Models, Shaders, and Textures. The model class houses the vertex and triangle indices of some geometry.
The model is just a bunch of triangles, vertices and indices.
There are various pre-made models provided by my model class including pyramids, spheres, and cubes. Each has UV information as well as vertex normals.
Models can be loaded externally from a file. They can also have multiple meshes with different textures and materials.
Each C++ Shader Object in my project is associated with an HLSL Shader. These shaders provide various graphical options including color, texture, lighting, and fog effects.
These are some common shader objects. There are other shaders such as color light and my mirror shader.
Lighting is implemented using the Phong Illumination Model. Lit objects have material properties of ambient, diffuse, and specular.
Spooky fog with multiple shaders for texture and color.
Textures are pretty simple. They house the resource view and the sampler state. The texture class has its own "set to context" method to encapsulate the calls to these elements.
Each mesh on this TV model has a different texture, and the vertices of each mesh have UV mappings.
Graphic Objects are classes in my API that combine a model, shader, and a texture if needed. They are what the user of this API would interact with to create graphical elements.
My amazing modeling and lighting skills making use of Graphic Objects.
My project also provides specialized Graphic Objects for a Sky-box, Terrain, and a Mirror.
Big inverted cube with special UVs.
Magic Portals.
The terrain is built from a height map texture. The height of each vertex is based on a pixel value in the height map.