   texture format help
  Hello there... I'm trying to create a texture that has one byte per texel. Is this possible?  I've tried many different combinations of parameters to glTexImage2D, but also receive an INVALID_ENUM error.I thought thatinternalFormat = 1format = GL_REDtype = GL_UNSIGNED_BYTE would do the trick, but I obviously don't understand what's going on, given that nothing I try works.Thanks for the help   
  Try with:internalFormat = GL_R8 (or GL_R8UI if you want unsigned integers).format = GL_REDtype = GL_UNSIGNED_BYTEGL_R is part of GL_ARB_texture_rg or core GL 3.1   ;  Two things:1) Check for error on the line directly before glTexImage if you haven't, just to be sure that it is glTexImage that is the problem. (If you haven't already)2) Can you post the whole glTexImage2D call that you're using? What the doc says will trigger an invalid enum doesn't have much to do with the format:Quote:GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D,  GL_PROXY_TEXTURE_2D,  GL_PROXY_TEXTURE_CUBE_MAP,GL_TEXTURE_CUBE_MAP_POSITIVE_X,GL_TEXTURE_CUBE_MAP_NEGATIVE_X,GL_TEXTURE_CUBE_MAP_POSITIVE_Y,GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z. GL_INVALID_ENUM is generated if target is one of the six cube map 2D image targets and the width and height parameters are not equal.   GL_INVALID_ENUM is generated if type is not a type constant.   GL_INVALID_ENUM is generated if type is GL_BITMAP and  format is not GL_COLOR_INDEX. ;  Huntsman: thanks! that worked. I always struggle to find out which combinations are compatible and what they actually represent. thanks againkarwosts: yeah I have checks after nearly all the calls, just in case :P  the 3.2 spec lead me to believe it was a problem with parameter choice.  anyways its fixed now, thanks :)   