🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Question of the Day: Blt from OffscreenPlain to Managed Texture (D3DIM)

Started by
2 comments, last by NightShade 24 years, 7 months ago
a friend of mine pointed out an article dealing with something liek this on gamasutra... i don't think you are allowed to render to managed texs on cerain hardware, but in the article they described ways of getting around that
quote "
Detecting support for hardware that can render to texture surfaces is necessary if you want to know when to work around hardware that isn't capable of rendering to textures. To this end, this article introduces an approach to detecting support for rendering to texture surfaces and how to achieve similar functionality on hardware that doesn't directly support it
"
that's why NOTSUPPORTED, go to http://www.gamasutra.com/features/19991112/pallister_01.htm

AlexM

** oops, sorry, there's diff between blitting and rendering.. anyway, same idea, maybe the article will help.

[This message has been edited by AlexM (edited November 15, 1999).]

Advertisement
Thanks for the reply. The artical did help, mainly because the alternative methods they used required a blt to a texture. Plus, the examples there are pretty cool!
Anyway, my problem seemed to go away if I make both the surface and the texture in video memory. I still don't know why the system to managed texture blt fails though, or what might happen if I run this on one of those cards with seperate bitmap & texture memories. It's certainly something that the DX Docs glance over without really explaining enough.
Thanks again,
-ns
-ns-
Anyone know what may be the problem with trying to BLT an OFFSCREENPLAIN bitmap to a Texture? All my textures are managed by D3DIM, so I dont really know where in memory they are, but I was under the impression that a copy is held in system memory that gets updated if it is changed. I created the source surface in system memory. So, if we assume we have 2 system memory surfaces, I look at the Blt Caps for my card. There's no system to system blt at all. The HEL however, does sys to sys bltting according to the caps.

When I do try to blt from the surface to the texture, I get a DDERR_NOTSUPPORTED! What gives? I just checked the caps of both surfaces, and both are stored in system memory. The Directdraw documentation says that the HEL will take over things that the HAL can't do, but it doesn't seem to like doing this.

Any clues? Is there a cap I'm not checking? This should work! Plus, In searching for the answer I found a thread on this site from someone who had success bltting to a texture, so it can be done!

Thanks!
-ns

-ns-
well, there are the flags in D3DeviceDesc7 dwDevCaps. one is
D3DDEVCAPS_CANBLTSYSTONONLOCAL
don't know if you've tried this yet:
as you don't know where the auto texture manager puts the texture, if that flag is off, you might try managing that texture yourself and put in into local vid mem.

This topic is closed to new replies.

Advertisement