Texture maping

Okay I have no idea what the f* to do now. I just started GL and I was moving along fine then I decided to look at Nehe’s tutorials. I tried to do the one on texture mapping but he uses this old glaux and my thing crashes because there is now glaux.dll. I searched the web for about 2 hours and looked at my Programing guide and I can’t find anything that looks close to what he had. I want to know how I can take my bmp and put it on the side of a square. I under stand the basics but I can’t figure out how to load my bmp and get it to a variable so I can use the glTexCoord2f… and glGenTexture… and all the other functions.

If you know where a good tutorials like nehe’s is and is updated I would truley apreciate it

Joe

Well it seems that you have problems rather with reading a BMP file than managing the drawing process in OpenGL. That’s true that NeHe uses glaux.lib to load BMP files in their tutorials. I am not sure but there is also a part about game development where sample tutorials use a standard way of reading files. You can check some other sites like http://www.gametutorials.com.
Other solution is to look at BMP file specification (I’m sure you’ll find it int the net) and write your own procedure to read it. All you have to do is to get to the data in the file and pass it to glTexImage2D function, for example :

glTexImage2D(GL_TEXTURE_2D, 0, 3, Width, Height, 0, GL_RGB, GL_UNSIGNED_BYTE, PointerToTheData)

Hope it helped…

Orzech

nehe also have alternative versions of his programs, look at the bottom of each lesson.

He also has an alternative BMP loader routine over the old glaux library.

But as for other sites, most sites use the glaux library for BMP loading examples, easy way out of having to write a custom BMP routine.

Also has TGA loading for textures, most good paint programs will convert BMP’s to TGA format, later in the NEHE lessons he goes over this format and tha advantages of using it.

I personllay use TGA format over BMP, since it offers a Alpha channel that can be used for transparentcy maps.

Originally posted by obj63:
[b]Okay I have no idea what the f* to do now. I just started GL and I was moving along fine then I decided to look at Nehe’s tutorials. I tried to do the one on texture mapping but he uses this old glaux and my thing crashes because there is now glaux.dll. I searched the web for about 2 hours and looked at my Programing guide and I can’t find anything that looks close to what he had. I want to know how I can take my bmp and put it on the side of a square. I under stand the basics but I can’t figure out how to load my bmp and get it to a variable so I can use the glTexCoord2f… and glGenTexture… and all the other functions.

If you know where a good tutorials like nehe’s is and is updated I would truley apreciate it

Joe[/b]

I used NeHes tutorials with the old Glaux with no problems. I use LCC win32, and have had no problems compiling loading or running both items I made based on the site on both Win98 and Win2k. It would help if you mention what IDE your using.

Thanks for the help all, I realize that many newbies like me have this problem but I found a workaround and was actually able to find the dll file on the net after another couple hours of searching. Thanks for the tips, I am sure I will be using them shortly. On my IDE though I am using Dev-C++ 4 with an updated glut32 library an updated winuser.h that includes the CDS_FULLSCREEN un like the one that came with Dev-C++ 4 and I then found the glaux library on the net and added it. Before my problem I didn’t have the glaux.dll file just the lib, and include files.