PDA

View Full Version : compiled vertex array - just released my code



JacekPoplawski
08-04-2002, 07:28 AM
You can download my code from http://decopter.sf.net. How it works:
- load "landscape.png"
- create heightmap from it
- create patches of size 65*65
- create vertex array from heightmap for every patch
- sort faces by textures
- glLockArraysEXT
- for every texture: glDrawElements
- glUnlockArraysEXT
When i remove Lock/Unlock - framerate doesn't drop! But now I am drawing only single-pass, no multitexturing (lighting is based on normals, I will fix it later).

jwatte
08-04-2002, 07:36 AM
LockArrays is often only a win if you multi-pass your geometry. It is also often a no-op if your array is too big (for an undefined value of big). 65x65 == 4225 which may be too big. Drivers probably optimize LockArrays for Quake 3, which submits a few hundred verts (up to a thousand or so) per lock.