Requires: Direct2D.lg32
Controls the execution of Assert commands in the Direct2D library.
D2DebugOff = True | False
By setting D2DebugOff to True the commands that assert the correctness of the D2-objects is disabled.
Throughout the library the COM data type of parameters of the D2* commands and functions are tested. The GFA-BASIC 32 wrappers for the Direct2D COM methods return and use non-typed COM objects; they are stored in non-typed Object variables. Therefore the compiler can not test if the Object arguments have the correct type. The test for correctness is performed at runtime by the Direct2D library. Each command or function that takes an Object as a parameter includes an Assert command to test for a correct COM data type. While developing this is an important aid in helping to find possible bugs, but once the program is ready they may lead to a performance penalty. Therefore, you can disable most Assert commands by using D2DebugOff.
$Library "Direct2D"
D2DebugOff = True ' disables Assert commands
D2DebugOff may also be used to temporarily disable Assert commands until the next use of D2DebugOff = False.
{Created by Sjouke Hamstra; Last updated: 12/03/2021 by James Gaite}