public GLDynamicTexture(GLTextureParams textureParams, int width, int height) : base(textureParams) { _doubleBuffer = new DoubleBuffer <Bitmap>(new Bitmap(width, height), new Bitmap(width, height)); RenderContext.Active.OnSyncronize += (sender, args) => { lock (_bufferLock) { _bitmapLoadNeeded = _doubleBuffer.SwapBuffers(); } }; }
protected GLTexture(GLTextureParams textureParams) : base(GL.GenTexture, GL.DeleteTexture) { TextureParams = textureParams; }
public GLStaticTexture(GLTextureParams textureParams, FIBITMAP bitmap) : base(textureParams) { _size = new Size((int)FreeImage.GetWidth(bitmap), (int)FreeImage.GetHeight(bitmap)); _data = FreeImage.GetBits(bitmap); }