ofShader integer lookups

Does anybody have experience dealing with integer lookups in shaders?
e.g. I want to have a lookup table of 16bit integer values, they should be stored in the shader as 16bit unsigned (as with GL_LUMINANCE16), and when i access them in the shader, it should return an integer value (unlike GL_LUMINANCE16 / sampler2DRect / texture2DRect which return a floating point value).

It seems I should use GL_LUMINANCE16UI_EXT / usampler2Drect / #version 140

But I get a couple of issues there:

  1. [error] ofGetGlFormatAndType(): glInternalFormat not recognized returning glFormat as glInternalFormat
  2. how to get texture coordinates in #version 140 ? do i need to set a manual varying, or is there a way to recover default texture coordinates?

Thanks!
Elliot

i think this is fixed in my programmableGL branch, now you can specify internalFormat and format when allocating the texture and the format when uploading data which should fix the error you are getting.

Not sure for 140 but i would say that you need a varying