Disappearing Text
by Eaymon Latif · in iTorque 2D · 05/15/2009 (8:33 am) · 13 replies
Has anyone had an issue with disappearing text in lists?
This is only with 1.2. It was working fine in 1.1
I thought it was a font issue, but at least 1 row is showing up so that isn't the issue. The code for the game has not been changed and it works fine in TGB but not on the iphone.
ill upload a photo later
Any ideas?
This is only with 1.2. It was working fine in 1.1
I thought it was a font issue, but at least 1 row is showing up so that isn't the issue. The code for the game has not been changed and it works fine in TGB but not on the iphone.
ill upload a photo later
Any ideas?
#2
05/15/2009 (9:10 pm)
thanks Dave that worked now back to optimizing load times..
#3
The above fix has been applied,
I have tried writeFontToCache() with the full 36 alpha-numerics as well as changing the sizes for it to work.
Any ideas people?
05/16/2009 (12:39 am)
actually... another text issue has popped up after this and will not display on the phone. it displays fine in TGB, but not on the phone.The above fix has been applied,
I have tried writeFontToCache() with the full 36 alpha-numerics as well as changing the sizes for it to work.
Any ideas people?
#4
05/16/2009 (1:33 am)
Check you are using a font size that is actually available within your game.
#5
05/16/2009 (5:50 am)
Like Peter says make sure your font name and size are both available by looking in the common/data/fonts directory for your font. I had this problem until I realized that I'd specified a font size that wasn't available.
#6
05/16/2009 (8:55 am)
yup it is. I am using Arial 42 and it is in the directory.
#7
http://www.pocoapps.com/demo/tgb_merda/Picture_1.png
http://www.pocoapps.com/demo/tgb_merda/IMG_0109.PNG
05/16/2009 (9:04 am)
here are the photoshttp://www.pocoapps.com/demo/tgb_merda/Picture_1.png
http://www.pocoapps.com/demo/tgb_merda/IMG_0109.PNG
#8
In this case I would double check that the font fixes you used are included in all versions of the functions as some are within ifdef sections
05/16/2009 (9:13 am)
I take it the first picture is from the simulator, while the second is from the device.In this case I would double check that the font fixes you used are included in all versions of the functions as some are within ifdef sections
#9
05/16/2009 (9:18 am)
first pic is from TGB second is from the device. I have the same issues on the simulator
#10
the method:
the fix:
That is the code changes from line 507. hopefully I have messed this up and i can finally release my game...
05/16/2009 (9:30 am)
the fix i did is as follows:the method:
U32 dglDrawTextN(GFont* font,
const Point2I& ptDraw,
const UTF16* in_string,
U32 n,
const ColorI* colorTable,
const U32 maxColorIndex,
F32 rot)the fix:
if(currentPt)
{
glEnableClientState ( GL_VERTEX_ARRAY );
glVertexPointer ( 2, GL_FLOAT, sizeof(TextVertex), &(vert[0].p) );
glEnableClientState ( GL_COLOR_ARRAY );
glColorPointer ( 4, GL_UNSIGNED_BYTE, sizeof(TextVertex), &(vert[0].c) );
glEnableClientState ( GL_TEXTURE_COORD_ARRAY );
glTexCoordPointer ( 2, GL_FLOAT, sizeof(TextVertex), &(vert[0].t) );
glBindTexture(GL_TEXTURE_2D, lastTexture->texGLName);
for (int i=0; i<currentPt; i+=4) {
glDrawArrays( GL_TRIANGLE_STRIP, i, 4 );
}
}That is the code changes from line 507. hopefully I have messed this up and i can finally release my game...
#11
for (int i=0; i<currentPt; i+=4)
{
glDrawArrays( GL_TRIANGLE_STRIP, i, 4 );
}
05/16/2009 (9:36 am)
There are two places to add thisfor (int i=0; i<currentPt; i+=4)
{
glDrawArrays( GL_TRIANGLE_STRIP, i, 4 );
}
#12
I needed to move:
before the object is created.
Thanks for your help Peter and Brett, I appreciate it.
now i need to figure out why the text doesn't change when i tap the screen
05/16/2009 (9:44 am)
yes. i Fixed the issue (at 3am the brain doesnt work as well as it should) I needed to move:
glEnableClientState ( GL_VERTEX_ARRAY );
glVertexPointer ( 2, GL_FLOAT, sizeof(TextVertex), &(vert[0].p) );
glEnableClientState ( GL_COLOR_ARRAY );
glColorPointer ( 4, GL_UNSIGNED_BYTE, sizeof(TextVertex), &(vert[0].c) );
glEnableClientState ( GL_TEXTURE_COORD_ARRAY );
glTexCoordPointer ( 2, GL_FLOAT, sizeof(TextVertex), &(vert[0].t) );
glBindTexture(GL_TEXTURE_2D, lastTexture->texGLName);before the object is created.
Thanks for your help Peter and Brett, I appreciate it.
now i need to figure out why the text doesn't change when i tap the screen
#13
05/30/2009 (1:43 pm)
Logged and fixed for v1.2.1
Associate Dave Calabrese
Cerulean Games
www.garagegames.com/community/forums/viewthread/90119