[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] 3D games in Chicken

From: Shawn Rutledge
Subject: Re: [Chicken-users] 3D games in Chicken
Date: Sat, 11 Feb 2006 23:43:18 -0700

On 2/11/06, Peter Keller <address@hidden> wrote:
> Yeah, then definitely mix the truetype library with opengl. I found a link
> with a ridiculous amount of knowledge on it:

That looks very useful, thanks.

> Sure, here is a transform which will setup up the window as a 2D coordinate
> system with the origin in the upper left hand corner:
> glViewport(0, 0, w, h);
> glMatrixMode(GL_PROJECTION);
> glLoadIdentity();
> glOrtho(0, w, h, 0, -1, 1);
> glMatrixMode(GL_MODELVIEW);
> glLoadIdentity();
> You can pick where you want the origin to be with glOrtho()....
> Then when you want to set the raster position at a pixel position, do this:
> glVertex2i(x, y);
> glRasterPos2i(x, y);
> If you're mixing 2d and 3d, then lookup the implementation of
> MESA_window_pos() in raw Opengl and use that so you dn't disturb the
> current opengl settings when switching back and forth.

OK, thanks.

> After skimming the OpenGL ES docs, it appears that it can natively
> deal with fixed point mathematics. And so you're asking (in essenace)
> can the numeric tower be implemented in fixed point?

Yep, exactly.

There would need to be predicates available to distinguish them, of
course.  But hopefully in practice you wouldn't care most of the time.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]