treeform / fidget

Figma based UI library for nim, with HTML and OpenGL backends.
MIT License
768 stars 33 forks source link

Error: could not find symbol: glTextureSubImage2D #6

Closed NimStart closed 4 years ago

NimStart commented 4 years ago

Hi. Thanks for the great library and plugin. It seems like an awesome project with huge potential.

The minimal example crashes with this message when I try to run it (cross compiled from linux to windows)

Got exception ref 024366E0 --> [errorCode = 0,
parent = nil,
name = 005D60F0"LibraryError",
msg = 02440670"could not find symbol: glTextureSubImage2D",
trace = 0219B340@[
[procname = 005FDC70"remoted", line = 33, filename = 005FDAB0"/workspaces/remoted.nim"],
[procname = 005FD328"startFidget", line = 282, filename = 005FD1C4"/home/gitpod/.nimble/pkgs/fidget-0.2.1/fidget/backendopengl.nim"], 
[procname = 005FD204"setupFidget", line = 213, filename = 005FD1C4"/home/gitpod/.nimble/pkgs/fidget-0.2.1/fidget/backendopengl.nim"], 
[procname = 005FB459"start", line = 176, filename = 005FB394"/home/gitpod/.nimble/pkgs/fidget-0.2.1/fidget/openglbackend/base.nim"], 
[procname = 005FA7EC"glGetProc", line = 66, filename = 005FA7F8"/home/gitpod/.nimble/pkgs/opengl-1.2.3/opengl/private/prelude.nim"], 
[procname = 005D609E"raiseInvalidLibrary", line = 75, filename = 005D5FEC"/home/gitpod/.choosenim/toolchains/nim-1.0.4/lib/pure/dynlib.nim"]],
raiseId = 0,
up = nil]
 with message could not find symbol: glTextureSubImage2D
treeform commented 4 years ago

I think I fixed it with this: https://github.com/treeform/fidget/commit/4a8ea478338063b91bd8b45a849f0188a2a296b3

glTextureSubImage2D is openGL 4.5 only command. I probably don't need it. I can just use glTexSubImage2D.

NimStart commented 4 years ago

That fixed it. Thanks for the quick fix!