pawel wrote:

> Sprites in a UI toolkit, odd?  True but i thought it might be in
> here somewhere.  It's for a dumb little off-shoot of something
> i want to do.  The dumb little thing is a text editor where the
> chars are all sprites that are subject to mild physical effects:
> getting bumped this way and that as strings are moved around,
> falling over each other as the user inserts text, etc.

        Sounds neat.. special effects text editor ;)

        My nixieclock program comes with a text display subclass
        that I included a terminal emulator demo for, so that one can
        run e.g. vi(1) in the nixie tube display.. so when you type
        text or scroll around, the nixieclock effects simulates a
        "persistent glow" (similar to phosphor) during scrolling.

> Deleting text sends it falling down, leaving it to pile up.
> Just a bit of fun.

        For sure openGL is what you'd want I think.

        I'd say there are at least two ways to go; glDrawPixels()
        (which is probably too limited for your needs), or
        texture mapped cards. The latter would give you full on
        3d, antialiasing, rotation/scale transformations, opacity,
        even color and lighting effects.

        The texture mapped cards would be one texture for each letter glyph,
        and one polygon for every character position (to which the textures
        are assigned)

        Assuming it's all just ASCII, 96 textures should take care of
        the character set.

        Textured polygons should be able to draw really quickly,
        and will have all the fun controls that openGL offers.
        Should be able to look pretty cool.

> Using OpenGL directly is fine (i'm familiar enough with it to
> hack basic stuff up) and a little google has shown me a few
> tutes on how to implement sprites in gl.

        I'm thinking for what you want, textured cards might be
        the most flexible for the special effects you described.
        Letters can rotate + fall in 3D, and could even have a bit
        of perspective on them.

        And hey, if this "3D glasses" fad moves to desktops, then
        your text editor will be ready for a full on 3D special effects
        experience..!
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to