View Single Post
Posts: 804 | Thanked: 1,598 times | Joined on Feb 2010 @ Gdynia, Poland
#40
Originally Posted by szopin View Post
Awesome work.
Thank you, but no really, in fact it was a peace of cake...
Originally Posted by szopin View Post
The sound issue is not related to this package only. Sadly sld-mixer from repos supports only .wavs (check this thread:http://talk.maemo.org/showthread.php?t=81792) so either statically including proper one is needed, or some other gymnastics.
I know, I'm aware of it since I bought my N900 in 2009 There is however, in Extras testing, a version which supports more formats ( http://maemo.org/packages/package_in...5+0m5+ogg+mp3/ ), and it didn't uninstall any metapackages or anything on my phone with CSSU stable (someone reported it uninstalls maemo-fremantle-pr or however is this metapackage named) - is it just case of phones with Nokia's PR's?
Originally Posted by szopin View Post
Could you by any chance have a look at Armagetron Advanced? With software GL it is close to playable in speed terms and would be awesome multiplayer game for N900 (except for speed everything else works)
http://forums3.armagetronad.net/view...hp?f=4&t=21548 (link to the GLES discussion on upstream forum, sadly devs from there seem to have abandoned the idea)
https://code.launchpad.net/~aavoodoo (link to the close to finished GLES rewrite;opengles iirc is closer, gles2 bit further away)
Sure, I'll take a look at it during this weekend, but I can't promise I'll make it work. If there is desktop OpenGL rendering engine, I will try to port it to OpenGL ES 1.1 (it's easier for me, I hate writing shaders, etc.)
Originally Posted by szopin View Post
EDIT: oh and btw, probably worth notifying upstream of your work, doubt they will reject piece of code that widens the possible user-base of their project in such a way (open-pandora, iphones... lots of gles only devices)
I know, for upstream the patch dould be better - if you are curious, you may take source code of ubuntu package and replace code in all /src/gui/PainterGL/* classes with my code from /src/gui/PainterGLES classes and it will work... So in fact a better and more proper patch would just update functions in src/gui/PainterGL/* classes and change just a few lines in "main.cpp" and "mk/configure" (and "mk/something", i'm sure i edited two or three files from "mk" directory). Anyway, the code with my patch should be compilable on Pandora AFTER replacing all SDL_gles related calls to their version of SDL_opengl ( SDL_gles library is Maemo-only library and there are few functions which would be not available anywhere else).

Originally Posted by AapoRantalainen View Post
@misiak, I merged your code, but not pushed package to the extras-devel:
https://gitorious.org/lincity-n900/l...19a30cfb529cb1

I added
*compiling without GLES
*sdl/gles can be changed via options
*default=sdl

btw: Android Lincity has also some buggy/experimental gles: http://www.nicolasmy.com/projects/57...-of-Lincity-NG

-> Working gles on upstream would be very great. I haven't yet got any comments about my patches, so I'm not sure who is currently lead maintainer of the Lincity. Also wider discussion about playing on touchscreen would be cool.
You changed default rendering engine to SDL anyway? Ok, the OpenGL can be turned on by using "-g" command line option anyway - I hope you didn't change that
Android Lincity required quite heavy rewrite I guess, as it's different language and must use different libraries...

You know, I've in fact just replaced few OpenGL functions with another ones... My process of porting is:
1. Get your source
2. Restore OpenGL you removed earlier
3. Compile on my ubuntu devel machine
4. It worsk with OpenGL => find in code functions which are in OpenGL but not in OpenGL ES (as OpenGL ES is actually a subset of desktop OpenGL functions)
5. Change this function calls to soething OpenGL ES compatible - but testing is still done on desktop PC, as it is much easier and faster to debug than compiling everything in scratchbox and uploading to my phone...
6. When code is using only OpenGL ES compatible functions - move to maemo scratchbox, replace SDL_opengl initialization/deinitialization and buffer swapping with javispedro's SDL_gles ones (it's really a task for 1-2 minutes, javispedro is the hero here) and adjust compile scripts to use "-lSDL_gles -lGLES_CM" instead of "-lopengl32 -lGL" (also task for only few minutes)

In fact, this whole "port" took me about 3-4 hours overall, including messing up with maemo scratchbox and my ubuntu libraries If Armagetron has working OpenGL rendering engine, it shouldn't take much longer than this to make initial port to OpenGL ES...

Sorry if I made any grammar mistakes which made some sentences unreadable, I have slept really little during past few nights.

Anyone else willing to compare cpu usage on their N900 with SDL and OpenGL ES rendering?

Last edited by misiak; 2012-04-21 at 10:52.
 

The Following 2 Users Say Thank You to misiak For This Useful Post: