I need to display image in openGL window.
Image changes every timer tick.
I’ve checked on google how, and as I can see it can be done using or glBitmap or glTexImage2D functions.
What is the difference between them?
I need to display image in openGL window. Image changes every timer tick. I’ve
Share
The difference? These two functions have nothing in common.
glBitmapis a function for drawing binary images. That’s not a .BMP file or an image you load (usually). The function’s name doesn’t refer to the colloquial term “bitmap”. It refers to exact that: a map of bits. Each bit in the bitmap represents a pixel. If the bit is 1, then the current raster color will be written to the framebuffer. If the bit is 0, then the pixel in the framebuffer will not be altered.glTexImage2Dis for allocating textures and optionally uploading pixel data to them. You can later draw triangles that have that texture mapped to them. ButglTexImage2Dby itself does not draw anything.