private EX9.Texture CreateTexture(CefBrowser browser, Device device) { // TODO: Fix exceptions on start up. lock (FTextureResource) { var usage = Usage.None & ~Usage.AutoGenerateMipMap; var texture = new EX9.Texture(device, FSize.Width, FSize.Height, 1, usage, Format.A8R8G8B8, Pool.Default); var sysmemTexture = new EX9.Texture(device, FSize.Width, FSize.Height, 1, usage, Format.A8R8G8B8, Pool.SystemMemory); texture.Tag = sysmemTexture; var rect = new CefRect(0, 0, FSize.Width, FSize.Height); FBrowser.Invalidate(rect); return(texture); } }
private EX9.Texture CreateTexture(CefBrowser browser, Device device) { // TODO: Fix exceptions on start up. lock (FTextures) { var usage = Usage.None & ~Usage.AutoGenerateMipMap; var pool = Pool.Managed; if (device is DeviceEx) { usage = Usage.Dynamic & ~Usage.AutoGenerateMipMap; pool = Pool.Default; } var texture = new EX9.Texture(device, FSize.Width, FSize.Height, 1, usage, Format.A8R8G8B8, pool); var rect = new CefRect(0, 0, FSize.Width, FSize.Height); FBrowser.Invalidate(rect); FTextures.Add(texture); return(texture); } }