I'm using OpenGL ES 2.0 on an iPad 2 / 3. I'd like to use GL_FLOAT when creating textures:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight, 0, GL_RGBA, GL_FLOAT, rawData);
but the problem is that GL_LINEAR is not supported as a GL_TEXTURE_MAG_FILTER when GL_FLOAT is used if you don't have GL_OES_texture_float_linear showing up in your list of supported extensions. (None of the iPads do.)
But I do have GL_OES_texture_half_float_linear in my list of extensions. So using a half-float texture ought to work with linear interpolation.
Problem is, switching my texture creation to:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texWidth, texHeight, 0, GL_RGBA, GL_HALF_FLOAT_OES, rawData);
causes EXC_BAD_ACCESS when I run the app. (libGPUSupportMercury.dlylib'gpus_ReturnGuiltyForHardwareRestart)
I haven't changed the format of the data since calling it with GL_FLOAT. Does the input data need to change for HALF_FLOAT somehow? If so, how? I don't know how I would split my input floats in half. Each component is GLfloat currently.