The assignment consisted of two parts; integrating Lua into the project and drawing a second triangle in order to form a square. We already had used Lua in the past, in EAE 6310, to process input for the game objects in the engine. Now we use it more extensively in our build pipeline. Currently Lua replaces some of the C++ code from our Asset Builder project, and calls some predefined C functions form the project.
The image shows the desired result in Direct3D. Even though the output is similar for OpenGL, the way we represent vertices and primitives (triangles) is completely opposite. Direct3D follows the Left hand orientation while OpenGL follows the Right hand orientation. Previously we had a single triangle, but now we have two triangles making a square (actually a rectangle depending on the resolution). I was stuck at a point in adding new vertices for the second triangle in OpenGL. I did add new values to the buffer in the code but missed the line where we write into the internal buffer. This mistake stopped me from getting the second triangle rendered on the screen. This forced me to read through most of the code in both Direct3D and OpenGL files. This will now help me in the next assignment.