So I used the NDK r3 to build a opengl es 2.0 test app, which simply
tried to render a non-power-of-two texture. However, it doesn't work
for me. The same test app works fine if I change to a power-of-two
texture. I tested on Motorola Droid with Android 2.0.1.
Any idea? Thanks in advance.
Best,
Ronghua
So any way to confirm the hardware's capability of rendering a non-
power-of-two texture?
And any phone in the market supports this?
It'll should be in the list of extensions. For instance the Droid supports it with the GL_IMG_texture_npot extension. Not sure about the others; I don't have that hardware in front of me.
Tristan Miller
On Apr 2, 2010 6:15 PM, "arhold" <arh...@gmail.com> wrote:
Thanks for the reply.
So any way to confirm the hardware's capability of rendering a non-
power-of-two texture?
And any phone in the market supports this?
On Apr 2, 3:11 pm, Robert Green <rbgrn....@gmail.com> wrote:
> It's not GL that would have an issue...
GL Extensions = GL_OES_rgb8_rgba8 GL_OES_depth24
GL_OES_vertex_half_float GL_OES_texture_float
GL_OES_texture_half_float GL_OES_element_index_uint GL_OES_mapbuffer
GL_OES_fragment_precision_high GL_OES_compressed_ETC1_RGB8_texture
GL_OES_EGL_image GL_OES_required_internalformat GL_OES_depth_texture
GL_OES_get_program_binary GL_OES_packed_depth_stencil
GL_OES_standard_derivatives GL_EXT_multi_draw_arrays
GL_EXT_texture_format_BGRA8888 GL_IMG_shader_binary
GL_IMG_texture_compression_pvrtc GL_IMG_texture_stream2
GL_IMG_texture_npot GL_IMG_texture_format_BGRA8888 GL_IMG_read_format
GL_IMG_program_binary GL_IMG_vertex_array_object
After add below two lines, the npot texture is working for me on Droid
now. Thanks all for replying.
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_NEAREST );
glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
GL_NEAREST );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_CLAMP_TO_EDGE);
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
GL_CLAMP_TO_EDGE);