# Pros and Cons of making one complex mesh vs more simpler ones

Looks like I have a problem with basic understanding of how OpenGL works. Lets say I have a mesh made out of three cylinders that is shown on the picture:

So are there any major difference in performance/memory if I make three different cylinder objects or one object made out of three cylinders? Well, if I make them separately with OpenGL, there would obviously be memory overhead because I repeat vertices for each of these cylinders in the middle (section area). That I can see. But, what about difference between having one big vertex shader vs having more smaller ones? Lets say we have 20 objects in the scene. Are their vertex shaders all sent separately to the GPU or are they all collected and sent together? If they are sent separately should that be slower than making one big vertex shader that will have to be sent to the GPU at once?

Second part is question about UV-s. Lets say all three cylinders have same texture, or one cylinder has half of the texture and second braching parts have second half of the texture. If I make an object containing all cylinders then obviously I would have to define UV array only for each of my vertices. Taking this into consideration are there any memory/performance issues if I use values for U and V greater than 1. For instance "lower" vertices of cylinder down would have V = 0, "upper" would have V = 1, and "upper" vertices of cylinder up would have V = 2. Does usage of UVs coordinates greater than 1 have any influence on performance or does the OpenGL only do basic rescaling? However, if I use same texture on each cylinder that are made separately then I would have to make UV array only once and just reuse it for each cylinder. Again I'm not sure what is the better option

Basically, lets say branching in this picture is repeated, like in a tree structure. What are the pros and cons of making a whole tree as one object and making it as a collection of a lot of small branches, besides simplicity of second option?

• Hi Nemanja Stojanovic, and welcome to GameDev.StackExchange. Since answers below have already spoken to both points, I won't make edits to change your question, but in future please ask just one question per question post. It's OK if you have two different questions, just ask them in two different posts. This lets us get more focused Q&A that's easier for users to search, and usually gets better-quality answers faster. Also, when you want to know if way A or B is faster/slower/heavier, the best way to find out is to build a test case and profile it on your target hardware. – DMGregory Sep 25 '18 at 11:58

For the UV part, I'm not sure if I understand it correctly, but when you have UVs greater than 1 there isn't any important penalty in performance, and the behaviour depends on the engine / library that you use. For instance, OpenGL has the GL_REPEAT flag, so if you have UVs greater than 1, the texture simply repeats itself like tiles. So U = 2; and V = 2; would mean that the texture would be drawn 2 times horizontally and 2 times vertically.