当前位置: 动力学知识库 > 问答 > 编程问答 >

Can we dynamically check if npot is supported in android?

问题描述:

Is there a way to query if the OpenGL ES implementation on android supports non-power of two textures?

网友答案:

I've seen this reported in the extensions string before as "GL_ARB_texture_non_power_of_two". E.g. on the emulator if you call:

gl.glGetString(GL10.GL_EXTENSIONS)

Where gl is your GL10 instance, then you get:

GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_ARB_texture_compression GL_ARB_texture_non_power_of_two GL_ANDROID_direct_texture GL_ANDROID_user_clip_plane GL_ANDROID_vertex_buffer_object GL_ANDROID_generate_mipmap

Which has that extension listed, so the emulator supports non power of two sized textures.

分享给朋友:
您可能感兴趣的文章:
随机阅读: