[Top][All Lists]

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

[Freetype] Re: [Gltt-discuss] help with openGL (bitmap vs filled polygon

From: Gerard Lanois
Subject: [Freetype] Re: [Gltt-discuss] help with openGL (bitmap vs filled polygons)
Date: Thu, 20 Sep 2001 09:54:04 -0700 (PDT)

--- Wallace Chigona <address@hidden> wrote:
> Gerard Lanois wrote:
> > 
> > Set up your projection and viewing matrices so that 1 unit in world
> > space equals 1 pixel in window space.  If you are drawing your
> > characters in an arbitrarily defined 3-space, you will first need
> > to project their locations into window space (probably by using
> > gluProject()).
> > 
> First, I am not sure how I would do that,  I  have to check.  But what
> guarantee would I have that the relationship between my world space and
> the screen space would remain like constant?  What happens when the
> screen size changes?  (I am using perspective projection).

It is a two-step process.

The first step is to take all the locations where you wish to
draw text in your 3D world, and project those 3D points into
2D window space using your persepective projection.  Go ahead
and draw all your 3D items, but do not draw the text.  

The second step is to create a window-space coordinate system
(use glOrtho) where 1 unit in space equals 1 pixel in the
window.  With this projection in effect, go ahead and draw
your text items using the projected coordinates you obtained
in the first step.


Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information

reply via email to

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