weimingtom / forget3d

Automatically exported from code.google.com/p/forget3d
1 stars 1 forks source link

Resources can't find. #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
while I am rendering a texture on box, the box is always white, I debugged 
the project and found :"
bool CRender::loadTexture(const char *fileName, GLuint *id)
{
  FILE *f = fopen(fileName, "rb");
  GLubyte *pixels = NULL;
  if(!f) return false;

  WORD width = 0, height = 0;           
  byte headerLength = 0;                    
  byte imageType = 0;       

......
"

Parameter "f" is always 0, I put "resources" folder at 
"../Draw Texture/resources", 
the same with my code folder "../Draw Texture", and I load the texture 
like this:
"
....
loadTexture("resources\\door128.tga",&texture1);
....
"

I am depressed, can you help me, I think it is a piece of cake for you, 
Thanks a lot!

Original issue reported on code.google.com by smartxi...@hotmail.com on 11 Aug 2009 at 10:25

GoogleCodeExporter commented 8 years ago
This is the project file. Using VS2008

Original comment by smartxi...@hotmail.com on 11 Aug 2009 at 12:45

Attachments:

GoogleCodeExporter commented 8 years ago
If you use Windows Mobile(WinCE), while load texture, pls use full path, such as
"//My Documents//resources//door128.bmp", or create a dir named "resources" in 
your
device's root dir, and put your textures in it.

BTW, V0.1 only support bmp texture format, pls convert your tga file to bmp 
format.

Original comment by i25...@gmail.com on 12 Aug 2009 at 7:17

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thank you, the full path works, and the resources must in device's memory~~

Original comment by smartxi...@hotmail.com on 13 Aug 2009 at 3:10

GoogleCodeExporter commented 8 years ago
I'm using forget3D on android,I have integrated in my project,but I have a 
question,can you tell me how to use md2viewer to load a md2 model with three 
textures,I find it just can load one md2 with one texture,is that right? hope 
for your reply

Original comment by wangqian...@gmail.com on 2 Dec 2011 at 7:44