Exemplo n.º 1
0
 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();
         }
     };
 }
Exemplo n.º 2
0
 protected GLTexture(GLTextureParams textureParams) : base(GL.GenTexture, GL.DeleteTexture)
 {
     TextureParams = textureParams;
 }
Exemplo n.º 3
0
 public GLStaticTexture(GLTextureParams textureParams, FIBITMAP bitmap) : base(textureParams)
 {
     _size = new Size((int)FreeImage.GetWidth(bitmap), (int)FreeImage.GetHeight(bitmap));
     _data = FreeImage.GetBits(bitmap);
 }