Open Lappun0 opened 1 year ago
Maybe ask at Skia? https://groups.google.com/g/skia-discuss/ I’m not sure in what state their OpenGL / macOS version is right now, given that Apple deprecated OpenGL a while ago Also, try 0.116.1, it’s been out for a few days :)
Whoops, While writing I figured id try with the newest version, but it seems that I accidentally wrote the one I was using before in, this happens on 0.116.1 too.
I have the code from the original PathEffects demo setup in Kotlin, when I run it with some basic LWJGL code on Windows everything renders fine, but when I run it on macOS it gives me this error each frame:
Shader compilation error
1 #version 110 2
3 uniform vec4 sk_RTAdjust; 4 uniform vec2 uatlas_adjust_S0; 5 attribute vec4 fillBounds; 6 attribute vec4 color; 7 attribute vec4 locations; 8 varying vec2 vatlasCoord_S0; 9 varying vec4 vcolor_S0; 10 void main() { 11 vec2 unitCoord = vec2(float(gl_VertexID & 1), float(gl_VertexID >> 1)); 12 vec2 devCoord = mix(fillBounds.xy, fillBounds.zw, unitCoord); 13 vec2 atlasTopLeft = vec2(abs(locations.x) - 1.0, locations.y); 14 vec2 devTopLeft = locations.zw; 15 bool transposed = locations.x < 0.0; 16 vec2 atlasCoord = devCoord - devTopLeft; 17 if (transposed) { 18 atlasCoord = atlasCoord.yx; 19 } 20 atlasCoord += atlasTopLeft; 21 vatlasCoord_S0 = atlasCoord uatlas_adjust_S0; 22 vcolor_S0 = color; 23 gl_Position = vec4(devCoord, 0.0, 1.0); 24 gl_Position = vec4(gl_Position.xy sk_RTAdjust.xz + gl_Position.ww * sk_RTAdjust.yw, 0.0, gl_Position.w); 25 } 26
Errors: ERROR: 0:11: Use of undeclared identifier 'gl_VertexID' ERROR: 0:11: Use of undeclared identifier 'gl_VertexID' ERROR: 0:12: Use of undeclared identifier 'unitCoord' ERROR: 0:16: Use of undeclared identifier 'devCoord' ERROR: 0:18: Use of undeclared identifier 'atlasCoord' ERROR: 0:18: Use of undeclared identifier 'atlasCoord' ERROR: 0:20: Use of undeclared identifier 'atlasCoord' ERROR: 0:21: Use of undeclared identifier 'atlasCoord' ERROR: 0:23: Use of undeclared identifier 'devCoord'
here is my draw code:
When no drawing (or only basic drawing) Is done before the path effects are drawn, only the first five fail to be drawn. However if I place this code after the rest of my scene is drawn, all effects fail.
This happens on the latest version (0.109.2)