
[Solved] GenTexture() problems!
Posted Friday, 29 May, 2009 - 08:35 by CheatCat inI try to generate a texture by GenTexture(). But I get this error:
"No context is current in the calling thread (ThreadId: 10)."
The code:
using System; using OpenTK; using OpenTK.Graphics; namespace Test { static class Program { [STAThread] static void Main() { int tex = GL.GenTexture(); } } }


Comments
Re: GenTexture() problems!
CheatCat. You need an "opengl context" to call methods in GL.
Easiest way is inheriting from the GameWindow class; look at the examples in the OpenTK download.
Re: GenTexture() problems!
Oh, I forget that! xD Thanks!