MadDog posted on May 24 2006 at 10:47 AM said:Dzz, do you know if the display width value register has to be the same as the physical width or if its a stride? If its a stride value then your be able give your self a gardband cutting down on required clipping, not sure if that would help. Also do you know the cost of a memory exception? You could setup the protection unit to stop the rendering of the current tri on the bottom edge, removing a clip plane you need to worry about. Just some crazy ideas of the top of my head.
MadDog posted on May 24 2006 at 10:43 AM said:How did you deal with sprites that were bigger than your safe area off the side of the screen comming back on the opposite side? ( I suppose if its big enough then you don't )
Did you also use the protection unit to stop drawing off the bottom?
Dzz posted on May 24 2006 at 03:35 PM said:I had been working on triangle clipping for quite a while but the code got so long and ugly that I put it on hold for now. In these demos I'm doing the clipping in the rasterizer, with a special case triangle rasterizer version for triangles that "need clipping". Basically, just adjusting the top scanline if needed, adjusting the left pixel and width of a scanline, then stopping when the bottom is hit. It's probably not as efficient as doing it earlier but it was pretty easy.
I'm using a subtraction method. There's a sweet-looking approximate one-over-z implementation in the Vincent stuff that uses two iterations of NR that I'm thinking of stealing for perspective-correct mapping needs.MSweeney posted on May 24 2006 at 02:47 PM said:Hey are you guys doing Divides using Subtraction method or Newton-Raphson ? I ask because NR on the ARM is upto 3 times faster than trail sub method but I am having problems understanding the error bounds theory of NR.. I have the basic theory down for iterating and initial estimate but correcting error is a bit tricky.
Anyway any hints or suggestions?
Cheers.
Matt
Dzz posted on May 24 2006 at 02:40 PM said:I'm using a subtraction method. There's a sweet-looking approximate one-over-z implementation in the Vincent stuff that uses two iterations of NR that I'm thinking of stealing for perspective-correct mapping needs.MSweeney posted on May 24 2006 at 02:47 PM said:Hey are you guys doing Divides using Subtraction method or Newton-Raphson ? I ask because NR on the ARM is upto 3 times faster than trail sub method but I am having problems understanding the error bounds theory of NR.. I have the basic theory down for iterating and initial estimate but correcting error is a bit tricky.
Anyway any hints or suggestions?
Cheers.
Matt
I'm not sure what method the divide routine supplied by gcc uses.
Vincent is a software library; the author is working on porting it to the gp2x. See:MSweeney posted on May 25 2006 at 01:41 PM said:Hey thanks, whats the 'Vincent stuff?' something I can download from the site?
Matt
Hey, getting something working is a great starting point!rixed posted on May 25 2006 at 03:38 PM said:Just to let you know that my little gpu940 project is now workable : it compile both on PC and GP2X, and on GP2X all rendering, clipping and projections are done by the 940. video buffer swapping is done under interrupt, and the OSD display some perf meters.
Those are badly needed, sadly, because the whole thing is very slow : for a single true-perspective textured polygone (size of the screen), it needs 2 VBL to render a frame (75% of CPU time into ploting functions).
So, after the advertising, a question : the 920 is clocked at 100Mhz under gp2xmenu. What about the default clocking of the 940 ? Is it 100MHz by default also ?
URL with CVS browsing here : http://gna.org/projects/gpu940
Dzz posted on May 26 2006 at 12:01 AM said:What file has the scanline inner loop?
That's me, BTW... ...in case you have questions or so...Dzz posted on May 25 2006 at 12:47 PM said:Vincent is a software library; the author is working on porting it to the gp2x. See:MSweeney posted on May 25 2006 at 01:41 PM said:Hey thanks, whats the 'Vincent stuff?' something I can download from the site?
Matt
http://ogl-es.sourceforge.net/
Even if it's maybe too late, I decided to post here some links to my old 3d engine ported from GP32 to my brand new GP2X these days:
http://www.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,38,1619
http://www.freewebs.com/optimus6128/ZeEngineGP2X.htm
Optimus
p.s. I have also posted this in the news section.
Thats very impressive! Way better than mine! Cool, i was slowing down a bit, you've given me a boot up the arse to get back to it.
Is it 16bit or palletised?
1) Can the additional gfx copprocesor be used to run any code? Would it be benefficial for gfx code (to rasterize and send directly to the lcd)? I didn't knew it can be used this way. I guess there will be needed some low level programm to check it. Any docs?
2) How do I know in which clock speed my code runs. In my current engine, I guess it must be 200Mhz because the speed of the preview is already double than in my GP32. But I have to know and know how to overclock through my code. Any references for this one?
3) Am I sure that my arrays and variables are 32bit alligned? Should I have some switch in my makefile or compiler to be sure everything is alligned? I just want to be sure I am not making anything wrong and this engine doesn't receive it's full potentional.
Maybe I'll post these questions as a new thread in the coders area too..