I've been searching all around for a simple solution to add sprites to my OpenGl GLUT simple moon lander game in c++ and it appears I must use bmp's since they're easiest to load and use them as textures on …
I am using stb_image to load a 32-bit PNG file (RGBA) and I am creating an OpenGL texture with it.
It works fine for 24-bit PNG files (with no alpha channel), but when I use a 32-bit PNG file, …
I want to load an image (jpg and png) with OpenCV as OpenGL Texture.
Here is how I load the image to OpenGL:
glEnable(GL_TEXTURE_2D);
textureData = loadTextureData("textures/trashbin.png");
cv::Mat image = cv::imread("textures/trashbin.png");
…