0

I can't get the ((GL11Ext) gl).glDrawTexfOES / glDrawTexiOES extension to work on my Tegra 3 device (HTC One X). With GL Errors enabled, I get the following GLException: "out of memory".

The same code works on every other Android device / emulator that I try, but with my One X I always get this error. I've tried reducing the texture size right down but it makes no difference. (Yes, the texture dimensions are always powers of 2).

Has any body else experienced this problem?? Any Ideas? Thanks.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
ShibbyUK
  • 1,501
  • 9
  • 12
  • Just one simple idea: Are you sure that you are not leaking memory somewhere is your code? By the way I is always a good idea to provide some code stripped to the minimum. – rekire May 09 '12 at 09:57
  • I should have said, I'm actually using "Codehead's BFF Loader/Renderer", see the class here: http://www.codehead.co.uk/cbfg/TexFont.java I don't think it's a memory leak, the error is returned on the first ever call of glDrawTexfOES. And it works well on all other Android devices I've tried. – ShibbyUK May 09 '12 at 10:11
  • Do you have another device running a Tegra 3? I'd exclude errors inside `TexFont` by using a small sample app. – Stefan Hanke May 09 '12 at 13:52

2 Answers2

0

It looks like Tegra 3 just doesn't support this extension. So in the end, I changed TexFont to render textured "quads" and it seems to work ok.

ShibbyUK
  • 1,501
  • 9
  • 12
0
for(int lines = fntTexHeight-1; lines>0 ; --lines) {    
    pix.put(bits, lines * lineLen, lineLen);
}

**pix.position(0);**  //need this

// Place bitmap in texture

gl.glBindTexture(GL10.GL_TEXTURE_2D, texID);
Maarkoize
  • 2,601
  • 2
  • 16
  • 34