-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGSEGV when using *pixelgl.Canvas.Texture() #8
Comments
Calling
|
Thanks for the issue! The trouble is, that If we look at the docs of the GLHF package (https://godoc.org/github.com/faiface/glhf), we find this:
The thing is, that OpenGL is thread sensitive and all of the OpenGL calls should be done from the main thread of your program. If you violate that, the program might crash. In your case, you certainly violated that. Since no user of Pixel should really need to bother with the GLHF package and this functionality of "replacing the Canvas pixels" is really useful, I've added two methods to Canvas: SetPixels and Pixels. Use those instead. If you're interested in how this whole thing should have been done, I recommend you taking a look at the source of those methods. It's quite easy. |
I suspected that it had to do with being on the wrong thread, thank you for clarifying this and that you added the new methods. |
Cool. If there's no trouble with the new methods, I'll close this issue. |
I have now verified that |
I keep getting SIGSEGV:s when using the texture of a *pixelgl.Canvas.
The methods
Begin()
,SetPixels()
andEnd()
all result in SIGSEV.Minimal example using Begin()
Output
Environment
The text was updated successfully, but these errors were encountered: