Sign in to follow this  
vladic2000x

DX9: How to determine stretching caps

Recommended Posts

Hello there. I have a Mobile Intel 945 Chipset. If I use StretchRect() from a RenderTarget texture to the Back Buffer and pass NULL to pDestRect then everyting is OK, but if I try to pass a custom RECT then the method FAILS. My question is how to determine if the device has stretching capabilities or not.

Share this post


Link to post
Share on other sites
From the documentation:
Quote:
Stretching is not supported if the destination surface is an off-screen plain surface but the source is not.
And as far as I know, the backbuffer is an offscreen plain surface.

Why don't you just render a textured quad? T|hat's probably going to be faster than using StretchRect anyway.

Share this post


Link to post
Share on other sites
Steve, I'm sorry, I made a mistake when described the issue. Actually I'm using StetchRect to copy from BackBuffer to the render target surface. Any ideas?

Share this post


Link to post
Share on other sites
OK :) Solved the issue. I was specifying the wrong destination rectangle. For those who might be struggling with some driver issues for that method, I would recommend reading this post:

http://www.ms-news.net/f3591/about-stretchrect-2200764.html

Best,

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