Quote:> To resize my surface in windowed mode i think i should call Reset, is this
> correct. It seems pretty expensive to call so is there anything i can do
> speed it up.
Yes, the only way to resize the implicit swap chain is to reset the device.
(Or recreate the device.)
There are a couple of ways to get faster resizing. One is to
CreateAdditionalSwapChain. On resize you release and recrete the additional
swap chain -- no reset needed. That will be considerably faster especially
if you have a lot of default pool resources to kill and recreate.
Even faster, use a swap chain larger than the window. When the window
resizes, you just adjust the viewport to render to only part of the back
buffer and correspondingly you set the source rectangle when presenting.
One disadvantage of this is that it forces you to use D3DSWAPEFFECT_COPY.
And of course it wastes memory.
Quote:> What happens if DirectX runs out of video memory, will it start using
> memory where it can?
In some contexts it's up to the driver whether it can/will do this.
Quote:> What happens if the user changes the screen mode? Do i need to reset my
> device to the new screen mode? Should i capture mode changes and reset the
> dx device?
That will cause the device to be lost and you'll have to reset, yes. But
you're handling lost device anyway, right? :-) If not, do so. There are
many ways the device can become lost.
Quote:> Should i avoid locking a texture imediatly after using it for drawing? I
> guesing any attemp made to lock/modify the texture will stall untill the
> renderer has finished with it?
Quote:> If i have multiple windows do i create one Direc3D8 interface for my whole
> app or one for each window?
No more than one device per adapter per app. You can create more but it's
strongly discouraged. The simplest approach is to create an additional swap
chain for each window. It's also possible to have the windows share a
single swap chain, which is a lot like using the oversized swap chain for