#88814 - ikaris - Wed Jun 21, 2006 6:53 pm
Hi everyone,
I'd like to write an exporter for Maya to generate the .h directly.
(I know there's one for Max, but you have to copy and paste a TXT file, then run it through a processor...)
However, I have to say that the FIFO code is not as easy to understand as Immediate Mode rendering !
Can anyone translate this for me ? (its from the display list 1 example... which is crashing for me in Dualis 20.3... see my other post :) )
I understand that first there's a "FIFO_COMMAND_PACK" that contains the data it will be expecting (i.e. the first one is expecting to begin, get some color info, then vertex position info, then color info again).
However, the sequence and why its looking for color twice and vertex position data once before moving onto the next pack is beyond me !
Can anyone clear this one up ?
I've seen this post:
http://forum.gbadev.org/viewtopic.php?t=9830
but it really didn't clear it up for me any more...
Thanks !
I'd like to write an exporter for Maya to generate the .h directly.
(I know there's one for Max, but you have to copy and paste a TXT file, then run it through a processor...)
However, I have to say that the FIFO code is not as easy to understand as Immediate Mode rendering !
Can anyone translate this for me ? (its from the display list 1 example... which is crashing for me in Dualis 20.3... see my other post :) )
Code: |
u32 triangle[] =
{ 12, FIFO_COMMAND_PACK(FIFO_BEGIN, FIFO_COLOR, FIFO_VERTEX16, FIFO_COLOR), GL_TRIANGLE, 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), VERTEX_PACK(inttov16(1),inttov16(-1)), VERTEX_PACK(0,0), RGB15(0,0,31), VERTEX_PACK(inttov16(0),inttov16(1)), VERTEX_PACK(0,0), }; |
I understand that first there's a "FIFO_COMMAND_PACK" that contains the data it will be expecting (i.e. the first one is expecting to begin, get some color info, then vertex position info, then color info again).
However, the sequence and why its looking for color twice and vertex position data once before moving onto the next pack is beyond me !
Can anyone clear this one up ?
I've seen this post:
http://forum.gbadev.org/viewtopic.php?t=9830
but it really didn't clear it up for me any more...
Thanks !