PocketMatrix forums

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

ANN: OpenGL port for PocketPC

I have made an OpenGL port for the PocketPC based on the TinyGL source code. This is still a very early port so the performance is not the greatest, but the samples I have tried (from the TinyGL source code and various other OpenGL source code) worked alright on my iPaq 3630.
My OpenGL interface itself is closely based on the standard Windows implentation of OpenGL, so it should be possible use any OpenGL source code for Windows and try to compile it with eVC (making the appropriate changes to the window creation code etc.).
The source code for my OpenGL port can be downloaded from http://www.sysdesk.de/download/OpenGL-PocketPC-0.1.zip. There is also a precompiled version of the included GLSample application for ARM PocketPCs available at http://www.sysdesk.de/download/GLSample-ARM.zip

I am releasing this as Open Source to the PocketPC developer community because I think it might be interesting and useful to others. I would be happy if any other interested people might join in the development of this port.
Finally! It's about time something like this was produced, and unfortunately it had to be done by a volunteer for free (as opposed to having MS, Intel, etc produce it as they should have).

Are you using the Intel Graphics Primitives for your rasterizers? How would this be used by a commercial application? As an external DLL?

Dan East
Well, job #1 is to get rid of the floating point math. That will improve performance dramatically.

Dan East
angedelamort · 10 Nov 2002, 22:03 UTC
Microsoft will soon release a "directX mobile edition". It will have a lot of interesting features. I'm eager to see the performance and if it will support video hardware. But for now, It's great that someone is porting openGL for ppc. Maybe, when I'll have time, I'll have a look at your code more deeply. But, as Dan said, use fixed point instead of floating point :) It should take you some time to do it :P
Well, if MS releases anything substantial, then I would bet that it would only support the .NET devices when they come out. MS has been really good about abandoning older hardware / versions of Windows CE. Plus, the way things are going now, we are far better off with pure software (ie sourcecode) libraries. Ask any serious game developer that is trying to support SmartPhone, etc. The less hardware / binary library dependant we are, the better off we are in the world of Pocket PC. Especially when you've got devices like the Casio BE-300, which at $129 is easily the most powerful PDA you can buy for the money. You need full access to all sourcecode (maybe with the exception of FMod which seems to support everything already) to support diverse non-Pocket PC devices such as that Casio.

Dan East
As an example, take DirectPlay for CE. It only technically supports Pocket PC 2002, which means MIPS and SH3 is not supported. I have gotten it to work somewhat on my ARM PPC 2000 device, but one particular API call locks up the device, even with the precompiled demos. So after seeing that it is buggy on PPC 2000 hardware, of which there are well over a million devices out there, plus it doesn't support SmartPhone, or the BE 300, I decided it wasn't for me.

Dan East
The demo does look pretty cool though. It would be great if you could make a version optimized for the Xscale.
Conan · 11 Nov 2002, 12:21 UTC — OpenGL on PocketPC
If the performance is improved this could become a very useful tool. I use PocketGL at present which is not OGL compatible so a true clone of OGL would be very useful. PocketGL does use integer maths for speed so it's probably worth looking at for hints on going from floating point to fixed point maths.

I have converted quite a few OGL samples to PGL so when I get time I will try one of them on this port.

Well done so far.
Not only would this library give ppc owners a more powerful graphics programming language and allow porters to port many windows based project more easily, it may also encurage pc developers to release ppc versions of their current, or slightly older games.
Conan · 13 Nov 2002, 10:05 UTC — OpenGL, PocketPC
I had a quick look through the source code. Very interesting to compare with PocketGL. Lots of similarities though PGL has it's own co-ordinates systema and is all integer maths.

I need to see how regular OGL programs load meshes & textures as the demo 'cogs' program creates them in code but otherwise it looks pretty good.

I'm useless at 3D coding so I can;t assist in making it work without floating poinbt but I very much hope that happens.
Quirk · 16 Nov 2002, 11:30 UTC — Open GL - Demo
First of all its great news to see an OpenGL-port on the CE-horizon. So thanks for your efforts so far.

About the Demo:
It seems to drop every second line on my LOOX, but draws a number (3) of overlapping copies that are horizontaly shifted.

That is probably not how it should be?

Regards
Sorry for joining the discussion again so late, but I'm only able to access the forums and my email on the weekend.
First to Dan's question: I think TinyGL (Fabrice Bellard's OpenGL implentation which I have used) is using its own rasterizer engine. BTW, I think I forgot to mention the TinyGL link in my first post: http://fabrice.bellard.free.fr/TinyGL/

I will work on the fixed point math first, but unfortunatly my development time is limited to weekends at the moment.
It might also be a good idea to use look-up tables for the trigonometric functions which should also increase the speed.
Concerning XScale and other device-specific optimizations: I've only got an iPaq 3630 at the moment, so I won't be able to do any work in this field yet. This also includes device-specific display problems like Quirk's. Maybe there are some volunteers who could see to this?
Look at the zbuffer.c file for the different display modes and rastering stuff.
Thanks for your contrebution to the PocketPC development community! 8)

I quickly built the dll and the cogs demo for my Toshiba e310 and there is a problem with the display. Display is banded, so I think you have the y-pitch wrong on my device, but ive not had a look at the code yet.

Do any other devices have this problem or is it just mine?

Runs at about 5FPS.