by Baker » Wed Nov 05, 2014 10:55 pm
I know the basics of vertex arrays ... but I've never done anything complex with them aside from throwing all the verts in a model frame into one and rendering it without multitexture.
1. The mechanics of the batching verts (and using texcoord array)
--- I need to allocate a buffer to store the triangles. Each entry is a float x 3 (verts) float x 4 (texcoords: texture s0, t0, s1, t1) and maybe a GLuint for the texture slot?
--- Do I allocate the memory in chunks I assume for best performance?
--- I fill the buffer with verts that use the same GL capabilities (i.e. same glBlend settings)
--- How does multi-texture fit into this? For instance, lightmaps or fullbright textures using a different TMU.
--- I should submit the verts when new settings kick in. If I need to change any rendering option, I need to submit the verts first as I understand it.
How do I handle vertex lighting, say for a player model? The traditional code changes the glColor for each vertex.
Is there even a way to do per vertex glColor in Open GL 1.x through an array?
2. Let's say I want to batch up the verts for a .bsp
--- Ideally, I would do this per vis leaf --- except that isn't practical because there can be incredible numbers of vis leafs.
--- I sure don't want to render the whole thing.
--- is there any intelligent way to handle the .bsp or does that have to be created on the fly any time the vis frame changes.
3. Models
--- The model verts are different per frame. Does each frame effectively need a vertex array?
--- For interpolating, is there a method to combine the middle of 2 frames or do I need to manually calculate the verts?
Many questions, I'm trying to develop an implementation plan ...
The night is young. How else can I annoy the world before sunsrise?

Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..