Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Android, ES1.1, ETC1, Mipmaping

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    1

    Android, ES1.1, ETC1, Mipmaping

    When I activate the mipmaping on uncompressed texture, all is working perfectly.

    When I do it on ETC1 texture, the texture is blank, certainly because the complete set of mipmaps was not given.

    The code is very simple and works on iPhone (with PVR compression, of course).

    It doesn't work on Android. The mipmap was build with an external tool on PC, and past together to an unique file containing all the plan, untill size of 4x4.

    I stop making mipmap at the size of 4, because glCompressedTexImage2D return an opengl error if try using mipmap lower.

    the code is here:

    for(u32 i=0; i<=levels; i++)
    {
    size = KC_TexByte(pagex, pagey, tex_type);
    glCompressedTexImage2D(GL_TEXTURE_2D, i, type, pagex, pagey, 0, size, ptr);
    pagex = MAX(pagex/2, 4);
    pagey = MAX(pagey/2, 4);
    ptr += size;
    KC_Error(); // test openGL error
    }

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: Android, ES1.1, ETC1, Mipmaping

    You are supposed to send a 4x4 tile for the smallest MIP LODS.

    Make sure size is correct for the tile you send.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •