maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   3D Graphics Library for maemo with OpenGL wrapper (https://talk.maemo.org/showthread.php?t=29539)

mattdamonkey 2009-06-13 03:24

3D Graphics Library for maemo with OpenGL wrapper
 
Dear members of the maemo community,

at risk of getting completely outdated by the release of maemo 5, I have decided to make public a small project I put together by implementing a software 3D graphics library for maemo 4:

http://kgraphics.sourceforge.net/

this includes a *minimal* OpenGL wrapper that could be of some help for those of you wanting to port applications to maemo. Please bear in mind that this falls rather short of the full GL functionality.

Also included are some coding examples; here is a little screenshot of one of them:

https://sourceforge.net/dbimage.php?id=219138

Hope that some of you may find it interesting, at least for some coding fun.:D

Best regards

Matt da Monkey

PS I will try moving it to garage, if the project gets accepted

Thesandlord 2009-06-13 04:25

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Cool! I remember seeing the OpenGL gears demo run on the n810, so there must have been another port also.

elschemm 2009-06-17 21:18

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by mattdamonkey (Post 296229)
Dear members of the maemo community,

at risk of getting completely outdated by the release of maemo 5, I have decided to make public a small project I put together by implementing a software 3D graphics library for maemo 4:

http://kgraphics.sourceforge.net/

As of today (17 Jun 09), the download link on the page referenced above does not work. :(

javispedro 2009-06-17 22:01

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Pretty nice. I was thinking of porting TinyGL... I ported it to PalmOS a year ago and got 4-5 glxgears fps on a Palm T|X and nearly 10 fps on GarnetVM (next to nothing).

This seems already better.

mattdamonkey 2009-06-17 22:26

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by elschemm (Post 297586)
As of today (17 Jun 09), the download link on the page referenced above does not work. :(

This is my fault, as I haven't defined any release package as such; what it is available through the repository is the source, which can be downloaded as a tarball:

http://kgraphics.svn.sourceforge.net...ar.gz?view=tar

I will tidy it up on the weekend, and put it up in garage.

Regards

da Monkey

pigling 2009-06-19 02:43

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
will this compatiable with OpenGL ES interface? So excited to see such a library for Maemo 4. I have searched wiki and find Kate made some suggestion for opengl es on mameo but only for next generation fremantel.
If help needed, please let me know although I am newbie for OpenGL. Currently reading OpenGL SuperBible 4th edition. :)

mattdamonkey 2009-06-21 22:41

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by javispedro (Post 297596)
Pretty nice. I was thinking of porting TinyGL... I ported it to PalmOS a year ago and got 4-5 glxgears fps on a Palm T|X and nearly 10 fps on GarnetVM (next to nothing).

As a matter of fact I tried porting the routines in the rasterisation backend of kgraphics to PalmOS some years ago (they were originally coded for the Pentium I back in 1997). The performance I got on a dragonball-based machine (T|W) was dysmal, but I got some better results on a arm-based Treo 650 (12fps rendering a flat shaded mesh with 1200 polys at 320x320). From what I could read on TinyGL, it uses floating point, which is not supported natively on the arm models used by palm, hence the low performance. Probably a build on the N810 should fare much better, as FP is supported and practically as fast as fixed point arithmetic.

Just out of curiosity, would you happen to know how to produce a PACE dynamic library for PalmOS? I tried using the Garnet SDK distributed by Access but I could only do 68K dl's. I've to add the code to the executable, thus I never though about releasing it...

Thanks

da Monkey

mattdamonkey 2009-06-21 22:48

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by pigling (Post 297823)
will this compatiable with OpenGL ES interface? So excited to see such a library for Maemo 4. I have searched wiki and find Kate made some suggestion for opengl es on mameo but only for next generation fremantel.
If help needed, please let me know although I am newbie for OpenGL. Currently reading OpenGL SuperBible 4th edition. :)

I'm afraid the OpenGL support in the wrapper does not even cover the ES standard. It was never meant to be comprehensive, but only to serve as a quick and dirty way to prototype some ideas and effects while compiling from the N810 itself. I normally extend it as the need appears; if you feel like doing so yourself you're very welcome to contribute.

Regards

da Monkey

javispedro 2009-06-21 23:47

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by mattdamonkey (Post 298499)
Just out of curiosity, would you happen to know how to produce a PACE dynamic library for PalmOS? I tried using the Garnet SDK distributed by Access but I could only do 68K dl's. I've to add the code to the executable, thus I never though about releasing it...

Not at all, but I would start looking at http://www.mobile-stream.com/devzone.html .

Either way and since it seems that requires the propietary, Win32 only "pacc.exe" compiler, I believe the best way to do arm so's is to just use a "PNO Loader on steroids" like peal, which can also act as a dynamic linker (it is in fact a bare-bones elf linker). The linker itself being 68k code means you could call any PNO function from any 68k code.

qole 2009-06-22 17:34

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
I'm very interested in some performance numbers, if you have them...

mattdamonkey 2009-06-22 21:01

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by qole (Post 298695)
I'm very interested in some performance numbers, if you have them...

Sure, the samples output some performance metrics when used with the verbose switch on ("-v"). VProc and Raster stand, respectively, for the vertex processing and rasterisation times in milliseconds. A Quake 3 model of around 1500 polygons with an alpha blended texture renders at around 20fps with doubling up enabled ("-d") and 16fps in full resolution. The lava lamp example runs at 8 fps.

The libraries are heavily fill-rate bound, but better performance can be achieved by using the simplier shading routines (dropping alpha blending and texture modulation).

Hope that this helps, if you have any problem running the examples please let me know.

da Monkey

mattdamonkey 2009-06-22 21:05

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by javispedro (Post 298506)
Not at all, but I would start looking at http://www.mobile-stream.com/devzone.html .

Either way and since it seems that requires the propietary, Win32 only "pacc.exe" compiler, I believe the best way to do arm so's is to just use a "PNO Loader on steroids" like peal, which can also act as a dynamic linker (it is in fact a bare-bones elf linker). The linker itself being 68k code means you could call any PNO function from any 68k code.

Thanks, I will give this a look to see how feasible it can be to get these libraries ported back to PalmOS. Hope they have some better debugging tools for PACE than the official SDK... it was all guess work!

da Monkey

javispedro 2009-06-22 21:13

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by mattdamonkey (Post 298764)
Hope they have some better debugging tools for PACE than the official SDK... it was all guess work!

It's still mostly guess work.
Maemo is so easier... I've already stopped all of my POS development :)

lcuk 2009-06-22 21:48

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
nice,
i got tinygl working a while back and for simple stuff its extremely feasible, i don't see this as being any less effective :)

for pure performance, how much of a rewrite for 3d on a YUV surface.. ?
(hint, start with greyscale only)
at the moment, there is a 20-30% graphical advantage by using it, even more for grey only. thats across the board - less blitting and also less to transfer to the hardware.

qole 2009-06-22 22:34

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Oh, I would be very interested to see what kind of optimization can be achieved if mattdamonkey and lcuk start collaborating on it...

20-30% improvement would be huge. The 8 fps example would jump to 10 fps, and the 20 fps example would leap up to 24-26 fps. Wow.

mattdamonkey 2009-06-24 06:54

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by lcuk (Post 298779)
for pure performance, how much of a rewrite for 3d on a YUV surface.. ?

Thanks for the idea, I will try definitely try that. Lucklily there is not much of a rewrite involved, everything related to the pixel format is controlled by macros. I don't think that most of the performance goes on the blitting though, but on per-pixel operations (texture fetches/modulation/alpha blending).

Cheers

da Monkey

mattdamonkey 2009-06-24 06:57

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by javispedro (Post 298766)
It's still mostly guess work.
Maemo is so easier... I've already stopped all of my POS development :)

Gosh, in that case I won't even try it. Having to debug native code without symbols is just mind-numbing... porting software like ScummVM and Little John to this platform would have been quite a feat!

Regards

da Monkey

www.rzr.online.fr 2011-04-10 12:51

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
have you ported glxgears to it to compare ?

nicholes 2011-04-10 14:18

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
is this some kind of software which can open .dae files???? like capsule 3d viewer does.

if so then then i have downloaded the file what to do next ??? (i am noob sorry)

nicholes 2011-04-11 11:17

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by nicholes (Post 985044)
is this some kind of software which can open .dae files???? like capsule 3d viewer does.

if so then then i have downloaded the file what to do next ??? (i am noob sorry)

plz answer this

javispedro 2011-04-11 14:11

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
Quote:

Originally Posted by nicholes (Post 985044)
is this some kind of software which can open .dae files????

No.
Find another thread.

www.rzr.online.fr 2011-05-02 11:29

Re: 3D Graphics Library for maemo with OpenGL wrapper
 
can this lib be used to build libqt4-opengl ?


All times are GMT. The time now is 17:24.

vBulletin® Version 3.8.8