![Smile :)](./images/smilies/icon_smile.gif)
I managed to get colors now.
Do you know how many vertices can be rendered in a scene with an acceptable framerate ? I tried ~720000 (in Quads mode) and it lagged like hell, but I need to draw a lot for what I've planned
Depends on your hardware and how you do it.pixartist wrote:Okay, thank you
I managed to get colors now.
Do you know how many vertices can be rendered in a scene with an acceptable framerate ? I tried ~720000 (in Quads mode) and it lagged like hell, but I need to draw a lot for what I've planned
greenya wrote:Test code is here: http://irrlichtirc.g0dsoft.com/pastebin/view/32368373
well, right now device.VideoDriver.DrawVertexPrimitiveList(vertices, indices); does only take lists, not arraysshadowslair wrote:In case you have missed it- he posted the code after the screenshot:greenya wrote:Test code is here: http://irrlichtirc.g0dsoft.com/pastebin/view/32368373
Well, yes, as i said, i have changed lists to arrays to be able to use Marshal::Copy() method (which works only with arrays). This gives small profit but this is still too slow. I don't know how to make it work faster right now, at least i definitely know the reason - copying process. Optimizing "copying" will never give good performance. Maybe in future some ability to hold unmanaged arrays of indices and vertices will be implemented, so it will be possible to call drawVertextPrimitiveList() immediately, BUT if we look closely, we see that meshbuffers already can help us a lot.pixartist wrote:right now device.VideoDriver.DrawVertexPrimitiveList(vertices, indices); does only take lists, not arrays
Next version of Lime will have better support of meshbuffers (at least it will be possible to create 16/32 bit meshbuffers and append/update indices and vertices on them). So it will be possible simply to create 32-bit meshbuffer, append copule of million indices and vertices, and just call DrawMeshBuffer(). Indeed this functionality already in the trunk. However, my tests shows, that my OpenGL draws single 32-bit mesh buffer slower on 5-10% and Direct3D9 is 5 times slower with single 32-bit meshbuffer, than drawing 200-300 16-bit meshbuffers.pixartist wrote:oh I see the improvement for DrawVertexPrimitiveList is only marginal... hmm, vertex buffers look annoying
I believe if you want to use meshbuffers directly and from time to time modify its content, you anyway will need to "dance" around those indices.Well, I don't mind splitting up meshbuffers, as long as I don't need 50 lines of hilariously confusing code to get the indices right![]()
I'm sorry, I don't really understand why the indices are so complex. Basically they just give the order in which the vertices should be iterated right?greenya wrote:I believe if you want to use meshbuffers directly and from time to time modify its content, you anyway will need to "dance" around those indices.Well, I don't mind splitting up meshbuffers, as long as I don't need 50 lines of hilariously confusing code to get the indices right![]()
![]()
I have added to Lime new example (for next release), but would be good if you try it. Please tell than the results, your OS and video card. Somehow when i use 32-bit meshbuffer, my app crashes when add about 700k+ cubes, but it works just fine when i use only 512k. With 16-bit chunking i was able to draw 800k+ without crashes. Please also tell your physical memory size and report here what the maximums (for 16-bit and 32-bit meshbuffers) you was able to run without crashes.
The binnary is: http://filebeam.com/8bfdab6c3195ac7bb3cfb6d98a9a7063 [1.6 Mb]
The source code of this binnary is: http://irrlichtlime.svn.sourceforge.net ... athrev=275
P.S.: the generating cubes algorithm does really like to 'eat' free memoryFor example to generate 1kk cubes i use about 1.9Gb. After generation, when drawing, memory will be freed by .NET' garbage collector and the app will consume only about 500Mb.