To end this module, we are going to explain how to insert external libraries in our project. In our project we've used, on one side, the DirectX library, which comes with the cdk, which can be downloaded from Microsoft's web page. The AntTweakBar library is an open-code library, which allows us to modify our game's values through gee controls, in a very easy and intuitive way, and then a library called XML Parser, or XPar, which will allow us to parse *.xml files. To do so we must go to our Visual Studio project, Properties, and we must modify some properties. The first property we must modify is CC++. We need to tell it, the folder where those libraries' includes are found. In this case, we've added the following properties inside the third party folder: based on the solution dir identity, there is a folder called xpat, in which we will find the header files to parse xml files. On the other side we've got the folder where Microsoft DirectX sdk is located, which in my case, in my computer, is Program Files(x86)\Microsoft Direct X SDK (June 2010)\include, and then we have another folder because as it is third party it works to parse and helps finding files and finally the folder where AntTweakBar is located, with the \Include which is where the .h files are located in AntTweakBar If we go to our project, here we have our solution file, and if we go to Third party then we have AntTweakBar and the Include folder, where there are the *.h files and finally, the \xpat folder, where there are the *.h and the libraries we are going to use in our project. Once we've set our header files, we can compile, but in aim to link our executable, we will have to define the libraries where those libraries' compiled code and the route where the folders can be found are located. The first thing we are going to show is libraries, in "Entrada", "Dependencias adicionales", we define the different libraries we've used. Here we have all the Ticketed something libraries we are using, the libexpa library which lets us reading xml files and also we have, in "General", the "Vinculador", in the additional libraries directory, the folder where Xpat is, Third party, xpat library, third party\xpat\ and the folder where the Direct X11 library is placed, in this case in 64 bits format, and then solution dir\lib, which is where we generate the AntTweakBar. Before generating I'm going to explain what AntTweakBar is. As I said before, AntTweakBar is a library which allows us to customize development values while we are working, in our engine. If we go to the AntTweakBar library page, We can see it's an open code library, which works with Directx 9, 10, 11 and ML. And it will allow as to create this kind of windows, where we can modify our video games' values. To do so, we've integrated the AntTweakBar library in the AntTweakLibrary project inside our project, inside our subroutine, and we can generate it. When we are generating AntTweakBar, it will generate, in my case, inside the library, the *.dll and the *.lib file. We will need the *.dll for the execution and the lib is used to generate the linkage, to generate the *.exe. So if now I generate the project, with F7... The project will compile in my studio zone, and I will be able to execute it with F5. I will execute it... It actually works, but the fact is that if I do something it will be heavy, as the code still has to be implemented. Well, to end today's session I left a small part in aim to be able to implement. If we go to the DX app, then cpp, we can see that, as you might have realized, we haven't implemented all the lines. To do, we delete the mdebugRender item. So, we need the line to delete the debugRender. To delete the debugRender I do a checked delete. DebugRender, in the middle of Initdata, we add with the TwAddVarRw subroutine, a Twtype bool type element, cpp to the antTweakBar m Bar called paintsolid, along with the methods set and getpaintsolid D3D11 definition group render. OK, let's add this call. To do so, I call the method, to the TwAddVarCb subroutine, as it will add a boolean at the Twbar bar. After m bar, called paintsolid, the type will be twtypeboolcpp, the set will be called setpaintsolid D3D11, setpaint solid D3D11, and getpaintsolid D3D11. here the data is null and the char is def, we said it is defined as groupRender, to make it group inside the render tab. The next to do is, adding a reading-writing variable to the tool bar, which will be called axisgrid, which will decide whether we can or cannot take off the grid, the boolean, null and finally the last parameter, which will be between the render groups. We will add another line, with the 4F color, and its name will be backgroundcolor. And it will also be in the render group. This variable will allow us to modify the background color. Finally, we build the debugRender so we will have this part implemented. We go on and create a color, in this case, we are in the render method and we will create a xmflot4 color named debugRender color, which will be in white color and we will paint by the DebugRender method, some axis using the device and the size, which in this case will be 8. Next we will paint a drawgrid using the device on it, its size will be 1 and the color we previously created will be the debugRender color, so we will paint a cube. Translating the device, the size and the color. And finally, we will paint a sphere using the device, the sphere's radius and its color. We can see we have already implemented everything. And we are missing the fact that when we build the debugRender we need to pass the device parameter. Alright. Once it's done we execute. If we did it well, we can move the camera with the mouse and with the keys: with S we go backward, with W we go forward, and with A and D we go left and right. Once we've painted the grid, the cube, the sphere and the axis, if I press J it shows me the PaintSolid. Right now it doesn't do anything because we only paint in lines, so it doesn't make any differentiations. We will see it next. And now we will see why we didn't get the BackGroundColor. Our error was telling it the address where this variable is located. We will decide which values we need it to modify. Let's see now. If I go to J, I see that BackGroundColor has been modified, and now I can change the color. So we change the blue component. We see how the background changes. This is the color with which we paint, we do the clear. So J leaves. If I press Tab key I swap to the sphere camera, if I press C I control it, and with the mouse wheel I can get closer or further. Finally, to end this part of the class, I will add two extra painting cubes in the render method. I will add two cubes: one to the positive X axis, and another one to the negative X axis. and I will paint one in red and the other one in green. One will be red. And the other one will be green. So red will be 1001, and green will be 0101. We will paint the red cube this way, and the green one using the other one in the other color. To paint the cube in different positions, we need to create and establish a world matrix. So, in the world matrix before painting, I establish another matrix and I translate it to the positive X axis 5 units so it's better. And in the negative X axis 10 units for the green cube. I record it, I execute it and if we did it well... We see the red cube in the positive X axis and the green cube in the negative X axis. Also, we see how on the application's main axis, the axis we've previously painted show us where the positive axis, in this case X, is going. And this is all about the first session. At a game level, talking on the executable part, we see we have a Data folder inside the executable, and in this Data folder we have already seen we had different files, such as effects, the xml files we are going to use in our course, such as cameras, and the geometry models and textures we are going to use in our code, in our game, which is what we will see in the next sessions. So, in this session we've talked on what we will be doing during the course. We have learned the modules that are programmed inside a video game's engine, we've learned how a real time application works, and we have learned how to create a 64bit application and how to implement our own engine's base. And finally, we have learned how to integrate external libraries in our project. We hope you liked it, thank you. Here you have the different resources we've seen during the Power Point.