fieldallocationvertex-bufferstage3dagal

Can four (4) single VertexBuffers be associated to each fields of a Vertex Attribute register?


In Stage3D / AGAL, is it possible to point for individual VertexBuffers to the same va0 in such a way so that:

Since you can specify the 'offset' and the data format (ex: FLOAT_1, FLOAT_4) when assigning a VertexBuffer to the Context3D object, I would imagine this could be possible.

Maybe my setup is incorrect, but when I tried this I couldn't achieve it.

Does each VertexBuffer need to take up the entire 4 fields in each register? If so, I'm not sure I understand why the FLOAT_1 -to- FLOAT_3 values exists! :S

Thanks in advance!


Solution

  • When you assign vertex buffer, or constant, you allocate 128 bit (i.e. 4 x 32). And you will be bounded exactly to one attribute (va0, va1). So I think it's impossible to bound different buffers to single attribute. And if you put FLOAT_1, you will waste memory.