Depending on your compiler and implementation, you could change GL_RGB to another value, maybe GL_BGR or GL_RGB_EXT and see if you can see the texture. You can also try changing the GL_UNSIGNED_BYTE but since your program loads this is 90% ok (it usually crashes the program if it is wrong).
Also you could check through a watch the variable that holds the bitmap data. See if you have a logical value for the address. If it is NULL (try initializing to NULL to make certain) then you have trouble loading your bitmap.
Well, i played with that values as you said, but no luck…
I also look’ed with the debbuger at the img, it seems that it has some kind of data, it isn’t NULL…
The strangest thing is that i have used this code before in my other projects and i had no problems at all, and now it isn’t working… That’s very strange…
Well, anybody, any ideas ?
if u have checked up the texture building lines of code then i can only suggest 2 things.
opengl seems to have problems (atleast i had problems) with textures that have dimensions which are not powers of 2.
if that isnt the case then u may want to write the bitmap file reding code yourself. image data starts at byte 54. the image starts from the lower left corner of the screen.
I am doubt if it is because your bmp is too big? or your bmp is a 8 or 16 bit’s bmp,
you should call the glGetInteger( );
function i fouget which parameters you should use ,but it can get the max bmp size you can use in your program
The width and height must be a power of two to work, for example 2, 4, 8, 16, 32 etc. however I think glubuild2Dmipmaps should resize OK. Try an image size of 2^n image just for kicks. Have you tried displaying the images with gldrawpixels just to confirm the data are good?
Image size is power of to (its 256x256)
Its 24-bit BMP image, and i would call i “BIG”
Well, i tried doing my own BMP loader, and still no success.
No, i haven’t tried glDrawPixels,i will try right now.