Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change OpenGL version from 1.1 #35

Open
guyluz11 opened this issue Aug 15, 2024 · 1 comment
Open

Can't change OpenGL version from 1.1 #35

guyluz11 opened this issue Aug 15, 2024 · 1 comment

Comments

@guyluz11
Copy link

When I run my openGL code as a regular activity it runs in OpenGL version 3.0

But when I run the same code under class that extends WallpaperService I get version 1.1

I set setEGLContextClientVersion(2); and also <uses-feature android:glEsVersion="0x20000" android:required="true"/> but it does not seem to do anything.

Checking version using

   String versionString = GLES20.glGetString(GLES20.GL_VERSION);

        if (versionString == null) {
            versionString = GLES20.glGetString(GLES20.GL_VERSION);
        }
        if (versionString == null) {
            versionString = GLES30.glGetString(GLES30.GL_VERSION);
        }
        if (versionString == null) {
            versionString = GLES31.glGetString(GLES31.GL_VERSION);
        }
        if (versionString == null) {
            versionString = GLES32.glGetString(GLES32.GL_VERSION);
        }
        if (versionString == null) {
            Log.i("version of GLES", "Version didn't found" + versionString);
        }
        else {
            Log.i("version of GLES", "Version is" + versionString);
        }
        Log.i("version of GLES", "Version is" + versionString);
@guyluz11
Copy link
Author

This pr solved it for me
GLWallpaperService#8 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant