-
Notifications
You must be signed in to change notification settings - Fork 115
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
GL.GenBuffer() gets 0 #86
Comments
What is the |
First of all, I'm using OpenTK in the Avalonia project. Avalonia's version is 0.10.14 and OpenTK's version is 4.7.7 All my code is single thread for now. I took this code as reference OpenTKAvalonia. Here is the "original" OpentTkInit method:
From the base class
That works ok. My issue is about moving all job with buffers to the other method whith runs in the app's runtime. Absolutely same code but in the other place. |
You need to make sure that you have an opengl context current on the thread. Is it possible that the "runtime" function doesn't have a context current? |
Hi there. If I define buffers inside the
OpenTkInit()
method like in tutorials, it work OK. But if I do same in some other method after the OpenTK is already initialized,GL.GenBuffer()
gets zero. How to solve it? I need to add buffered data during the runtime. For example, add some surface from the file or remove it.The text was updated successfully, but these errors were encountered: