I know that BlitzMax has a TPixmap object that can be used for reading/writing pixels, but I'm trying to use pure OpenGL for this (as a learning experience).
So, I'm wondering how I can read and write pixels from an OpenGL texture.
I'm pretty sure it involves the following functions, but I'm not sure:
glTexSubImage2d (write pixels to a texture)
glGetTexImage (get pixels from a texture)
glGetTexLevelParameterfv (used to get pixel dimensions for figuring out what size of an array needed for use with glGetTexImage)
So, I'm wondering how I can read and write pixels from an OpenGL texture.
I'm pretty sure it involves the following functions, but I'm not sure:
glTexSubImage2d (write pixels to a texture)
glGetTexImage (get pixels from a texture)
glGetTexLevelParameterfv (used to get pixel dimensions for figuring out what size of an array needed for use with glGetTexImage)