3 ms·
Welllll... alternative pure-ish functional approaches would be: 1) Build a description of the scene made up of draw-triangles (built lazily, if you need inform
by dllthomas 14y ago
Welllll... alternative pure-ish functional approaches would be:
1) Build a description of the scene made up of draw-triangles (built lazily, if you need information back from the frame buffer in the middle of drawing), which is packaged up in something that can be shipped off to the graphics card and sent in an IO action. This is going to still be more expensive than building vertex arrays in place, but nowhere near as expensive as copying the whole vertex buffer each time, and possibly even practical.
2) Run with the DrawTriangle frame-buffer passing silliness, but let the compiler perform some kind of fusion operation on drawing commands.
But yes, "don't do that" in anything production until you've been able to make it work well in a toy. Having said that, building that toy might be informative and potentially even useful.