GLES10.glGetIntegerv returns 0 on a Samsung device

I use the code below to determine the maximum width and height for my bitmaps in my drawView method. On most devices, this works fine and returns 2048 or 1024, but on the Samsung S3 that I am currently testing, it returns 0. Did I do something wrong or do I need to find a workaround for Samsung devices?

int[] maxSize = new int[1];
GLES10.glGetIntegerv(GLES10.GL_MAX_TEXTURE_SIZE, maxSize, 0);
Log.d("GLES10", "max: " + String.valueOf(maxSize[0]));
+4
source share
1 answer

I found the root of the problem! I did not add the hardwareAccelerated = "true" tag in the manifest, so it only worked on devices that are set to true by default.

<application
    ...
    android:hardwareAccelerated="true"
>
+5
source

Source: https://habr.com/ru/post/1545837/


All Articles