I'm having trouble using a rectangular texture on iOS (iPhone 3gs or newer)
I'm trying to use GL_TEXTURE_RECTANGLE
and/or GL_EXT_texture_rectangle
but XCODE autocomplete doesn't recognize it, i think because the proper header file is not imported and throws me the undeclared identifier
error.
Also tried GL_ARB_texture_non_power_of_two
and GL_ARB_texture_rectangle
as answered in this question OpenGL ES GL_TEXTURE_RECTANGLE but none are declared.
I've googled and haven't found a reference to the header it is declared, the header files used in the documentation sample projects are not found.
- Working on xcode 4.2
these are the headers I'm currently importing:
#import <OpenGLES/EAGL.h>
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
also tried to import these
#import <OpenGL/OpenGL.h> //file not found
#import <OpenGL.h> //file not found
#import <OpenGL/glu.h> //file not found
OpenGL ES on iOS doesn't support rectangle textures. See here for full list of OpenGL ES extensions supported on iOS.
Are you using ES 1.1 or ES 2.0? ES2 has NPOT texture support, so you could use that instead of rectangle textures.