Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: Official RIVA thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
I am getting the feeling that for bigger images, I end up closing the InputStream as I'm still reading from it, thus the padded null... Wink
batwater Wrote:Okay, what is the "Standard RIVA client" and where do I find it? I have iRIVA, taRIVA, there's .net RIVA (not using) and the IV.


You have to ask to have it installed. It won't be by default. So run a fully custom install and just add it as you are going through.
I have verified that on the RIVA client the test template renders the images from the MyMovies repo as expected.

Dean is talking about the .net riva. You can run it on your Windows computer. It doesn't have to be installed on a mobile device.
Actually there is a Windows RIVA client that can be installed as a part of the CQC installation process.

batwater Wrote:Actually there is a Windows RIVA client that can be installed as a part of the CQC installation process.


Oops, you're right. I know I've installed the Windows version, but that isn't the same as the .net version.
I'm testing my client against SamVimes' autorotating template, which switches from 320x480 to 480x320 when the iPhone is rotated from portrait to landscape. As I expect, the NewTemplate messages are telling me the proper size, either 320x480 or 480x320. However, after rotation the EndDraw messages tell me that the area to be updated is 480x480.

In version 1 of the protocol, I would use the EndDraw size to determine the scrolling content size. But in version 2, I have the NewTemplate messages to give me that more accurately. So my question is, if I have received a NewTemplate, can I always limit my scrolling content size to the size given by the NewTemplate message, and ignore the EndDraw size? That would work well in the case I describe above, but I want to make sure there aren't situations where no NewTemplate gets sent, in which case I might wind up cutting off legitimate content because I'm using an out-of-date template size.
The reason for that is that the part that was there was 480 wide and the new part is 480 tall. It doesn't know that you don't have enough to display both of those, and, if you did, you would want to clear the area out to the right, so it's background filled and that's why you get that part included in the full redrawn area.

As a general rule you can always clip any output that you are asked to draw to your actual drawing area if that makes things more efficient, i.e. because some things won't actually get drawn.
But I do have the ability to display the full 480x480, by scrolling. So up to now, that's what I have done. It starts out 320x480, with no scrolling, but when you turn the device to landscape, the EndDraw tells me 480x480, so I enable scrolling. However, because the template specifically switches to 480x320 when the device is oriented as landscape, the effect of the scrolling is to show you a blank bar of 480x160 below the template. The scrolling is undesirable; it never shows anything useful.

Now that I receive a NewTemplate message telling me that the template is really 480x320, I could use that information to override the rectangle passed to me by EndDraw. Even when EndDraw tells me 480x480, I know the content is really 480x320, because that's what NewTemplate said.

But I'm hesitant to do this, because I wonder why the RIVA server itself isn't using the same logic. It knows internally that the template is 480x320, but it still spits out the full 480x480. Why is that? Should I do the same thing for safety?
It's because it has no idea what the actual size of the screen is, and it definitely doesn't comprehend things like a screen that can rotate and what orientation it might be in. If it was being displayed in an 800x600 window and it might well be, and it didn't redraw over that part out to the right that was being drawn into and now isn't when the new (tall/skinny) template is loaded, it would leave part of the previous template out there still visible. Since it had to draw into that area to erase it, that area is included in the area redrawn.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39