OpenGl image corrupted/wrong colors

Trying to render images with GL_UNSIGNED_BYTE:

   glTexImage2D (_nTexMode[0], 0, GL_RGBA, nTexWidth, nTexHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, lpTexPixels);

but the result is:

Tried to use GL_UNSIGNED_SHORT.

It’s better, but there are still problems (its green and only one image renders, and other images not displays at all)

Also tried another type ( GL_SHORT, GL_UNSIGNED_SHORT_5_5_5_1 etc.) but the app is crashing or image is white.

Its old project and I trying to adapt to 64bit platforms.

What is the image type? Does it have an alpha channel? You are specifying GL_RGBA, maybe try GL_RGB?

It looks like you’ve almost got it, so maybe just try a few more things, I’m sure you’ll get it!

later,
jeff

p.s. please check out my youtube channel on opengl stuff here:
https://www.youtube.com/channel/UCzx8alrxVELz5h1dfCdkdfg/videos?view_as=subscriber