*buffer | Pointer to vertex buffer area |
size | Vertex buffer area size |
The memory sizes obtained with 3 V latency and 2 V latency are as follows.
3 V latency | Obtained memory size = (op + om + tp + tm + pt)x4 + 352(required internal area) bytes |
2 V latency | Obtained memory size = 100(buffer with minus) + (other buffers)x4 + 352(required internal area) |
Example:
In the case of 3 V
njInitVertexBuffer( 100000, 0, 100000, 0, 0);
op = 100000*4 bytes = 400000 bytes
tp = 100000*4 bytes = 400000 bytes
Required internal area = 352 bytes
Total 800352 bytes
In the case of 2 V latency with the same settings as above
njInitVertexBuffer( -100000, 0, 50000, 0 ,0);
op = minus is 100 bytes
to = 50000*4 bytes = 200000 bytes (half is acceptable as this is a single buffer)
Required internal area = 352 bytes
Total 200452 bytes
Normal initialization procedure: sbInitSystem(NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1); njSetVertexBuffer(buffer,size); njInitVertexBuffer( -100000, 0, 50000, 0 ,0); Initialization procedure when the mode is changed: njChangeSystem(NJD_RESOLUTION_640x480_NTSCNI, NJD_FRAMEBUFFER_MODE_RGB565, 1); njSetVertexBuffer(buffer,size); njInitVertexBuffer( -100000, 0, 50000, 0 ,0);