I am trying to use Magick++ with OpenGL textures, right now I am using
Code: Select all
glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* data)
I have been looking for a way to determine the pixel format(for the 7th parameter GL_RGB or GL_RGBA etc. and for the 8th parameter GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT or GL_UNSIGNED_SHORT_5_6_5 for RGB565 etc. ) , however, I was not able to find a solution, I know there is a depth() function and channelDepth() function in Image class, but is that how I should determine those image properties? What should I do if I use a graylevel image?