Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Posted 09 January 2013 - 12:36 PM

Edit: Figured it out myself, problem should be solved now.


Posted 09 January 2013 - 08:20 AM

So, hi again. Now I've written my own SurfaceFactory and Surface. It "works". I use the buffer I get in paint() to bind it to a Texture2D and then I bind a ShaderResourceView to that texture2D and voilá -  I got a texture. And it "works" to render it as well.

The problem, however, is that the Paint() method is called several times when loading an URL. Which means that I need to change the pixels in the old buffer that were changed in the next Paint() call. I don't really know how to do that. Right now I get the site rendered but text and logos are all distorted, but in the right place. So I think that all I need to do is to update the buffer with new data from Paint().

virtual void Awesomium::Surface::Paint	(	
unsigned char * 	        src_buffer,
int 	                        src_row_span,
const Awesomium::Rect & 	src_rect,
const Awesomium::Rect & 	dest_rect 


The src_rect and dest_rect is, as far as I can tell, the size of the block of pixeldata that's stored in the buffer. These rects have an x and y value, but they are always (0,0). How would I change the data that needs to be changed?

Thanks for the help thus far, I feel like this is the last problem that keeps me from doing what I need to.