Closed Noofbiz closed 6 years ago
Thank you for reporting this. This is clearly a bug and shouldn't happen. We need to investigate what is different about ClearColor
in new XML data.
@Noofbiz Since you're able to reproduce this (I can't yet), is it possible for you to make a smaller repro sample?
github.com/go-gl/example/gl21-cube
works okay for me despite using ClearColor
. Does it work for you too?
When I compare v2.1/gl/package.go
before and after that commit, there is no change related to ClearColor
. I suspect the issue is not tied to that particular function, but rather it just happened to be the first one called.
I tried the hud demo from https://github.com/EngoEngine/engo/issues/520. I got the same crash. I tried it again with go-gl/gl@eafa86a81d9705ff0b4ab163d26fe74da80e0559, and got the same crash. It doesn't seem to be an issue with go-gl/gl
.
Thank you for checking that out so throughly and quickly. Sorry for any inconveniences
No problem, thanks anyway!
Original issue here https://github.com/EngoEngine/engo/issues/520
Related to: https://github.com/go-gl/gl/commit/f8cee0ff968a2dd4ef2786e7a4c843a451cd40a7
If we use https://github.com/go-gl/gl/commit/eafa86a81d9705ff0b4ab163d26fe74da80e0559 everything works perfectly. It looks like it comes from the change to GlowGetProcAddress_gl21; before it returned a value and now it's not, so when ClearColor is called it gets to here in package.go:
When it tries to get
gpClearColor = (C.GPCLEARCOLOR)(getProcAddr("glClearColor"))
it segfaults.