iphone - Most efficient way to draw multiple identical objects? -


I would like to make games from many cubes and plan to put it on the mobile platform and on the web. WebGL My problem occurs when I call claims per cube, I take a hit at the frame rate. Is there any way I can make a single draw call to OpenLS to attract them? The difference between cubes will be the position and color only.

I asked similar questions and answered myself yesterday itself. Take a look at:

You want to create your top buffers and upload them to the graphics card memory using gl.bufferData only once. Then use the buffer reference whenever you do gl.drawElements or gl.drawArrays. The next time that the content of your 3D view changes, you can use this buffer that is uploaded to the graphics card memory.


Comments