[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fenfire-dev] PEG: move glmosaictext to libvob
From: |
Tuomas Lukka |
Subject: |
Re: [Fenfire-dev] PEG: move glmosaictext to libvob |
Date: |
Wed, 24 Sep 2003 11:19:07 +0300 |
User-agent: |
Mutt/1.5.4i |
On Tue, Sep 23, 2003 at 09:46:33PM +0300, Matti Katila wrote:
> > - This is kind of a problem - GLMosaicText is something others
> > could have used directly while this makes GLMosaicText
> > dependent on Libvob. Is this a problem?
> >
> > RESOLVED: No. The design pressures from Libvob side
> > did already affect GLMosaicText, moving it away from
> > the simplest possible solutions. The code will survive,
> > just not be maintained.
>
> There are text libraries for opengl and the only user for glMosaicText has
> been fenfire so this is not a real issue, though.
Quite so.
> > Changes
> > =======
>
> The interfaces you were proposing seemed to be quite useless without
> knowing current implementation details. So jvk might be the only person
> who understands what's going on.
Well, that's the point of PEGging and having you ask questions: to
ensure others also understand this stuff.
> I added some questions below.
Thank you
> >
> > /** The quad coordinates.
> > * These are stored in a single array so we can, in the future,
> > * bind and download this to the GPU and just index it,
> > * along with a vector of offsets (the cumulative sum of
> > * the advances).
> > * Stored as groups of 8: x0, y0, x1, y1, tx0, ty0, tx1, ty1.
> > */
> > vector<float> coordinates;
>
> If t[x.y][0,1] are texture coordinates, what are [x,y][0,1] coordinates?
They are the coordinates where the quad should be rendered, i.e. a has a smaller
quad than A. Coordinates of the letter.
Good catch, will fix in PEG.
> >
> > /** The advances. Only horizontal text supported here so far.
> > */
> > vector<float> advances;
>
> What?? advances = the advances?
The amount by which the x coordinate should be increased after rendering
a letter.
Good catch, will fix in PEG.
> > CallGLCode setupCode;
> > CallGLCode teardownCode;
> >
> > void setUp();
> >
> > template<class I> void render(I begin, I end);
> >
> > void tearDown();
> >
> > }
> >
> > and in Java (operations mapping to the operations of the preceding class)::
> >
> > public class QuadFont {
>
> Missing class documentation?
Will be about the same as for the above - it's just a Java wrapper
for it.
> > // XXX When needed, add the get() methods.
> >
> > /** Store explicitly the GL.Texture objects
> > * to avoid GC.
> > */
> > private GL.Texture[] textures;
> >
> > /** Set up the textures to use.
> > * @param layers The number of textures to be active at a time
> > * @param texUnits The names of the texunits to bind textures to.
> > * length = layers.
> > * @param textures The textures. length = layers * number of font pages.
> > */
> > public "native" void setTextures(int layers, String[] texUnits,
> > GL.Texture []textures);
>
> why need to give num of layers if it can be calculated from the size of
> texUnits array?
Good point. Fixed in the next PEG version. This also changed
to separate texUnits to texture *binding* units and coordinate units.
Tuomas