PocketMatrix forums

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

3D Integration?

Hiya! I was wondering if it would be possible to integrate some 3D API (ie D3D or OpenGL) into a GapiDraw framework.
There is a version of OpenGL for the ppc available, and someone is/was working on a 3D layer for GapiDraw (search this forum). There are a couple of commercially licensable 3D APIs out there for the ppc, but their performance and stability wasn't all that impressive in my opinion.

-- GR
Ok, thanks. Now what about the fact that GapiDraw takes over the screen? Is is possible to create an OpenGL RC on the DC of the app, without interfering with what GapiDraw is doing?

Note: For the most part, this is only going to apply to standalone PC's (until PPC's can maintain the performance that is ^_~)
I was working on the PocketPC port of TinyGL with some other people, which you may find in the general developer forum on PocketMatrix. My job was to convert the whole thing to fixed point math.

I had to put that on hold as I have more pressing projects in the work, but the other guy working on this was really good and I wouldn't be surprised if he had some success as of now. I don't know if he has a web site however.

As a technical sidenote, for those that care, we had two seperate approach to the conversion. His was to rewrite plenty of stuff using integer, mine was to first convert the whole thing to C++ (it was in plain C), then create a full featured FixedPoint class.

My approach was to get results as soon as possible, include support for GapiDraw, and then optimize.

This is what I started and I still think it can be done, but I don't have much time to work on it for the moment.

When I stopped working on this he had converter the whole rasterizer to fixed point math, so maybe he has a working version by now.

I think something more like OpenGL would be a good alternative since it would be free and open source.

--Eric
InexorableTash · 25 Feb 2003, 18:44 UTC
Speaking of 3D layers...

I haven't had any time to work on my "Gapi3D" layer atop GapiDraw for a few months now, and rather than letting the project go stale I'm willing to donate it - lock, stock & barrel - to one or two people who could finish it up and release it with a license similar to GapiDraw.

If you're interested, *and* can commit the time and resources, please email me at: inexorabletash@hotmail.com

Current features:
- Runs on top of GapiDraw
- API similarity to DirectX 7
- Fixed point math used throughout
- Full Transform & Lighting pipeline
- Point and Directional lights
- Specular, diffuse, ambient and emissive lighting
- Materials
- Textures (single pass) with wrap/clamp/border/mirror modes
- Texture Blend modes
- Z-buffer
- Chroma-key transparency
- A gazillion render states
- Primitives: Triangle list, strip and fans
- Flexible vertex format, allowing for per-vertex colors

To-Do List:
- True frustrum clipping
- Support for line and point primitives, plus wireframe mode
- Support CGapiSurface as texture
- Perf optimizations to render core (16->32 bit mem access)
- Fog
- Alpha transparency
- Pull it into a DLL
Wow, it seems you have a pretty good fondation! Do you have any compiled demo? I'm curious to see what you got working so far.

--Eric
InexorableTash · 26 Feb 2003, 05:45 UTC
Does your 3D layer use Direct3D if on a desktop PC?

It'd be nice if GapiDraw let you reference some of the DirectX stuff it's doing on desktop PC's... That way you could create some Direct3D devices and whatnot.
InexorableTash · 27 Feb 2003, 07:33 UTC
Nope. I'm not even sure if that could be done on top of GapiDraw. At any rate, it runs 5-10 times faster on a 400MHz desktop machine than a 200MHz iPAQ, so unless you're planning to have two very different capability sets between your desktop and handheld version of an app, it's not a serious limitation.