#InGui ImGuiImplGl3.init("#version core 330") throwing NumberFormatException

1 messages · Page 1 of 1 (latest)

tame cedar
proud fernBOT
#

<@&987246399047479336> please have a look, thanks.

storm swan
tame cedar
#

is "#version 330 core" not what should be passed in?

storm swan
#

Look at the first column.

tame cedar
#

"3.3" does the same thing

#

so does "330"

tame cedar
# storm swan Look at the first column.

i should also mention, the line in the documentation that throws the error is here:

final String glVersion = glGetString(GL_VERSION);
  if (glVersion != null) {
    final String[] glVersions = glVersion.split("\\.");
    major = Integer.parseInt(glVersions[0]);
    minor = Integer.parseInt(glVersions[1]);
}```
GL_VERSION is defined as follows:

public static final int
GL_VENDOR = 0x1F00,
GL_RENDERER = 0x1F01,
GL_VERSION = 0x1F02, //7938 in decimal
GL_EXTENSIONS = 0x1F03;```
and the glGetString when followed through the documentation ends up here:

public static native long nglGetString(int name);

@NativeType("GLubyte const *")
public static @Nullable String glGetString(@NativeType("GLenum") int name) {
  long __result = nglGetString(name);
  return memUTF8Safe(__result);
}```
#

the reason why i'm so confused is because GL_VERSION and everything after seems to have nothing to do with my input

#

unless somehow nglGetString ends up doing something that somehow reads my input from an entirely separate class

storm swan
#

So just place a breakpoint and look at what the value of glVersion is.

tame cedar
#

"2.1 Metal - 89.3"

#

i'm not sure what i can do about this, it seems like what it's supposed to be getting is either major = 2, minor = 1

#

and none of it depends on what my input to init() is

storm swan
#

So I guess you're using an Apple device, in general why not post an issue on their GitHub? I would look at an FFM based alternative by the way rather than JNI.

tame cedar
#

because i thought it was my fault lol

storm swan
#

Even then, it's their API they can better tell you what.