OpenGL ES rendering dynamic text?

Any tutorials/ideas on how to render dynamic text in OpenGL ES? For example, displaying a users score, etc.
Thanks

There's a good overview of fonts in OpenGL here:
http://www.opengl.org/resources/faq/technical/fonts.htm
Most games tend to use the textured font techniques, which unfortunantly aren't straightforward for beginners to understand. Often, the most difficult part is generating a good base texture to "snip" your glyphs from. This looks like a good tool to try: http://www.pixelperceptions.com/
By learning about this you'll cover basic stuff like texture mapping & blending, which you will need to know anyway if you're interested in OpenGL or games programming. There's good tutorials for texturing and blending all over the place.

Similar Messages

  • Opengl ES: displaying dynamic text

    Hello, I searched around for days, but the only way I found to do it is using the Texture2D class and rebuilding the texture with the updated text at each frame: very very slow, the application fall on its knees.
    I have read that mixing Opengl ES context and UI Labels is a very bad idea too.
    So I said: let's go for bitmap fonts !
    I found several tutorials based on Windows OpenGL on how to build texture bitmap fonts: unfortunately they create fonts using typical windows commands such as wglUseFontBitmap, for instance.
    So how do you deal with it in MacOs and Iphone programming ? Any suggestion ? Thanks !

    Typically you should avoid mixing UIkit items but you could go ahead and try using a UILabel over a GLView. It typically doesn't slow it down that much but that's something worth testing.
    If you're just showing updated numbers and limited text make up an image with them such that you can tile out the sub-image areas (texture atlas) and set the texture coordinates accordingly. This way you're only loading the texture once.
    Do a search on Google. I think there are some alternate solutions already available.

  • Dynamic text rendering in Cp4

    I'm having an issue with an embedded AS2 SWF that spawns a MovieClip containing a dynamic text field populated with ActionScript. When I publish/preview the Captivate movie with externalized animations, the dynamic text renders fine. However, when I do NOT externalize animations, the dynamic text appears garbled.
    I'd go ahead and externalize animations in this project, but there are other embedded SWFs in the project that work correctly only when they are not externalized.
    Anyone have experience with this or a similar issue?

    I just had a similar problem and fixed it by embedding the font into the Flash SWF and also embedding uppercase and lower case characters.
    Not sure why this was needed since I never had to do that with Captivate 3, but that was the only thing that corrected the problem.
    /Michael
    Click here to visit the www.captivate4.com blog

  • Text jumps after embedding font in dynamic text field!

    Hi
    this is driving me mad
    Im using a standard font (Gotham rounded) within a dynamic text field. As soon as I embed the numerals within this text field the text lowers within the text field.  Double clicking the field then renders the text higher up!  It seems that the height it shows when I double click is the height it compiles at.
    The other strange and annoying thing is that my colleague working on the same project is using the exact same font and same file but this doesnt happen to him and so the font redners out differently when he compiles!
    Could anybody please help me sort this problem out as its reeeeally annoying
    many thanks!
    Nick

    nobody any ideas?!

  • Dynamic text in French

    Hi all,
    I am loading a dynamic text file into flash, rendering as
    HTML, embedding fonts but cant get the French characters &
    accents to appear... I have written in HTML univ.reference in the
    txt file eg. &Eacute etc...
    not sure what to do.... Any help would be great...
    Thanks for you time in advance,
    Martin

    Not sure exactly, but here is what I know.
    Flash really likes to have externally loaded text files in
    UTF-8 format. That fixes most problems.
    Additionally if you use UTF-8 you don't need to use crazy
    html codes. To my mind it is much easier to read "français"
    than "fran%C3%A7ais" or "français." (Don't know if the
    forum is going to mess any of those up!)

  • Create a Link using Dynamic Text and Capture Variable

    I am building a dynamic website using Dreamweaver CS5 with Coldfusion 9
    Currently I have created a dynamic text table. The table is created by querying the Invoice table and displays the all the customers Invoices. The columns Include Invoice #, Date, Amount Paid, BalanceRemaining, Due Date. So basically lists all the invoices I have applied to the unique customer. It is pulled up using a session variable I created from the login page.
    My question is this I want to make the "Invoice #" linked so when you click on it it goes to a new page and performs a new query which retrieves infro related to that specific invoice such as Services Rendered, Service Description, Date, Price, Total. I was able to create a link to the Invoice # but I am stuck trying to figure out how to capture the Unique Invoice # and apply it to the new query. Is this possible if so how?
    Thanks for your help!

    Now keep in mind I am speaking strictly from a web and SQL standpoint as I have no experience with coldfusion.
    If you are able to create the link to the Invoice, I am perceiving this as the following:
    Invoice
    Links to
    #123
    page.php?invoice=123
    #345
    page.php?invoice=345
    If your page is setup like that then you already have the data stored in the browser request with the GET method.  In PHP the equivalent is the $_GET array.  I am assuming ColdFusion has a similar array to work with forms.  Then on your following page you obviously need to check that the visitor came from the prior page with the proper permissions to ensure that someone doesn't get the address page.php?invoice=### and just guesses through and views all invoices if they are not supposed to.  Then your query would look something like the following:
    SELECT * FROM invoice_table WHERE invoice_number = $_GET['invoice']
    Remember this in written in PHP so yours should be a similar equivalent.
    Hopefully this helps a little to get you going in the right direction.

  • Dynamic text and IE

    I have a dynamic text area which is fed by the value of a
    SharedObject.
    This appears to work fine in FF, but in IE, the dynamic text
    is rendered
    very small.
    Any ideas on why this is, and how to fix it?
    Seth Meranda
    smeranda2<at>unl<dot>edu

    quote:
    Originally posted by:
    AnandMX
    use embedFonts=true
    coz it seems that your fonts are not embedded thats y it is
    not visible there.
    Thanks - but why would the fonts be visible in Safari and
    Firefox, for example, and not in that version of IE?

  • Dynamic Text

    I'm using dynamic text and in works fine until I refresh the
    page. After I refresh it displays all the html code and instead of
    rendering it.

    thank you very much for the answer mylennium.
    so i don't know how to use expressions at all, so i did a little reserch for .toFixed()  on google and i found this tutorial  Simple Counter Expression In After Effects on Vimeo
    so i did this;
    i don't know what it says but it works
    exp text 3 - YouTube

  • Displaying images in dynamic text fields

    Hi, I am having some difficulty getting my images to display
    in a dynamic text field. The images are linked from a txt file with
    the <img src=""> tag however they are not showing up in the
    text area. The rest of the html are rendering fine except the image
    tag. My example online is here:
    www.supernaturalmedia.com.
    Here is the code I used in Flash:
    var style_sheet = new TextField.StyleSheet();
    var css_url = "global.css";
    style_sheet.load(css_url);
    news.StyleSheet = style_sheet;
    loadVariables("projects_news.txt", this.news);
    My css styles also isn't loadin so i temporarily am using
    html styles for formatting. I'd like to get the css to work as
    well.
    My movie is published as Flash Player 6, AS 2.0.
    I'd appreciate any helpful advice.
    Thanks,
    Stanton

    1. don't assign the stylesheet property of your textfield
    until loading of global.css is complete. ie, use the onLoad handler
    for stylesheets.
    2. you have movieclip images that are linked for export and
    you're using their linkage id in src property of the img
    tag?

  • Add dynamic text to loader

    Hello,
    I'm trying to get dynamic text to parent to a loader. I don't get any errors, but once I add the code(commented out below) the text that is rendered through the renderText function stops showing up. Any ideas?
    //input Text
    line1Label.text = "Line 1";
    inputTextOne.text = "Custom Text: Line 1";
    stage.focus = inputTextOne;
    inputTextOne.addEventListener(TextEvent.TEXT_INPUT, renderText);
    var hasText: Boolean;
    function renderText (evt:TextEvent): void
    inputTextRender01.text = inputTextOne.text;
    hasText = true;
        if(hasText == true)
            //.BGContain.addChild(inputTextRender01); //trying to add the text to the loader BGContain....

    Hi Ned,
    Thanks for the input and feedback. I was able to get this to work by adding a complete event listener. The text shows up now. However, I have some images and now this text that I am trying to save as a PDF with alive PDF. The PDF saves fine, but the entered text does not save along with the PDF file. Right now I have the pdf saving everything in "BGContain" but for some reason I can't see the text in the pdf.
    //input Text
    line1Label.text = "Line 1";
    inputTextOne.text = "Custom Text: Line 1";
    stage.focus = inputTextOne;
    inputTextOne.addEventListener(TextEvent.TEXT_INPUT, renderText);
    inputTextOne.addEventListener(Event.COMPLETE, textComplete);
    var textToBitmap: BitmapData = new BitmapData(inputTextRender01.width, inputTextRender01.height, true, 0x00000000);
    function renderText (evt:TextEvent): void
    inputTextRender01.text = inputTextOne.text;
    function textComplete(event:Event)
        BGContain.addChild(inputTextRender01);
        textToBitmap.draw(inputTextRender01, new Matrix());

  • Dynamic text and rollovers

    I've got a dynamic, scrolling text field and the text is
    being rendered as HTML. How can I create a rollover state for the
    text? Thanks.

    give your dynamic text field an instance name, for example,
    my_txt. Render the text field HTML text by clicking the <> in
    the properties inspector. Click the frame it resides on, and open
    the actions panel, insert this:
    my_txt.htmlText = "<a href='
    http://www.google.com'>"+"This
    is line one"+"</a>"+"\n"+"<a href ='
    http://www.adobe.com'>"+"This
    is line two"+"</a>";
    and so on....

  • HTML links won't display in Dynamic Text Field

    I am loading external text files in dynamic text fields on my
    webage. These texts contain html links (<a href="page.html"
    target="_blank">Click Here</a> and I have "render as HTML"
    on and "selectable" off in my dynamic text field. Also, I am
    loading a CSS file. Not only do I not have a hand cursor, but I do
    not even have any of the text from that piece of html code down.
    What is going on with this? Please respond asap, as I have been
    struggling with this for a day now. Here is the Actionscript for
    loading the CSS:
    var flash_css = new TextField.StyleSheet();
    flash_css.load("styles.css");
    flash_css.onLoad = function(success:Boolean) {
    if (success) {
    zloc_txt.styleSheet = flash_css;
    } else {
    trace("Error loading CSS file.");
    var zloc_lv:LoadVars = new LoadVars();
    zloc_lv.load("zloc.txt");
    zloc_lv.onLoad = function(success:Boolean) {
    if (success) {
    zloc_txt.text = this.content;
    } else {
    trace("unable to load text file.");
    zloc_txt.html = true;
    zloc_txt.editable = false;
    _global.styles.TextArea.setStyle("backgroundColor" ,
    "transparent");
    _global.styles.TextArea.setStyle("border styles" , "solid");
    Here is a sample of the text file code:
    &content=<span class="headline">Northwest Arkansas
    Locations</span>
    121 Main St.
    Russellville, AK 77801
    (626) 111-1111<br />
    <html><a href="
    http://www.mapquest.com"
    target="_blank">Click Here for Driving
    Directions</a></html><br />
    Thanks for the help,
    Chuck

    The error is here:
    zloc_txt.text = this.content;
    Even if you rendered the textfield as HTML, you still need to
    tell flash that the variable you are inserting is HTML. Therefore
    you need to use the htmlText property.
    zloc_txt.htmlText = this.content;

  • Unstable html with dynamic text

    Hello, everyone.
    I'm having problems getting the dynamic text function to read
    an html text. I can get it to acknowledge <u> and <a
    href=> for links and underlining and even imbed images, but not
    <em> for italics or <strong> for bold. I have the
    "render text as html button selected," so I'm not sure why I'm
    getting these mixed results.
    Any ideas?

    1. Be sure the html is not malformed. In Control->Test
    Movie you can use
    Debug->List Variables or Debug->List Objects and find
    the text field where
    you will see how the html is rendered in the htmlText
    property. Then paste
    that into an HTML validator to check for malformed HTML.
    2. Be sure the html tags you are using are supported by the
    Flash player
    version you are publishing. For Flash 8 here is the link to
    the
    documentation:
    http://livedocs.macromedia.com/flash/8/main/00001459.html
    3. Here is the general documentation link that will help you
    adapt design
    your use of HTML in text fields.
    Lon Hosford
    www.lonhosford.com
    May many happy bits flow your way!
    "jdc59" <[email protected]> wrote in message
    news:e27v7r$h1$[email protected]..
    Hello, everyone.
    I'm having problems getting the dynamic text function to
    read an html text.
    I
    can get it to acknowledge <u> and <a href=> for
    links and underlining and
    even
    imbed images, but not <em> for italics or
    <strong> for bold. I have the
    "render
    text as html button selected," so I'm not sure why I'm
    getting these mixed
    results.
    Any ideas?

  • FONT issue in flash with Dynamic text

    I dont even know how to start this thread... I am having a
    serious problem with fonts on the flash movie I am Making/
    Modifiying. The Font that is being used is "standard 07_53" and I
    have been trying to understand how flash works with the fonts but
    somethings are just making me scratch my head. First off :
    - I tried using both the anti-alias for readability and the
    anti-alias for animation... the anti-alias for animation seems to
    creat sharper text in most cases.. + I am embedding all charachters
    when I do that (I know this makes my file way too big, but I am
    trying to figure out where I am going wrong)
    - Q1 : I found out changing the position of where my text box
    is on the document changes how clear the text is in the final
    puplication. Now That I have not even the simlest idea why... does
    anyone know?
    - Q2 : The justify problem... whenever I use Justify my text
    is all messed up... I even tried to change the font to Arial for
    example and it still makes some of the text a bit blurry (well it
    is blurry enough that I can notice it right away).. why does this
    happen?? and is there any kind of solution to this problem?? I
    definatly want my text justified
    - Q3 : Do I and why, have to embed the font in each text box,
    wouldnt one embeding be enough if using the same font in all the
    other text boxes?
    - Q4: Why do I see the text differently on different
    computers.. and this realy is in relation to Q1.. on my monitor all
    looks good on the published document, yet on other monitors and
    computers it looks completely fussy untill I change the position of
    that text box.
    -Q5: are there any sites that go in depth about Fonts and
    dynamic text and how they end up rendering in flash?
    you can see my problem with justified text at :
    http://www.alwayscoffee.com/mirror/flash/
    then click on COMPANY and then look at the text under "ABOUT
    US"
    by the way I am using flash 8 and publishing (flash settings
    of:) flash player 8 - action script 2.0 - compress movie option
    CHECKED - and jpeg quality 80
    I apriciate all the help I can get.
    Layth

    Hi,
    as you I don't even know where to start, as it is (as you
    have noticed) quite a complex thing. If you are still interssted in
    the subject, drop me a line, and I try to answer some of your
    questions.
    markusma
    _remove_thieu@macDOTcom

  • Bold and italic fonts in dynamic text fields.

    I have a dynamic text field with the text "IMAGES". The font
    is Arial, it has BOLD and ITALIC checked, and has basic Latin fonts
    embedded. Now, I use Actionscript to change the text:
    textField.text = "IMAGES";
    Suddenly the text disappears! Now, it seems to me that since
    BOLD and ITALIC are checked on the text field, changing the .text
    value should simply change the text itself, which should then be
    rendered in bold and italic, and since I have bold+italic Latin
    glyphs embedded, it should display properly. But what's clearly
    happening is that when I set the text using Actionscript, it is
    attempting to display the NORMAL font instead, and since it's not
    embedded, it won't display. I know this because if I create another
    proxy text field off the screen and embed the NORMAL Arial glyphs,
    the original text field's text will display just fine - as
    normal-weight text.
    But why is this? Do I have to use a TextFormat object to set
    the text to Bold and Italic EVERY time I want to dynamicaly change
    the text? This seems silly. I simply want my text field to be bold
    and italic every time the text changes, and NO normal text!
    Any ideas?

    I met the same problem using ActionScript3 and Flash Professional CS5. There are two problems with dynamic TextFields:
    - When you set style "Bold" for a text field in CS5, the "bold" property is not available in the TextField object in ActionScript, its defaultTextFormat.bold is alway false; I don't know if we can get this property anywhere else.
    - When you change the text of the dynamic TextField object, its style changes to normal no matter whether it was bold previously.
    This is really a bug in TextField, Adobe should fix this to implement TextField in an expected way.

Maybe you are looking for