I'm using http://awesomium.com/ (1.7 RC2) for the webview and http://perspective.codeplex.com/ for the 3d objects.
XAML:
<p:Workshop3D>
<p:Spherical3D ParallelCount="30" DefaultTextureMapping="True">
<p:Spherical3D.Material>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<ImageBrush TileMode="None" Stretch="Fill"
ImageSource="{Binding Path=WebTexture, ElementName=MyWpfWindow}" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</p:Spherical3D.Material>
</p:Spherical3D>
</p:Workshop3D>
Code Behind:
public MainWindow()
{
_webView = WebCore.CreateWebView(800, 600);
_webView.LoadURL(new Uri(@"http://www.youtube.com"));
while (_webView.IsLoading)
WebCore.Update();
var buffer = (BitmapSurface)_webView.Surface;
var bitmap = new WriteableBitmap(800, 600, 96, 96, PixelFormats.Bgra32, null);
buffer.CopyTo(bitmap.BackBuffer, 800, 4, false, false);
WebTexture = bitmap;
InitializeComponent();
}
private ImageSource _webTexture;
public ImageSource WebTexture
{
get
{
return _webTexture;
}
set { _webTexture = value; RaisePropertyChanged("WebTexture"); }
}
For some reason the get accessor for WebTexture isn't even being called, so I'm guessing I'm missing something here (2 hours of google/bing/duckduckgo didn't bring up anything either).