I followed https://stackoverflow.com/a/31095254/6655884 and did the following (added \n line break to version directive)
public class OrwellShaders {
public class Vertex {
public static final String vertex =
"#version 330 es\n " +
"layout (location = 0) in vec3 aPos;\n " +
"layout (location = 1) in vec2 aTexCoord;\n " +
"\n " +
"out vec2 TexCoord;\n " +
"\n " +
"void main()\n " +
"{\n " +
" gl_Position = vec4(aPos, 1.0);\n " +
" TexCoord = vec2(aTexCoord.x, aTexCoord.y);\n " +
"};\n";
}
but I'm still getting Adreno error Invalid #version shader
My phone has Android 8 so it should have support. I'm not using GLSurfaceView
so there's no setEGLContextClientVersion(3)
Im just using
egl = (EGL10) EGLContext.getEGL();
eglDisplay = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
if (eglDisplay == EGL10.EGL_NO_DISPLAY) {
//...