#170466 - FiveStringBass - Mon Sep 28, 2009 8:46 pm
Hi all,
I've been playing with the example display list in the 3D examples, I added an extra vertex and colour, and wanted to add an extra quad to the list. However, the new quad does not show up. I know i'm not specifying a colour for each new vertex on the 2nd quad, but shouldn't it be drawn in the last colour that was set, i.e. white (31,31,31)? The GL state should be set to quads and the draw colour set to white unless I change it in the meantime, shouldn't it?
Also, is the initial number a count of the commands (i.e. FIFO_BEGIN, FIFO_COLOR, FIFO_VERTEX16, FIFO_END/FIFO_NOP), or is it a count of the data being pushed onto the queue (e.g. if you take the original triangle it was specified with 12 commands, and you would need 3 vectors and 3 colour values to specify it (so 3 * xyz = 9 values + 3*rgb values = 12 in total))?
Thanks,
5SB
I've been playing with the example display list in the 3D examples, I added an extra vertex and colour, and wanted to add an extra quad to the list. However, the new quad does not show up. I know i'm not specifying a colour for each new vertex on the 2nd quad, but shouldn't it be drawn in the last colour that was set, i.e. white (31,31,31)? The GL state should be set to quads and the draw colour set to white unless I change it in the meantime, shouldn't it?
Code: |
u32 triangle[] = { 22, FIFO_COMMAND_PACK(FIFO_BEGIN, FIFO_COLOR, FIFO_VERTEX16, FIFO_COLOR), GL_QUAD, RGB15(31,0,0), VERTEX_PACK(inttov16(-1),inttov16(-1)), VERTEX_PACK(0,0), RGB15(0,31,0), // FIFO_COMMAND_PACK(#FIFO_VERTEX16, FIFO_COLOR, FIFO_VERTEX16, FIFO_END), FIFO_COMMAND_PACK(FIFO_VERTEX16,FIFO_COLOR, FIFO_VERTEX16, FIFO_COLOR), VERTEX_PACK(inttov16(-1),inttov16(1)), VERTEX_PACK(0,0), RGB15(0,0,31), VERTEX_PACK(inttov16(1),inttov16(1)), VERTEX_PACK(0,0), RGB15(31,31,31), FIFO_COMMAND_PACK(FIFO_VERTEX16, /*FIFO_COLOR*/ FIFO_VERTEX16, FIFO_VERTEX16, FIFO_VERTEX16), VERTEX_PACK(inttov16(1), inttov16(-1)), VERTEX_PACK(0,0), // RGB15(31, 0, 31), VERTEX_PACK(inttov16(-1),inttov16(-1)), VERTEX_PACK(inttov16(-1),0), VERTEX_PACK(inttov16(-1),inttov16(1)), VERTEX_PACK(inttov16(-1),0), VERTEX_PACK(inttov16(1),inttov16(1)), VERTEX_PACK(inttov16(-2),0), FIFO_COMMAND_PACK(FIFO_VERTEX16, /*FIFO_VERTEX16*/ FIFO_NOP, FIFO_NOP, FIFO_NOP), VERTEX_PACK(inttov16(1),inttov16(1)), VERTEX_PACK(inttov16(-2),0), // VERTEX_PACK(inttov16(1), inttov16(-1)), // VERTEX_PACK(inttov16(-1),0) //////////////// }; |
Also, is the initial number a count of the commands (i.e. FIFO_BEGIN, FIFO_COLOR, FIFO_VERTEX16, FIFO_END/FIFO_NOP), or is it a count of the data being pushed onto the queue (e.g. if you take the original triangle it was specified with 12 commands, and you would need 3 vectors and 3 colour values to specify it (so 3 * xyz = 9 values + 3*rgb values = 12 in total))?
Thanks,
5SB