The easiest, cleanest, and most-likely-to-remain-usable optimisation
would probably be adding frustum culling.
Texture/OpenGL state sorting would be doable, but I'm guessing it'd make
the code quite hairy. VRML semantics are that rendering order within a
grouping node is irrelevant, so it's certainly not particularly
difficult to imagine doing it and still allowing you to load VRML97
content. I'd guess doing simple change-minimisation would be
considerably easier (e.g. track whether the current texture is a given
Texture object), but I'm not sure it would actually cause a speed-up
given that you'd be doing it in Python code.
Level-of-Detail support would be useful for content that supports it.
I would need to do some profiling to give any certain answers, but I'd
guess providing display-list implementations would provide a speed-up
for static IndexedFaceSets. The opposite would be true (array-based
implementations would speed-up) for dynamic (non-static) IndexedLineSet
and PointSet objects (such as seen in the particle-system demo).
More advanced approaches, such as minimising the size of IFS arrays by
converting to triangle-strips would probably be a good idea too.
Rene Dudfield wrote:
>Very cool. Looks like you are making quite a bit of
>progres on this :)
>I was reading through your "OpenGLContext Rendering
>Process" visitor doc, and was wondering how hard it
>would be to implement some of the rendering
> eg rendering sorted by texture/opengl state, or
>maybe culling geometry?
>Do you think they could be added whilst still keeping
>the code fairly simple/clean?
> --- "Mike C. Fletcher" <mcfletch@...> wrote: >
>I've just released OpenGLContext 2.0.0a3 for
>>PyOpenGL 2.0.1. The
>>2.0.0a3 release includes far more documentation,
>>docstrings), a number of bug-fixes in various
>>modules, and a re-worked
>>There will probably be at least 1 more alpha release
>>before beta 1 (I'm
>>considering adding support for prototyped nodes).
>>See the release notes (readme.txt) for details on
>Do You Yahoo!?
>Everything you'll ever need on one web page
>from News and Sport to Email and Music Charts
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>PyOpenGL-Users mailing list
Mike C. Fletcher
Designer, VR Plumber, Coder