Sign in to follow this  
programmer_tom

CopyRects()

Recommended Posts

programmer_tom    214
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
programmer_tom    214
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
S1CA    1418
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
programmer_tom    214
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
DrunkenHyena    805
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
Muhammad Haggag    1358
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
DrunkenHyena    805
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
programmer_tom    214
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
Muhammad Haggag    1358
Quote:
Original post by programmer_tom
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.

1. Please use the quote tags when quoting people. For info about formatting in general, check GDNet Forums FAQ

2. MVPs don't work for microsoft. The MVP award means his contributions to online communities covering Microsoft technologies are valued - no more, no less. Also, how exactly would his tutorials indicate he's a "Microsoft guy"?

Share this post


Link to post
Share on other sites
programmer_tom    214
Quote:

1. Please use the quote tags when quoting people. For info about formatting in general, check GDNet Forums FAQ



i shall surely format properly for you in the future...it's such a big deal.

Quote:

Also, how exactly would his tutorials indicate he's a "Microsoft guy"?


well, if you've ever read the skinned mesh tutorial, you'd know what i'm talking about. no documentation/incorrect documentation, unused, randomly named variables etc.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this