Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources can't find. #1

Open
GoogleCodeExporter opened this issue Oct 4, 2015 · 5 comments
Open

Resources can't find. #1

GoogleCodeExporter opened this issue Oct 4, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

This is the project file. Using VS2008

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

Attachments:

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant