Author Topic: blitting text and images  (Read 52930 times)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: blitting text and images
« Reply #30 on: March 31, 2010, 07:51:56 pm »
Quote from: paulscode
the overhead of adding new textures was significantly more than modifying existing textures (to the point that the first option was not really an option if you want smooth video playback).

but i suppose you were doing this every frame ? in my case this is done once per bubble. indeed every time font size changes for each bubble but on Android font size wont change

Even still, the texture effect is a better option, because you will experience a 50-200 millisecond pause each time you add a texture, which players will notice as "hiccups" in the rendering, especially if several bubbles pop up around the same time.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: blitting text and images
« Reply #31 on: March 31, 2010, 09:13:40 pm »
i guess you are right as a rule of thumb but somehow texture creation is not noticable on this thing. not on emulator and not an actual device. possibly because the created text textures are very small in size. closest 2^n x 2^m to what you see on screen.

Offline Darkflame

  • int
  • **
  • Posts: 55
    • View Profile
Re: blitting text and images
« Reply #32 on: May 15, 2010, 04:50:19 pm »
The class's look really handy.

I'm working on a AR Browser and need on-the-fly generated text bubbles, so this seems appropriate.

One thing; What license do you consider this under? Though we are developing a free, open source, browser ourself (http://arwave.org/), we want people to be able to re-use and adapt our code for their own projects, even if their commercial. So we need to know any code we use if allowed for that :P


Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: blitting text and images
« Reply #33 on: May 15, 2010, 07:43:57 pm »
you can do anything with it ;)

Offline Darkflame

  • int
  • **
  • Posts: 55
    • View Profile
Re: blitting text and images
« Reply #34 on: May 15, 2010, 08:45:15 pm »
Thats fantastic, cheers :)

Offline BLadeLaRus

  • byte
  • *
  • Posts: 5
    • View Profile
Re: blitting text and images
« Reply #35 on: January 20, 2011, 02:56:17 pm »
Nice classes, but I wonder. Did somebody use GLFont.getStringBounds(String s)? May be I downloaded older version of this class. But there is simple error. This method GLFont.getStringBounds(String s) doesn't work, it always returns width = 0.  This is happening because of charWidths[] array isn't filled on setting Paint.
Just pointing on this simple copy/paste error  ;)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: blitting text and images
« Reply #36 on: January 20, 2011, 03:01:32 pm »
I think i used this for Alien Runner and had the same problem. IIRC, raft fixed it back then. I just can't remember if i got that version from him or if he updated the download...

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: blitting text and images
« Reply #37 on: January 20, 2011, 03:04:10 pm »
which version is it? android or desktop?

Offline BLadeLaRus

  • byte
  • *
  • Posts: 5
    • View Profile
Re: blitting text and images
« Reply #38 on: January 21, 2011, 11:55:36 am »
It is android version. I got it from first post in this topic.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: blitting text and images
« Reply #39 on: January 21, 2011, 12:54:07 pm »
i've updated the links. please re-download

Offline jt123

  • byte
  • *
  • Posts: 8
    • View Profile
Re: blitting text and images
« Reply #40 on: March 23, 2013, 01:50:16 pm »
Is there any example source for texture pack.

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: blitting text and images
« Reply #41 on: March 23, 2013, 04:11:05 pm »
Is there any example source for texture pack.
you can have a look at bones demo to see sample usage
http://aptalkarga.com/bones/

Offline jt123

  • byte
  • *
  • Posts: 8
    • View Profile
Re: blitting text and images
« Reply #42 on: March 24, 2013, 11:27:16 am »
Thanks i forget to use pack(). Now it works.

Offline zerofox

  • byte
  • *
  • Posts: 15
    • View Profile
Re: blitting text and images
« Reply #43 on: July 09, 2013, 04:41:55 am »
hi all,

want to ask about blitting the text. is there anyway to blit text vertically? thanks

Offline raft

  • quad
  • ******
  • Posts: 1993
    • View Profile
    • http://www.aptalkarga.com
Re: blitting text and images
« Reply #44 on: July 09, 2013, 08:27:09 am »
not directly. you need the modify the code.