Jump to content
  • Advertisement
Sign in to follow this  
Caste

OpenGL Floating point texture on iPhone GLES 2.0

This topic is 2529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

I'm trying to use a float image as OpenGL texture in an iPhone app. The float data is computationally generated, real 32bit floats.
Now according to the supported extension OES_texture_float I should be able to use GL_FLOAT as type parameter for my texture. But I cannot find which internalformat types are allowed for glTexImage2D that would suit a float texture.


glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, size.width, size.height, 0, GL_RGB, GL_FLOAT, imageTileData);





I've tried GL_RGB and GL_RGBA for both format fields, but can't find equivalents for GL_RGB32F which would be what I intend to use. glGetError returns a GL_INVALID_VALUE.
My whole setup works with non-float textures btw, so it's really the GL_FLOAT and format combination that causes the error.

Any ideas? Thx in advance!

Share this post


Link to post
Share on other sites
Advertisement
No, GL_FLOAT_OES is not available, but according to the spec it is not needed (or not even valid).


New Tokens:
Accepted by the <type> parameter of TexImage2D, TexSubImage2D, TexImage3D, and TexSubImage3D:
HALF_FLOAT_OES 0x8D61
FLOAT 0x1406

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!