After Upgrading from Korge 1.10.0.0
to 1.12.0.2
my HitKlack Game doesn't start anymore.
https://github.com/TobseF/HitKlack/tree/UpgradeKorge
Platform: runJVM
Error Compiling Shader: invalid token "compatibility" in version line
Stacktrace
Initial window size: 800, 1440
GL_VERSION: 4.6.0 NVIDIA 432.00
GL_VENDOR: NVIDIA Corporation
HELLO 3840, 2160 : native@0x17b10e0, 0
OpenglAG: Created program BatchBuilder2D.Premultiplied.Tinted with id 1 because contextVersion: -1 != 0
OpenglAG: Created program BatchBuilder2D.NoPremultiplied.Tinted with id 3 because contextVersion: -1 != 0
java.lang.RuntimeException: Error Compiling Shader : 0 : '0(1) : error C0206: invalid token "compatibility" in version line
' : source='#version 100 compatibility
#ifdef GL_ES
precision mediump float;
precision mediump int;
precision lowp sampler2D;
precision lowp samplerCube;
#endif
uniform sampler2D u_Tex;
varying vec2 v_Tex;
varying vec4 v_Col;
varying vec4 v_Col2;
void main() {
gl_FragColor = texture2D(u_Tex, v_Tex.xy);
gl_FragColor.rgb = (gl_FragColor.rgb / gl_FragColor.a);
gl_FragColor = ((gl_FragColor.rgba * v_Col.rgba) + ((v_Col2.rgba - vec4(0.5, 0.5, 0.5, 0.5)) * 2.0));
if ((gl_FragColor.a <= 0.0)) {
discard;
}
}
', gl.versionInt=100, gl.versionString='4.60 NVIDIA', gl=com.soywiz.korgw.win32.Win32KmlGl@47a86fbb
at com.soywiz.korag.AGOpengl$GlProgram.createShader(OpenglAG.kt:480)
at com.soywiz.korag.AGOpengl$GlProgram.ensure(OpenglAG.kt:456)
at com.soywiz.korag.AGOpengl$GlProgram.use(OpenglAG.kt:486)
at com.soywiz.korag.AGOpengl.draw(OpenglAG.kt:192)
at com.soywiz.korag.AG.draw(AG.kt:509)
at com.soywiz.korag.AG.draw$default(AG.kt:508)
at com.soywiz.korge.render.BatchBuilder2D.flush(BatchBuilder2D.kt:518)
at com.soywiz.korge.render.BatchBuilder2D.setStateFast(BatchBuilder2D.kt:247)
at com.soywiz.korge.render.BatchBuilder2D.setStateFast(BatchBuilder2D.kt:240)
at com.soywiz.korge.render.BatchBuilder2D.drawVertices(BatchBuilder2D.kt:223)
at com.soywiz.korge.render.BatchBuilder2D.drawVertices$default(BatchBuilder2D.kt:222)
at com.soywiz.korge.view.RectBase.renderInternal(RectBase.kt:48)
at com.soywiz.korge.view.Graphics.renderInternal(Graphics.kt:229)
at com.soywiz.korge.view.View.render(View.kt:635)
at com.soywiz.korge.view.Container.renderInternal(Container.kt:201)
at com.soywiz.korge.view.Stage.renderInternal(Stage.kt:23)
at com.soywiz.korge.view.View.render(View.kt:635)
at com.soywiz.korge.view.Views.render(Views.kt:203)
at com.soywiz.korge.view.Views.frameUpdateAndRender-_rozLdE(Views.kt:230)
at com.soywiz.korge.Korge$prepareViews$21.invoke(Korge.kt:366)
at com.soywiz.korge.Korge$prepareViews$21.invoke(Korge.kt:34)
at com.soywiz.korev.EventDispatcher$Mixin.dispatch(EventDispatcher.kt:50)
at com.soywiz.korgw.GameWindow.dispatchRenderEvent(GameWindow.kt:450)
at com.soywiz.korgw.GameWindow.frameRender(GameWindow.kt:223)
at com.soywiz.korgw.GameWindow.frame(GameWindow.kt:215)
at com.soywiz.korgw.GameWindow.frame$default(GameWindow.kt:214)
at com.soywiz.korgw.win32.Win32GameWindow$windProc$1.callback(Win32GameWindow.kt:316)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520)
at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)
at com.sun.jna.Native.invokeLong(Native Method)
at com.sun.jna.Function.invoke(Function.java:428)
at com.sun.jna.Function.invoke(Function.java:361)
at com.sun.jna.Library$Handler.invoke(Library.java:265)
at com.sun.proxy.$Proxy2.DispatchMessage(Unknown Source)
at com.soywiz.korgw.win32.MyUser32$Companion.DispatchMessage(Win32.kt)
at com.soywiz.korgw.win32.Win32.DispatchMessage(Win32.kt)
at com.soywiz.korgw.win32.Win32GameWindow.loop(Win32GameWindow.kt:497)
at com.soywiz.korge.Korge.KoruiWithLogger(Korge.kt:396)
at com.soywiz.korge.Korge.invoke-nom0QHw(Korge.kt:421)
at com.soywiz.korge.Korge.invoke-nom0QHw$default(Korge.kt:419)
at MainKt.main(main.kt:10)
at MainKt$$$main.invoke(Unknown Source)
at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:199)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:114)
at kotlin.coroutines.jvm.internal.RunSuspendKt.runSuspend(RunSuspend.kt:19)
at MainKt.main(main.kt)
java.lang.RuntimeException: Error Compiling Shader : 1282 : '0(1) : error C0206: invalid token "compatibility" in version line
' : source='#version 100 compatibility
#ifdef GL_ES
precision mediump float;
precision mediump int;
precision lowp sampler2D;
precision lowp samplerCube;
#endif
uniform sampler2D u_Tex;
varying vec2 v_Tex;
varying vec4 v_Col;
varying vec4 v_Col2;
void main() {
gl_FragColor = texture2D(u_Tex, v_Tex.xy);
gl_FragColor = ((gl_FragColor.rgba * v_Col.rgba) + ((v_Col2.rgba - vec4(0.5, 0.5, 0.5, 0.5)) * 2.0));
}
', gl.versionInt=100, gl.versionString='4.60 NVIDIA', gl=com.soywiz.korgw.win32.Win32KmlGl@47a86fbb
at com.soywiz.korag.AGOpengl$GlProgram.createShader(OpenglAG.kt:480)
at com.soywiz.korag.AGOpengl$GlProgram.ensure(OpenglAG.kt:456)
at com.soywiz.korag.AGOpengl$GlProgram.use(OpenglAG.kt:486)
at com.soywiz.korag.AGOpengl.draw(OpenglAG.kt:192)
at com.soywiz.korag.AG.draw(AG.kt:509)
at com.soywiz.korag.AG.draw$default(AG.kt:508)
at com.soywiz.korge.render.BatchBuilder2D.flush(BatchBuilder2D.kt:518)
at com.soywiz.korge.render.BatchBuilder2D.setStateFast(BatchBuilder2D.kt:247)
at com.soywiz.korge.render.BatchBuilder2D.setStateFast(BatchBuilder2D.kt:240)
at com.soywiz.korge.render.BatchBuilder2D.drawQuad-AUDDen0(BatchBuilder2D.kt:385)
at com.soywiz.korge.render.BatchBuilder2D.drawQuad-AUDDen0$default(BatchBuilder2D.kt:378)
at com.soywiz.korge.bitmapfont.BitmapFontExtKt.drawText-7Cvc0dA(BitmapFontExt.kt:66)
at com.soywiz.korge.view.Text.renderInternal(Text.kt:137)
at com.soywiz.korge.view.View.render(View.kt:635)
at com.soywiz.korge.view.Container.renderInternal(Container.kt:201)
at com.soywiz.korge.view.RectBase.renderInternal(RectBase.kt:50)
at com.soywiz.korge.view.Graphics.renderInternal(Graphics.kt:229)
at com.soywiz.korge.view.View.render(View.kt:635)
at com.soywiz.korge.view.Container.renderInternal(Container.kt:201)
at com.soywiz.korge.view.Stage.renderInternal(Stage.kt:23)
at com.soywiz.korge.view.View.render(View.kt:635)
at com.soywiz.korge.view.Views.render(Views.kt:203)
at com.soywiz.korge.view.Views.frameUpdateAndRender-_rozLdE(Views.kt:230)
at com.soywiz.korge.Korge$prepareViews$21.invoke(Korge.kt:366)
at com.soywiz.korge.Korge$prepareViews$21.invoke(Korge.kt:34)
at com.soywiz.korev.EventDispatcher$Mixin.dispatch(EventDispatcher.kt:50)
at com.soywiz.korgw.GameWindow.dispatchRenderEvent(GameWindow.kt:450)
at com.soywiz.korgw.GameWindow.frameRender(GameWindow.kt:223)
at com.soywiz.korgw.GameWindow.frame(GameWindow.kt:215)
at com.soywiz.korgw.GameWindow.frame$default(GameWindow.kt:214)
at com.soywiz.korgw.win32.Win32GameWindow$windProc$1.callback(Win32GameWindow.kt:316)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520)
at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)
at com.sun.jna.Native.invokeLong(Native Method)
at com.sun.jna.Function.invoke(Function.java:428)
at com.sun.jna.Function.invoke(Function.java:361)
at com.sun.jna.Library$Handler.invoke(Library.java:265)
at com.sun.proxy.$Proxy2.DispatchMessage(Unknown Source)
at com.soywiz.korgw.win32.MyUser32$Companion.DispatchMessage(Win32.kt)
at com.soywiz.korgw.win32.Win32.DispatchMessage(Win32.kt)
at com.soywiz.korgw.win32.Win32GameWindow.loop(Win32GameWindow.kt:497)
at com.soywiz.korge.Korge.KoruiWithLogger(Korge.kt:396)
at com.soywiz.korge.Korge.invoke-nom0QHw(Korge.kt:421)
at com.soywiz.korge.Korge.invoke-nom0QHw$default(Korge.kt:419)
at MainKt.main(main.kt:10)
at MainKt$$$main.invoke(Unknown Source)
at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt$createCoroutineUnintercepted$$inlined$createCoroutineFromSuspendFunction$IntrinsicsKt__IntrinsicsJvmKt$1.invokeSuspend(IntrinsicsJvm.kt:199)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:114)
at kotlin.coroutines.jvm.internal.RunSuspendKt.runSuspend(RunSuspend.kt:19)
at MainKt.main(main.kt)
Korge gameWindow.loop completed
bug