Skip to content

ANGLE_GLES20 in default Lwjgl3Launcher can cause mipmapped textures to render black #246

@CakeInvasion

Description

@CakeInvasion

When using the default Lwjgl3Launcher generated by Gdx-liftoff, enabling configuration.setOpenGLEmulation(GLEmulation.ANGLE_GLES20, ...) can cause mipmapped non-square textures to render completely black.

configuration.setOpenGLEmulation(Lwjgl3ApplicationConfiguration.GLEmulation.ANGLE_GLES20, 0, 0);

This behavior is extremely confusing during development, because it looks like a LibGDX / mipmap bug, while it is actually ANGLE-specific.

Since Gdx-liftoff generates this line with comments suggesting it improves compatibility, it would be helpful to:

  • document this behavior
  • or add a stronger warning that ANGLE_GLES20 is meant for testing only and can differ from both desktop GL and real Android devices.

Steps to reproduce :

  1. Create a new LibGDX project using Gdx-liftoff (LWJGL3)
  2. Keep the default Lwjgl3Launcher configuration with ANGLE_GLES20 enabled
  3. Load a mipmapped texture that is NOT a square (e.g. 512x128):
    new Texture(file, true)
    texture.setFilter(MipMapLinearLinear, Linear)
  4. Render the texture (any draw size)
  5. Result: the texture renders completely black on desktop
  6. Disable ANGLE_GLES20 -> the same texture renders correctly
  7. Using a square texture (e.g. 512x512) does NOT show this issue

Note: The same rectangular mipmapped texture renders correctly:

  • on Android devices
  • on desktop OpenGL without ANGLE

This took significant time to debug because the issue appears unrelated to the launcher configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions