Re: [Tuxnes-devel] Trying to add SDL Renderer
Brought to you by:
tmmm
From: W. M. P. <mi...@fl...> - 2002-03-09 20:00:13
|
> > After looking at the X11 renderer code, I concluded that the global > > variable fb is a video frame buffer filled by tuxnes's emulator code. > > I thought that the following pseudo code would display a NES frame: > > > drawimage(PBL) > > Memory Copy (SDLbuf, p, 240 * 256) > > SDL Display(SDLbuf) > > I'm curious--why don't you have the render draw directly into the > SDL buffer? Looks like you're doing double work. Changed in accordance with your suggestion. > Anyway, if you want an example of rendering look at the GGI renderer, > it's probably easier to follow than X11 because the operation is similar to > SDL (as far as I know). Thanks. W.c actually ended up being a very good reference. My problem was that I didn't understand the palette handling code. I was not initializing the palette prior to calling drawimage. I now have rudimentary SDL support working in full-screen mode. I will finish my patch up and submit it in the near future. In addition, I plan on using my experience writing a renderer to clean up some of tuxnes's interfaces a bit. There is also a lot of repeated code in w.c, sdl.c, x11.c, and ggi.c that I would like to consolidate. I will submit these changes as a separate patch. -- Mike :wq |