chicken-users
[Top][All Lists]
Advanced

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

Re: Re : [Chicken-users] Scheme (LISP) editing


From: Shawn Rutledge
Subject: Re: Re : [Chicken-users] Scheme (LISP) editing
Date: Fri, 2 Mar 2007 10:27:41 -0700

On 3/2/07, minh thu <address@hidden> wrote:
I'm on the gl-display api, have a working gl-display-glx
implementation, have a working gl-font (based on freetype)
font-loading and text-printing egg.

Cool!

How are you rendering the text?  The choices are (AFAICT) use freetype
to generate bitmaps (maybe build a bitmap for each character/font
combination, or maybe render a word at a time or a line at a time) and
display them using glBitmap; use freetype to generate antialiased
pixmaps (same choices for characters, words or lines) and use them as
textures on top of polygons; or somehow convert the font to vertices
and render the text entirely as filled triangles.  I didn't see a way
that the results of glBitmap can be transformed - it goes straight to
the framebuffer, right?  Besides not being antialiased.  The third
method (vertices) might be slow (or is it nowadays?)  So I figured the
second method (textures) has the most promise.  But ideally it should
leverage the power of the GPU somehow, rather than involving Freetype
for every line of text every time it's drawn.  If you render a word at
a time, you can save them to GPU memory as textures and re-use them
every time that word with that font is shown, while still making use
of Freetype's hinting.  If you render a character at a time, the set
of textures becomes smaller, and you gain the ability to transform
each character (like for doing text along a path, for example) but
have to do hinting yourself.

Everything is very loose and I will release them later, when I think
it's worth to be seen (and ready for discussion (The loose aspect
would make very poor discussion)).

I'd like to see it because I haven't written anything for text display
yet; maybe now I don't need to.

Now, my goal is to write 3d computer graphics code with Chicken (and C).
And more and more my goal is to write it *inside* Chicken :
I've began to write a gl-repl : it takes keyboard input, shows the
characters with gl-font, then feed the expression to Felix's eval.
It's very basic and I want it to be more practical .... and kewl.

What this means : have a 3d application in development in your window
and in the same window you have your repl in overlay. I'd like to have
more than a without-libreadline-like repl. It's OpenGL !! I want to
provide nifty escape sequences to gl-print to have nifty colors (and
more :).

Yes that sounds very kewl.




reply via email to

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