Example #1
0
        public Texture(OpenglGpuImpl OpenglGpuImpl)
        {
            this.OpenglGpuImpl = OpenglGpuImpl;
            OpenglGpuImpl.GraphicsContext.MakeCurrent(OpenglGpuImpl.WindowInfo);

            //lock (OpenglGpuImpl.GpuLock)
            {
                TextureId = GL.GenTexture();
                var GlError = GL.GetError();
                //Console.Error.WriteLine("GenTexture: {0} : Thread : {1} <- {2}", GlError, Thread.CurrentThread.ManagedThreadId, TextureId);
                if (GlError != ErrorCode.NoError)
                {
                    //TextureId = 0;
                }
            }
        }