No messages are output to the console, it just fails gracefully. Try catch doesnt catch an error either.
If I step into the code at LoadFromMemory, it takes me to
template <typename T>
Rect<T>::Rect() :
Left (0),
Top (0),
Width (0),
Height(0)
{
}
and then returns.
**EDIT**
Ok, have it working now, but not entirely as I would like.
if(awe_webview_is_loading_page(webView))
{
awe_webcore_update();
}
else
{
awe_webcore_update();
renderBuffer = awe_webview_render(webView);
if(renderBuffer != NULL)
{
size_t bufferSize = awe_renderbuffer_get_height(renderBuffer) * awe_renderbuffer_get_rowspan(renderBuffer);
std::vector<sf::Uint8> charBuffer;
charBuffer.resize(bufferSize);
sf::Uint8* charPtr = &charBuffer[0];
awe_renderbuffer_copy_to(renderBuffer, charPtr, awe_renderbuffer_get_rowspan(renderBuffer), 4, true, false);
image.Create(1024, 768, charPtr);
texture.LoadFromImage(image);
sprite.SetTexture(texture);
window.Draw(sprite);
}
}
Using the Create function in sf::Image I can pass the pixel buffer and it works perfectly. But it'd be nice to remove that step and just grab it straight from memory.