VCL RAD DirectX for C++ Builder

Welcome to

www.tdxlibrary.org

Home of the
the TDx_Library...

=- RAD DirectX =-

"RAD DirectX"
for
C++ Builder

...

Welcome to tdxlibrary.org Latest News

Development Tools Demo Applications Step-By-Step Tutorials Component Reference

Register our Tools Available Downloads

Frequently Asked Questions Links to other sites Information about the tdxlibrary.org website


    TDx_3DI_Library v2.00 Component Reference

    -= Click to navigate the reference =-
    Go to the Welcome Page

    [ TDx_3DDevice::Clear() ]     [ next: ComputeSphereVisibility() ]     [ prev: CaptureStateBlock() ]

    public:

         virtual bool __fastcall Clear( dword pCount, TD3DRect* pRects, dword pFlags, dword pColor, D3DVALUE pZ, dword pStencil );





    -= Go to the TDx_3DDevice description =-    TDX_3DDEVICE::CLEAR()   [ component method ]

    • Description

        The TDx_3DDevice::Clear() method will set the viewport or sections of it to a single RGBA color and set the corresponding depth and stencil buffers to specified values.

        Setting D3DCLEAR_ZBUFFER or D3DCLEAR_STENCIL when such information is not present in the rendering surface will cause this method to fail.

        If the method call fails, the OnError event will be triggered with one of the following values:
        D3DERR_STENCILBUFFER_NOTPRESENT
        D3DERR_VIEWPORTHASNODEVICE
        D3DERR_ZBUFFER_NOTPRESENT
        DDERR_INVALIDOBJECT
        DDERR_INVALIDPARAMS

    • Parameters

        Count
        The Count parameter specifies how many elements there are in the Rects array.

        If Rects is NULL, this parameter must be 0.

        Rects
        The Rects parameter defines an array of TD3DRect components defining the screen coordinate area to be cleared.

        Set the render target dimensions to clear the whole surface or NULL to clear the entire viewport.
        Coordinates are clipped by the viewport.

        Flags
        The Flags parameter indicates which surfaces to clear.
        The described effect applies when the flag is set.

        At least one flag must be set.

          D3DCLEAR_STENCIL
          Set the stencil buffer to the value in the Stencil parameter.

          D3DCLEAR_TARGET
          Set the rendering target to the value in the Color parameter.

          D3DCLEAR_ZBUFFER
          Set the z-buffer to the value in the Z parameter.

        Color
        The Color parameter contains the 32-bit RGBA color to which the render target surface will be set.

        Z
        The Z parameter holds the value to replace the current z-buffer entries.

        Values can range from 0.0 through to 1.0

        Stencil
        The Stencil parameter holds an integer value to replace the current stencil buffer entries.

        Values can range from 0 to 2^n -1, where n is the stencil buffer bit depth.


    • See Also
    • Top





    If you would like to submit additions or improvements to this page, click: darren_john_dwyer@hotmail.com.



























Top

Welcome |  Latest News |  Tools |  Demos |  Tutorials |  Reference |  Register |  Downloads
FAQ |  Links |  Site Information

This page is Copyright © 2019 Darren John Dwyer, Australia. All Rights Reserved.
Borland C++ Builder, CBuilder, etc are Trademarks of Borland Corporation.
DirectX, DirectDraw, Windows, etc are Trademarks of Microsoft Corporation.