Hej Sana, you need to be a bit more patient - I have an intense job, and your e-mail is only one of 20 other mails in my Inbox that need to be answered.
> i checked this link > http://www.geofront.se/test_3ds.tar.gz, The code there is gone since a long time ago, it was only a proposal. Besides, it doesn't provide anything more than the one that you find in player.c of the current CVS. Have you tried player.c from there ? Does it work for you, that is, does it load textures ? Do you use SDL_image ? I don't see any glTexImage2D() call there. You only generate a texture id. Where do you actually _upload_ the texture to OpenGL ? My tip: try to generate a simple black-white texture first. float testdata[] = {0,1,1,0}; glGenTextures(1, &tex_id); glBindTexture(GL_TEXTURE_2D,tex_id); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 2, 2, 0, GL_LUMINACE, GL_FLOAT, testdata); // NEVER forget this if you dont have mipmaps ! glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); > but didn't find the code at there. Please help me, i am just exhusted while > doing attempts tu mapp texture in player.c,but it all turns useless.I m using > lib3ds ver 1.2.0.please give me some sample code or help me.In renderNode() i > m doing this > /*****************Start**********************/ > image = IMG_Load(&mat->texture1_map.name[0]); > if(image) > { > upload_format = GL_RED; /* safe choice, shows errors */ > // bytespp = image->format->BytesPerPixel; > // pixel = NULL; > glGenTextures(1, &tex_id); > scale_x = 640/(float)TEX_XSIZE; > scale_y = 480/(float)TEX_YSIZE; > } > glBindTexture(GL_TEXTURE_2D,tex_id); > glBegin(GL_TRIANGLES); > for (i=0; i<3; ++i) > { > glNormal3fv(normalL[3*p+i]); > if(mesh->texels) > glTexCoord2f(mesh->texelL[f->points[i]][1]*scale_x, > scale_y - mesh->texelL[f->points[i]][0]*scale_y); > > glVertex3fv(mesh->pointL[f->points[i]].pos); > } > glEnd(); > SDL_FreeSurface(image); /* No longer needed */ > glDisable(GL_TEXTURE_2D); > /*************************end*******************************/ > if u fine any bug in it tell me the right way to apply texture.because it > is urgent to me > > > Waiting for your favourable respose > > > thanks > > > --------------------------------- > Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ > countries) for 2ยข/min or less. Servus, Gernot -- T----------------------------W-E-L-C-O-M-E------------------------------T O The Austria <=> Sweden <=> Germany <=> Netherlands connection..... H | http://www.mpi-sb.mpg.de/~gziegler | http://www.lysator.liu.se/~gz E \-----------------------------F-U-T-U-R-E-------------------------------/ ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ lib3ds-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lib3ds-devel
