PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Pitch questions

I'm trying to port my 3d engine to PocketHAL. It's so well
designed that I can't rotate the image properly without
messing everything :) so I'd like to work in ORIENTATION_ROTATE90CCW
and ORIENTATION_ROTATE90CW modes, but I have some questions:

* Does ROTATE90C(C)W modes exists in all pocket PCs?

* Is width always assured to be 320 and yPitch +/-640 in
those modes? (in 320x240 devices).

* Is xPitch always 2?

I suppose most answers will be no, just to reserve a chance
if things/optimization change in the future, however I'm more
interested in answers for today's devices (i.e. all of them
have ROTATE90C(C)W modes despite next models may no have them)
rather than future devices.



I can't say this for sure (unfortunately I'm very busy for
the moment and I read lots of things and I end forgetting the
place I read some things ;) ) but I think someone was talking
about a screen mode using interleaved zbuffer and screen
data pixels which may speed up 3d engines. Is this a feature
or just a project? (or I just read this somewhere else)

TIA :)
Kak (forgot the password. again.)


:P
Kak- wrote:* Does ROTATE90C(C)W modes exists in all pocket PCs?


Yes, all current PPC support both modes.

Kak- wrote:* Is width always assured to be 320 and yPitch +/-640 in
those modes? (in 320x240 devices).


In these two modes, width will be 320. But the pitch can be different (640 or larger).

Kak- wrote:* Is xPitch always 2?


Yes, always 2.


Kak- wrote:
(...) but I think someone was talking about a screen mode using interleaved zbuffer and screen data pixels which may speed up 3d engines. Is this a feature or just a project? (or I just read this somewhere else)


It ain't a feature of PocketHAL (yet). I guess I could add it eventually, but the fact is that if you want fast 3D on the PPC, you should not use a Z buffer at all.
Thierry wrote:
It ain't a feature of PocketHAL (yet). I guess I could add it eventually, but the fact is that if you want fast 3D on the PPC, you should not use a Z buffer at all.


great to know those answers, they'll fit perfectly the engine :)

I agree, fast 3D on the PPC requires no z buffer, but (from my experience) having z buffer is not as slow as I initially thought. You can sort polys by its texture (rather than depth), maximizing cache hits in texture access (something you can't do sorting triangles as you must draw back to front) and you can use the 1/Z interpolated values from perspective correction to fill the z buffer.

and even more ;) I hate sorting functions as they always have some problems with triangles poping over other triangles from time to time, which it's something I really don't like, so it seems zbuffer was done for me ;)
Kak- wrote:
I can't say this for sure (unfortunately I'm very busy for
the moment and I read lots of things and I end forgetting the
place I read some things ;) ) but I think someone was talking
about a screen mode using interleaved zbuffer and screen
data pixels which may speed up 3d engines. Is this a feature
or just a project? (or I just read this somewhere else)


That is how PocketGl works. When I tried rewriting to work with gapidraw, I did 2 versions. One simply wrote the pixels from the interleaved buffer to the gapidraw back buffer. The second separated the buffer into separate screen (using the gapidraw backbuffer directly) and z buffers. Despite the additional expense of copying the pixels to the gd buffer, that 1st method was significantly faster than the 2nd (18fps to 14fps) for full screen 3d.

As a comparision, the yeti 3d port (http://www.theteahouse.com.au/gba/)does fullscreen 3d at about 30fps with no z buffer.

Howabout using a scan buffer, faster than a z buffer and you can still sort by textures ?
Mr X wrote:
That is how PocketGl works. When I tried rewriting to work with gapidraw, I did 2 versions. One simply wrote the pixels from the interleaved buffer to the gapidraw back buffer. The second separated the buffer into separate screen (using the gapidraw backbuffer directly) and z buffers. Despite the additional expense of copying the pixels to the gd buffer, that 1st method was significantly faster than the 2nd (18fps to 14fps) for full screen 3d.


wow, quite an improvement! I'll try it as soon as I get some spare time :)

Mr X wrote:
As a comparision, the yeti 3d port (http://www.theteahouse.com.au/gba/)does fullscreen 3d at about 30fps with no z buffer.


yes, I saw it, really impressive and nice lightning effects! :)

Mr X wrote:
Howabout using a scan buffer, faster than a z buffer and you can still sort by textures ?


yes, the span buffer was the next thing to test but just then I had some busy weeks and I had to leave the engine. Once I came back I decided it was enough for the moment with the zbuffer, so I'm trying to get something out of it :)
anyway I love making little games, not engines, so I'll suppose span buffers will have to wait for two releases at least ;)

Kak (forgot its password again)