Advertisement

Textures in VC++: newbie ques.

Started by January 16, 2003 01:41 AM
3 comments, last by number34 22 years, 1 month ago
Greeings all: I have NeHe''s lesson06 on textures running in VC++. But when I try to change the texture I have problems. Here''s what I did: downloaded a jpg texture from an on-line texture library, saved as BMP file using Adobe Photoshop(I have 5.0), and repalaced NeHe.bmp in the code. No compilation or linking errors but when I run all I see is a white box. Your help is greatly appreciated. If convenient please reply directly to "guha@ait.ac.th". Oh, and another question: NeHe''s textured cube is nice but seems if the sides were "glass" so that one could see the texture text on the opposite face through the front-face it would be a neat affect. Alpha values? Is there a way to set those for imported textures? Thanks, Sumanta
Make sure you .bmp file is on same folder with your executable. You write "Data/*.bmp"(* is a file name) on your code, look where your *.exe is and put aside your Data folder. Sorry about my poor english.
Advertisement
Make sure the new textures dimensions are a power of 2

ie, 64*64, 128*128, 128*256 etc
Thanks to all those who replied. Power of 2 was the right
answer,
number34
I had the same problem. I''ll try it out later...

Why must the image dimensions be powers of 2?

Cheers,
Jeroen
Cheers,Jeroen

This topic is closed to new replies.

Advertisement