hiteshsuthar / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

TextSprite does not has onDrawVBO function ? #171

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.TextSprite does not has onDrawVBO function ?

i use the TextSprite like this:

FontTexture f = new FontTexture("number.png", "0123456789");
final TextSprite sp = new TextSprite(x, y, 10, 10);
sp.setTexture(f);
sp.setText(1000 + "");
Scene.add(0,sp);

but only "0" show ;

then i change the code:

#################################
public void setTexture(Texture texture) {
    if (!(texture instanceof FontTexture)) //!!!!!FontTexture!!!!
    {
        Debug.error("Tried setting TextSprite to non-TextTexture");
    return;
    }
       super.setTexture(texture);
}
####################################

and add a function :

#################
@Override
protected void onDrawVBO(GL10 gl) {
      onDrawNormal(gl);
}
##################

it work!

Original issue reported on code.google.com by liang8305@gmail.com on 7 Nov 2010 at 11:15

GoogleCodeExporter commented 8 years ago
sorry !I do it as you ,but it can't work. Where did you changed? textsprite???

Original comment by h...@synovainteractive.com on 19 Apr 2012 at 6:31