• Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 564 from 2004/4/15
    Hi,

    thx for your help. I tried it with gluBuild2DMipmaps like this:
    Code:

    glGenTextures(1, &o.textureId);
    glBindTexture(GL_TEXTURE_2D, o.textureId);
    glTexImage2D(GL_TEXTURE_2D,
    0,
    GL_RGBA,
    (GLsizei) o.texture->width,
    (GLsizei) o.texture->height,
    0,
    GL_RGBA,
    GL_UNSIGNED_BYTE,
    o.texture->data);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 3);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
    #ifdef __MORPHOS__
    gluBuild2DMipmaps(GL_TEXTURE_2D,
    4,
    (GLsizei)o.texture->width,
    (GLsizei)o.texture->height,
    GL_RGBA,
    GL_UNSIGNED_BYTE,
    o.texture->data);
    #else

    glGenerateMipmap(GL_TEXTURE_2D);
    #endif


    But the result looks ugly on MorphOs. The Linear Filtering does not seem to work.
    Here are screenshots from MorphOs and Linux:
    Mos:
    mos_mipmap.png
    Linux:
    linux_mipmap.png

    Do you have any idea what's going wrong?

    [ Edited by eliot 26.04.2017 - 16:49 ]
    regards
    eliot
  • »26.04.17 - 16:48
    Profile