Ska Software

Hi

I've got a 2D project where the world is rendered to a 1024x1024 RenderTarget2D texture, then that texture is drawn to the backbuffer. It works fine on my laptop. On my desktop, however, the RenderTarget2D texture is drawn with an overlay of garbage consisting partly of a frame of a DVD I was watching on the other display. I'm clearing the RenderTarget2D texture properly, and everything is drawn properly, but when this texture is drawn to the backbuffer it receives a nicely alpha blended amount of garbage that covers the entire texture. So I can see everything rendered perfectly on the RenderTarget2D texture, it's just covered with translucent garbage. Sorry, I can't get any shots now. When I get home from work I'll get right on that, assuming I haven't got a solution yet.

Is this a dual display thing or a graphics card thing or a bad programming practice thing The desktop has two displays and a GeForce 6600GT; the laptop has one display and an ATI Mobility 9600.

Thanks, I appreciate it.



Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Ska Software

At the very least, have a lot of people successfully used a RenderTarget2D without the garbage problem If it's just a fluke on one computer I'm not going to worry about it.





Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Ska Software

Here's the pic:

http://skasoftware.com/pics/zbug.jpg

That's a frame of Shaun of the Dead in there (which I was watching in WinAmp)...





Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Ska Software

And as if I haven't been annoying enough yet, here's a good screenie from the laptop:

http://skasoftware.com/pics/zcorrect.jpg





Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

dczraptor

I've used RenderTarget2D with no problems, although when I first started, I forgot to clear the target each time, so i ended up with interesting contrails and effects. I'm not sure what's causing your problem. Maybe you have a buggy graphics card




Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Catalin Zima

or buggy drivers




Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

atlStylez

i've used it a couple times, and ive never had problems when i went from my laptop to my desktop.



Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Ska Software

I guess that's all I needed to know... Thanks!





Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Catalin Zima

I would also suggest trying to run it on the PC with a single display, and see if it does the same.
Also, try and find someone with dual-display that has run RenderToTexture, to see if this is not the problem.

If you find out that dual-display is the problem, and someone else can confirm it, report it as a bug




Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

NotASenator

When you set the device's render target to the RenderTarget2D, then clear the device with the "ClearOptions.Target" flag.

I don't know why, but I had to do the same thing. It may be a driver issue. I had dual monitor running, but I got the same problem after I disabled the second monitor. I was clearing the device at the beginning of my draw function, and then after I had set the render target back from the RenderTarget2D, but not when setting the RenderTarget to the Target2D.

Also, the first time this happened, I wasn't resolving the render target when switching back.

Good luck.




Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it


Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Ska Software

I actually read that post and posted under as Jamezilla, but it was for a different reason--after reading that post I thought I'd violated rules that Shawn set forth and I was confused as to why it still rendered fine. As it turns out, I wasn't actually violating the rules.

The problem on my desktop persists, so I've been doing all my dev work on the laptop. The game runs flawlessly on X360 too, which is all that really matters for the time being.





Re: XNA Game Studio Express RenderTarget2D rendered with garbage all over it

Shawn Hargreaves - MSFT

This sounds very much like a graphics card / driver issue to me.