PocketMatrix forums

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

fixed point math question

Hi

Ive been putting together a game framework over PocketFrog and I now need to implement a fixed point math library of some kind.

I understand the concept, and have implemented a simple system using defines, but at some point im going to need some trig functions,

im interested in a number of things:

What strategies have you used to do this, im guessing a class or function list with lookup tables?

Is there any free libs out there already written, cos im lazy and don’t like reinventing the wheel (yes ive googled)

Ive been looking at the Intel® Graphics Performance Primitives which looks exactly what I want, but obviously its no good as I need to target a lager PDA market, but are there any optimised libs for older cpus I could conditionally implement?

Thanks
Structure wrote:Hi

What strategies have you used to do this, im guessing a class or function list with lookup tables?

Is there any free libs out there already written, cos im lazy and don’t like reinventing the wheel (yes ive googled)

Ive been looking at the Intel® Graphics Performance Primitives which looks exactly what I want, but obviously it no good as I need to target a lager PDA market, but are there any optimised libs for older cpus I could conditionally implement?

Thanks


To get you started:

http://cvs.sourceforge.net/viewcvs.py/ogl-es/ogles/src/fixed.h?rev=1.21&view=auto
and
http://cvs.sourceforge.net/viewcvs.py/ogl-es/ogles/src/fixed.cpp?rev=1.7&view=auto

- HM
Fantastic hm, I was looking around for quite a while, didn’t think of looking at a opengl es implementation for one , der........ :roll: