glsl4idea icon indicating copy to clipboard operation
glsl4idea copied to clipboard

Error when using Kotlin String variables inside the GLSL String

Open hamoid opened this issue 1 year ago • 0 comments

Describe the bug

The GLSL plugin doesn't seem to like it if I use a Kotlin variable and insert that variable in the GLSL code. I do that to generate variations of the GLSL code (to avoid duplication) and to ensure I make no mistakes in uniform names.

To Reproduce

class A {
    private val v = "err"

    @Language("GLSL")
    private val glsl = """
        uniform float $v;
    """
}

Expected behavior Ideally the code would not be highlighted as an error.

Screenshots image

Versions

  • IDE: IntelliJ IDEA 2023.1 (Community Edition), Build #IC-231.8109.175, built on March 29, 2023, Runtime version: 17.0.7+7 amd64
  • Plugin: 1.24

hamoid avatar Apr 26 '23 10:04 hamoid