Skip to content

performance improvement

gero3 edited this page Apr 25, 2012 · 2 revisions

Perormance

frustrum

  • use more caching techniques inside the contains method:
    • cache plane
    • cache translation

WebGLRenderer

  • use variables to store important webgl constants (important because google closure can inline these constants in the functions and size decreases also )
    • ARRAY_BUFFER = 0x8892;
    • ELEMENT_ARRAY_BUFFER = 0x8893;
    • DYNAMIC_DRAW = 0x88E8;
    • FLOAT = 0x1406;
    • TRIANGLES = 0x0004;
    • UNSIGNED_SHORT = 0x1403;
    • LINES = 0x0001;