Re: [PyOpenGL-Users] Pyopengl - slow performance using
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2011-01-18 05:10:23
|
On 11-01-13 06:29 AM, pm...@gm... wrote: ... > - Do you have any hints how to improve the performance dramatically and make it usable? I tried several options but none worked out. For instance I tried to replace python list with numpy arrays but the performance was not significantly changed. The most effective speedup I can think of would be to pre-render the static geometry into (mostly transparent) image-maps and then using a single textured quad to present it. Modern cards handle large image maps pretty well, and a single textured quad should render pretty fast. If you're letting users do a lot of zooming you'll want your zoom-UI to be regenerating the texture according to some heuristic regarding how different the current zoom is from that used to generate the texture. On "release" of the zoom widget you'd regenerate again for the final zoom. > - Do I need execute the OpenGL code in C? Altough I could do this, I still need to use python as scripting language due to other dependencies of the implementation. Even with 350,000 vertices, using VBOs for the indices and the vertices should produce an almost-C-speed render. That is, define a vertex array, an index array that says which vertices to render, and then use a single call to render the whole set. If your card can pull that much geometry, I'm guessing that should be faster than 50,000 calls to render. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |