|
|
|
|
|
|
Make "demo2d.elf" work.
Posted on 2005-09-01 00:00:00 |
|
First, I've added the LB instruction which fixed the problem where the demo goes into an infinite loop.
The rectangles where the text should be placed then started to appear, but the wrong texture coordinates were applied to those sprites because I wasn't using the coordinates provided by the UV register before. The coordinates were hardcoded as (0, 0) and (1, 1) so that we'd see all the font texture in one rectangle. I've changed the GS handler a bit to use the UV register values and the text shows right now. Then, I've tweaked a bit with the demo to remove the annoying delays so I could see what happens next: Those are screen shots taken from nSX2 that shows the next 2 screens. The blue rectangles were missing at first, because the case where we have a sprite primitive using ST/RGBAQ coordinates and no texturing wasn't implemented. I tweaked the GS handler again to save the RGBAQ register and added the case to render those coloured rectangles. Here's what I'm getting now: We can see that I'm still missing the nice yellow outlines. Those were made using coloured line strips and this kind of primitive isn't handled yet. We can also see that all the text is blended against the background for some reason in nSX2... I've checked the display lists and they are indeed being rendered with a previously set alpha blending formulae and with alpha blending enabled. But I'm not sure if that was the desired behavior or not. So, the next things to look forward to are the implementation of the line strip primitive and preliminary alpha blending support. |