[ TDx_DrawSurface ]
[ next: Blt() ]
public:
virtual bool __fastcall AddAttachedSurface( TDx_DrawSurface* pAttachedSurface );
If you would like to submit additions or improvements to this page, click: admin@bcb-tools.com.
DESCRIPTION
Top
Parameters
See Also
The
TDx_DrawSurface::AddAttachedSurface
method
is
used
for
explicitly
attaching
the
specified
z-buffer,
alpha
channel
or
back
buffer.
This
method
will
increment
the
reference
count
of
the
surface,
the
attachment
can
be
broken
and
the
reference
count
decremented
using
TDx_DrawSurface::DeleteAttachedSurface().
Surfaces
attached
using
this
method
are
not
automatically
released,
it
is
the
responsibility
of
the
application
to
do
so.
If
the
method
call
fails,
the
OnError
event
will
be
triggered
with
one
of
the
following
values:
DDERR_CANNOTATTACHSURFACE
DDERR_GENERIC
DDERR_INVALIDOBJECT
DDERR_INVALIDPARAMS
DDERR_SURFACEALREADYATTACHED
DDERR_SURFACELOST
DDERR_WASSTILLDRAWING
PARAMETERS
Top
See Also
AttachedSurface
The AttachedSurface parameter references the surface that is to be attached.
The possible attachments that can be made include z-buffers, alpha channels and back buffers, subject to certain rules.
Some attachments are exclusive and will break other attachments. For example, a 3D z-buffer may be attached to one back buffer at a time, thus attaching it to another surface may cause the original attachment to be broken.
You cannot attach a surface to itself and attachments are not bidirectional.
System memory surfaces cannot be attached to video memory surfaces and the surfaces being attached must be the same size unless one is a texture map.
Flipping surfaces of the same type may not be attached, although flipping surfaces of differing types can be attached. For example, a flipping alpha surface may be attached to a flipping normal surface.
Attaching two nonflipping surfaces of the same type creates a flip chain, attaching a nonflipping surface to a flipping surface will add it to the existing flip chain.
Each call to TDx_DrawSurface::Flip() will advance one step through the flip chain in the order the surfaces were attached.
SEE ALSO
Top
Parameters