Hello, I'm looking for a good tutorial on how to make a texture and attach it to an object WITHOUT using glaux or someone else's header (this is mainly targeted at VideoTutorialsRock). The file type does NOT have to be Bitmap, but if it's the easiest, that would change things. Any help is appreciated.
I could dig up my old TGA loader code... but you just said that's not what you want.
Anyway, I suggest you go with TGA. There are several types for TGA's, the easiest being the uncompressed BGR 24-bit and BGRA 32-bit (the latter has transparency "Alpha" which will come in handy).
Thanks, but I'm looking for something that I could download to see if it works THEN try to understand it. NeHe includes glaux, which is outdated and filled with issues, according to many websites. Then the second link doesn't work... And plus I've already tried something else and ran into even more issues. Thanks anyways.
It works by loading raw pixel data. Really the only issue is reading the header file of the images and setting the appropriate parameters for glTexImage2D(). It depends on the image format, png would need to be decompressed for example so using a raw pixel format would easiest (as suggest TGA, BMP as well). So it would be easier on your to use one of those. Although BMP is quite dynamic and thus has a lot of options for raw pixel formats (from what i can remember). You'd be better off creating your own image format and only support specific pixel formats, than creating a tool which would take image files and convert to your image format along with the pixels you want (depending on your target hardware). Either way you'd be better off using a library to load images to get the raw pixels, either for the conversion tool or your opengl program.
It's easier DRAWING an image in something like paint and saving it in an already existing format than it is defining the color of each pixel in Notepad or something.
As for using libraries, I REALLY would like to make most of what I make by myself, as I would like to be able to stand alone, not have libraries take the shortcuts, and I like being in FULL control (which is one of the reasons I started to learn x86 Assembly) (I gave up pretty quickly).
As for using libraries, I REALLY would like to make most of what I make by myself, as I would like to be able to stand alone, not have libraries take the shortcuts, and I like being in FULL control
Thanks, but I'm looking for something that I could download to see if it works THEN try to understand it.
Make up your mind, please. The TGA specification "works", you just need to write a loader for the format, which puts the RGB/RGBA data into an array, which OpenGL will then be able to use, to create a texture.
I like being in FULL control (which is one of the reasons I started to learn x86 Assembly) (I gave up pretty quickly).
Wow, didn't know there was actually ANOTHER tutorial, Thanks. I also don't really know how loaders work (and I only bothered to learn fstream in file input/output), so writing my own isn't going to be a snap.
Make up your mind, please
I do not want to download a library (.lib file), because I don't know how to read/understand them (I haave a horrible time understanding headers for some reason, too). I'd much rather download some code, implement it into my make THEN understand it and try to write my own.
However, i have not yet found a piece of code that works, so I have been forced to use SOIL.