Show
Ignore:
Timestamp:
03/11/10 19:15:20 (5 years ago)
Author:
robert
Message:

From Time Moore, "This submission implements 3 optimizations for meshes. INDEX_MESH turns DrawArrays? style geometry into DrawElements?, uniquifying the vertices in the process. This is useful for certain loaders, like ac3d, which just spit out DrawArrays?. VERTEX_POSTTRANSFORM and VERTEX_PRETRANSFORM optimize mesh triangle and vertex order for the caches on a modern GPU, using Tom Forsyth's algorithm. I describe this and the big difference it makes (38% improvement on a very large mesh) in my blog,
http://shiny-dynamics.blogspot.com/2010/03/vertex-cache-optimization-for-osg.html."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgUtil/Optimizer

    r9886 r11204  
    8686            STATIC_OBJECT_DETECTION =   (1 << 16), 
    8787            FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS = (1 << 17), 
     88            INDEX_MESH =                (1 << 18), 
     89            VERTEX_POSTTRANSFORM =      (1 << 19), 
     90            VERTEX_PRETRANSFORM =       (1 << 20), 
    8891            DEFAULT_OPTIMIZATIONS = FLATTEN_STATIC_TRANSFORMS | 
    8992                                REMOVE_REDUNDANT_NODES |