Just want to hear some theories on how to do things right the primary testing facilities in the radius of the camera. In my spare time, I decided to write a simple engine and everything's working now... But now got to load objects from a file. As it is more correct to do?
For example right now the example from Microsoft I have a function "load geometry". Where the compiled shaders, there is an array with vertices, indices and load textures, and then in the render function I just draw the cubes (by changing their positions through XMMatrixTranslation) through the loop, the tops of which have been loaded into the buffer in the download of "geometry".
Now the question on loading objects from file...
I understand the need to create a single file which will be the vertices of all objects and their indexes, when you start the game all it is to drive in the array, and then dynamically load their textures based on the camera's coordinate so they don't clog up the memory. Right thoughts? But here I don't know what to do with the textures... All a little understood how to work texture. Now I have to load the geometry here the following lines
And this texture stands for the whole cube
And as I like to do so were covered in that texture only one side? Or on different sides of different textures. And in General how to load multiple textures on different objects?
Or it will be correct for each object to create a separate file? But how do they then load into an array of vertices and indices? If one file can be the same indexes...