Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualPwFClockWise

Posted 09 January 2013 - 12:36 PM

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

#1PwFClockWise

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.


PARTNERS