How do I load a bitmap without using glaux?
How do I load a bitmap without using glaux?
Read up about the fileformat at wotsit and read it all in using binary i/o stream.
Don't get this wrong, I'm not too lazy to read it... I just learn better/faster from examples. So, got any?
Ok, first off, BMPs store their color as GBR and not RGB, ogl expects RGB soooooo, you will have to convert it from GBR to RGB. Second, BMPs has their origin at the top left corner, ogl expects an origin of bottom left corner. Also you will want to look up BITMAPINFOHEADER, BITMAPFILEHEADER and BMPQUAD. This should be enough for you to start *some*. I will not give you any code that does that job for you, that is for you to do
Yeah you will kick yourself later for not figuring out how to load it yourself.
But you pick... your destiny is in your hands.
nehe.gamedev.net
No, I did it the good way, not the easy one
After ~5hrs of coding I managed to make one
Ok, I need a little help here.. .How do I convert a bitmap to a texture?
This doesn't work:
Error:Code:glGenTextures(1, &_pSlides[0]);
Code:Main.cpp:266: error: cannot convert `Bitmap*' to `GLuint*' for argument `2' to `void glGenTextures(int, GLuint*)'
I strongly suggest you have a look at the nehe tutorials for loading in textures once again.
Actually, I was wondering why their glaux replacement code doesn't work for me
What the hell is that? Go ahead and use that code and your game will crawl. Don't use the GDI.......please everyone read this.
Don't use GDI for graphics, games, sounds, etc.
Not to mention it will also be limited to one operating system.
Overall it'd most likely be easier and better to just load the bitmap in via file access, process it, and pop the information into an array. I may be wrong but I think OpenGL just needs the colors in the correct order.