problem with texture

Hi to all forum!
I load another 3d model on my app.
On emulator all it’s ok, but on the phone I’ve the texture white! what can I do?
The first model I have used it’s ok, and I use the same code for draw them!



void CTexture::DrawFanalerr(TInt aFrame,TInt dirx,TInt diry,TInt dirz)
{

   glLoadIdentity();
   glTranslatef(dirx,diry,dirz);
   glRotatex( aFrame << 16,1<<16,0,0);
   glRotatex( aFrame << 16,0,0,1<<16);
   glScalex( 26 << 13, 26 << 13, 26 << 13);

   glEnable(GL_TEXTURE_2D);
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    glBindTexture(  GL_TEXTURE_2D, iNokTexObjects[16] );
   glVertexPointer(   3, GL_FLOAT, 0, fanalerr_vertices);
    glTexCoordPointer( 2, GL_FLOAT   , 0, fanalerr_uv);
   glNormalPointer(   GL_BYTE, 0, fanalerr_normal);
    glDrawElements(GL_TRIANGLES,23*3,GL_UNSIGNED_BYTE,fanalerr_indices);
   glDisable(GL_TEXTURE_2D);
   counter+=23;
}


and for the texture I’ve this code in appInit:


glBindTexture( GL_TEXTURE_2D, iNokTexObjects[16] );
    glTexImage2D(  GL_TEXTURE_2D, 0, GL_RGB, TEX_WIDTH, TEX_HEIGHT,
                   0, GL_RGB, GL_UNSIGNED_BYTE, texPtr );
    glTexEnvx( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); 

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.