Jump to content
  • Advertisement
Sign in to follow this  
programmer_tom

CopyRects()

This topic is 4829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

having issues converting a part of a program from dx8 to dx9. used to use copyrects() in a few places. have switched to using GetRenderTargetData() where the two surfaces were the same size, but there's a place where i want to copy just a small section of the back buffer into a tiny texture (copyrects() used to do allow this, but now you have to have surfaces of the same size). anyone know how do surface copy with rectangular area in dx9?

Share this post


Link to post
Share on other sites
Advertisement
thanks DH, but it's my understanding stretchrect() has tons of restrictions, and won't work on most older cards. i'm kinda bummed out they took copyrects() away :( i'll keep lookin around....there's probably another function that does what i need to do.

Share this post


Link to post
Share on other sites
StretchRect() is still the way to go IMO. The restrictions are mainly to do with format conversions.

A size reducing StretchRect() from a Render Target (e.g. your back buffer) to a Render Target Texture (e.g. your small texture) is supported in all cases if the formats are the same and you leave the filtering up to the driver.

UpdateSurface() and StretchRect() form the replacement for CopyRects(), the functionality hasn't disappeared, it's just the restrictions on copying imposed by various graphics chips have been made more explicit.

Share this post


Link to post
Share on other sites
thanks for the reply S1CA.

i figured that i could just render to texture (duh).
apparently, i didn't know how to do this 6 mos ago when i wrote
the copyrects() code, and when we went to dx9 the other day, it
never crosssed my mind until now. much easier/better/faster solution too.

btw...i guess robert dunlop isn't the only microsoft dx mvp :)
i thought i read somewhere he was.

-programmer_tom


Share this post


Link to post
Share on other sites
Quote:
Original post by programmer_tom
btw...i guess robert dunlop isn't the only microsoft dx mvp :)
i thought i read somewhere he was.


I think there are somewhere around 20 DirectX MVPs at the moment. 4 or so hang out on GameDev.net. I'm just too lazy to edit my .sig.

Share this post


Link to post
Share on other sites
well, they should call it a VP ( Valuable professional ) or a VVP ( Very Valuable professional ) then, because 20 most valueable professionals doesn't make a lot of sense :)

Share this post


Link to post
Share on other sites
Quote:
Original post by programmer_tom
well, they should call it a VP ( Valuable professional ) or a VVP ( Very Valuable professional ) then, because 20 most valueable professionals doesn't make a lot of sense :)

Well, considering the number of DirectX programmers worldwide participating in *all* online communities, 20 is a very small number (though they're less than 20, IIRC).

Share this post


Link to post
Share on other sites
The public list seems to only show members with public profiles and pictures, so I don't even show up. :( I could add a picture, but that might qualify as cruel and unusual punishment.

You can go here to see Circlesoft and Simon:
https://mvp.support.microsoft.com/communities/mvplist.aspx?Product=Windows+-+DirectX

Share this post


Link to post
Share on other sites
The public list seems to only show members with public profiles and pictures, so I don't even show up.

ok, ok i believe you. jk. so you have to work for Microsoft i suppose to become a MVP? i wouldn't have thought u were a MS guy from your tutorials.

I could add a picture, but that might qualify as cruel and unusual punishment.
haha.




Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!