GL transformer converts glTexImage2D level argument to a constant #126

Closed
opened 3 years ago by gpe · 2 comments
gpe commented 3 years ago
Owner

e.g. level = 0 is translated to GL_POINTS. This doesn't make sense.

e.g. level = 0 is translated to GL_POINTS. This doesn't make sense.
gpe added the
deobfuscator
bug
labels 3 years ago

I have a few questions:

  1. What should it be translated to?
  2. Why is it translating to GL_POINTS?
  3. Which function is responsible for the conversion?
I have a few questions: 1. What should it be translated to? 2. Why is it translating to GL_POINTS? 3. Which function is responsible for the conversion?
Poster
Owner
  1. In this particular case, it should just be a literal 0 and shouldn't be replaced by a GL_ constant.
  2. I assume there's a bug in our code for processing the GL registry that makes us thing the level argument has a type it doesn't actually have.
  3. https://git.openrs2.org/openrs2/openrs2/src/branch/master/deob-ast/src/main/kotlin/org/openrs2/deob/ast/transform/GlTransformer.kt, https://git.openrs2.org/openrs2/openrs2/src/branch/master/deob-ast/src/main/kotlin/org/openrs2/deob/ast/gl/GlRegistry.kt, https://git.openrs2.org/openrs2/openrs2/src/branch/master/share/deob/gl.xml
1. In this particular case, it should just be a literal `0` and shouldn't be replaced by a `GL_` constant. 2. I assume there's a bug in our code for processing the GL registry that makes us thing the `level` argument has a type it doesn't actually have. 3. https://git.openrs2.org/openrs2/openrs2/src/branch/master/deob-ast/src/main/kotlin/org/openrs2/deob/ast/transform/GlTransformer.kt, https://git.openrs2.org/openrs2/openrs2/src/branch/master/deob-ast/src/main/kotlin/org/openrs2/deob/ast/gl/GlRegistry.kt, https://git.openrs2.org/openrs2/openrs2/src/branch/master/share/deob/gl.xml
gpe closed this issue 3 years ago
Sign in to join this conversation.
Loading…
There is no content yet.