示例#1
0
//----------------------------------------------------------------------------
StringTree* DirectionalLight::SaveStrings ()
{
    StringTree* pkTree = new StringTree(2,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("direction =",m_kDirection));

    // children
    pkTree->SetChild(0,Light::SaveStrings());

    return pkTree;
}
示例#2
0
//----------------------------------------------------------------------------
StringTree* DitherState::SaveStrings ()
{
    StringTree* pkTree = new StringTree(2,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("enabled =",m_bEnabled));

    // children
    pkTree->SetChild(0,RenderState::SaveStrings());

    return pkTree;
}
//----------------------------------------------------------------------------
StringTree* BezierCylinder::SaveStrings ()
{
    StringTree* pkTree = new StringTree(2,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("cyln level =",m_iCylinderLevel));

    // children
    pkTree->SetChild(0,BezierPatch::SaveStrings());

    return pkTree;
}
示例#4
0
//----------------------------------------------------------------------------
StringTree* Polyline::SaveStrings ()
{
    StringTree* pkTree = new StringTree(4,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("closed =",m_bClosed));
    pkTree->SetString(2,MakeString("active quantity =",m_iActiveQuantity));
    pkTree->SetString(3,MakeString("contiguous =",m_bContiguous));

    // children
    pkTree->SetChild(0,Geometry::SaveStrings());

    return pkTree;
}
//----------------------------------------------------------------------------
StringTree* ConvexRegionManager::SaveStrings ()
{
    // TO DO.  Finish implementation.
    StringTree* pkTree = new StringTree(1,0,1,0);
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetChild(0,BspNode::SaveStrings());
    return pkTree;
}
//----------------------------------------------------------------------------
StringTree* ParticleController::SaveStrings ()
{
    // TO DO.  Finish implementation.
    StringTree* pkTree = new StringTree(1,0,1,0);
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetChild(0,Controller::SaveStrings());
    return pkTree;
}
示例#7
0
//----------------------------------------------------------------------------
StringTree* Image::SaveStrings ()
{
    StringTree* pkTree = new StringTree(4,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));

    switch ( m_eType )
    {
    case IT_RGBA4444:
        pkTree->SetString(1,MakeString("type = RGBA4444"));
        break;
    case IT_RGB888:
        pkTree->SetString(1,MakeString("type = RGB888"));
        break;
    case IT_RGBA5551:
        pkTree->SetString(1,MakeString("type = RGBA5551"));
        break;
    case IT_RGBA8888:
        pkTree->SetString(1,MakeString("type = RGBA8888"));
        break;
    default:  // IT_QUANTITY
        break;
    }

    pkTree->SetString(2,MakeString("width =",m_iWidth));
    pkTree->SetString(3,MakeString("height =",m_iHeight));

    // children
    pkTree->SetChild(0,Object::SaveStrings());

    return pkTree;
}
示例#8
0
//----------------------------------------------------------------------------
StringTree* Controller::SaveStrings ()
{
    StringTree* pkTree = new StringTree(5,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("min time =",m_fMinTime));
    pkTree->SetString(2,MakeString("max time =",m_fMaxTime));
    pkTree->SetString(3,MakeString("phase =",m_fPhase));
    pkTree->SetString(4,MakeString("frequency =",m_fFrequency));

    // children
    pkTree->SetChild(0,Object::SaveStrings());

    // Object will iterate over controllers to save strings

    return pkTree;
}
示例#9
0
//----------------------------------------------------------------------------
StringTree* BezierCylinder2::SaveStrings ()
{
    StringTree* pkTree = new StringTree(1,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));

    // children
    pkTree->SetChild(0,BezierCylinder::SaveStrings());

    return pkTree;
}
示例#10
0
//----------------------------------------------------------------------------
StringTree* Object::SaveStrings ()
{
    int iCQuantity = ( m_spkControl ? 1 : 0 );
    StringTree* pkTree = new StringTree(4,0,iCQuantity,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("this =",this));
    pkTree->SetString(2,MakeString("ID   =",m_uiID));
    pkTree->SetString(3,MakeString("refs =",m_uiReferences));

    // children
    if ( m_spkControl )
    {
        Controller* pkControl = WmlSmartPointerCast(Controller,m_spkControl);
        iCQuantity = 0;
        while ( pkControl )
        {
            iCQuantity++;
            pkControl = pkControl->GetNext();
        }

        StringTree* pkCTree = new StringTree(1,0,iCQuantity,0);
        pkTree->SetChild(0,pkCTree);
        pkCTree->SetString(0,MakeString("controllers"));
        int iSlot = 0;
        pkControl = WmlSmartPointerCast(Controller,m_spkControl);
        while ( pkControl )
        {
            pkCTree->SetChild(iSlot++,pkControl->SaveStrings());
            pkControl = pkControl->GetNext();
        }
    }

    return pkTree;
}
示例#11
0
//----------------------------------------------------------------------------
StringTree* LightNode::SaveStrings ()
{
    int iCQuantity = ( m_spkLight ? 2 : 1 );
    StringTree* pkTree = new StringTree(1,0,iCQuantity,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));

    // children
    pkTree->SetChild(0,Spatial::SaveStrings());

    if ( m_spkLight )
        pkTree->SetChild(1,m_spkLight->SaveStrings());

    return pkTree;
}
示例#12
0
//----------------------------------------------------------------------------
StringTree* MaterialState::SaveStrings ()
{
    StringTree* pkTree = new StringTree(7,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("emissive =",m_kEmissive));
    pkTree->SetString(2,MakeString("ambient =",m_kAmbient));
    pkTree->SetString(3,MakeString("diffuse =",m_kDiffuse));
    pkTree->SetString(4,MakeString("specular =",m_kSpecular));
    pkTree->SetString(5,MakeString("shininess =",m_fShininess));
    pkTree->SetString(6,MakeString("alpha =",m_fAlpha));

    // children
    pkTree->SetChild(0,RenderState::SaveStrings());

    return pkTree;
}
示例#13
0
//----------------------------------------------------------------------------
StringTree* VertexColorState::SaveStrings ()
{
    StringTree* pkTree = new StringTree(3,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));

    switch ( m_eSource )
    {
    case SM_IGNORE:
        pkTree->SetString(1,MakeString("source = IGNORE"));
        break;
    case SM_EMISSIVE:
        pkTree->SetString(1,MakeString("source = EMISSIVE"));
        break;
    case SM_DIFFUSE:
        pkTree->SetString(1,MakeString("source = DIFFUSE"));
        break;
    default:  // SM_QUANTITY
        break;
    };

    switch ( m_eLighting )
    {
    case LM_EMISSIVE:
        pkTree->SetString(2,MakeString("lighting = EMISSIVE"));
        break;
    case LM_DIFFUSE:
        pkTree->SetString(2,MakeString("lighting = DIFFUSE"));
        break;
    default:  // LM_QUANTITY
        break;
    }

    // children
    pkTree->SetChild(0,RenderState::SaveStrings());

    return pkTree;
}
示例#14
0
//----------------------------------------------------------------------------
StringTree* Texture::SaveStrings ()
{
    StringTree* pkTree = new StringTree(26,0,2,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));

    switch ( m_eCorrection )
    {
    case CM_AFFINE:
        pkTree->SetString(1,MakeString("correction = AFFINE"));
        break;
    case CM_PERSPECTIVE:
        pkTree->SetString(1,MakeString("correction = PERSPECTIVE"));
        break;
    default:  // CM_QUANTITY
        break;
    };

    switch ( m_eApply )
    {
    case AM_REPLACE:
        pkTree->SetString(2,MakeString("apply = REPLACE"));
        break;
    case AM_DECAL:
        pkTree->SetString(2,MakeString("apply = DECAL"));
        break;
    case AM_MODULATE:
        pkTree->SetString(2,MakeString("apply = MODULATE"));
        break;
    case AM_BLEND:
        pkTree->SetString(2,MakeString("apply = BLEND"));
        break;
    case AM_ADD:
        pkTree->SetString(2,MakeString("apply = ADD"));
        break;
    case AM_COMBINE:
        pkTree->SetString(2,MakeString("apply = COMBINE"));
        break;
    default:  // AM_QUANTITY
        break;
    };

    switch ( m_eCombineFuncRGB )
    {
    case ACF_REPLACE:
        pkTree->SetString(3,MakeString("CombFuncRGB = REPLACE"));
        break;
    case ACF_MODULATE:
        pkTree->SetString(3,MakeString("CombFuncRGB = MODULATE"));
        break;
    case ACF_ADD:
        pkTree->SetString(3,MakeString("CombFuncRGB = ADD"));
        break;
    case ACF_ADD_SIGNED:
        pkTree->SetString(3,MakeString("CombFuncRGB = ADD_SIGNED"));
        break;
    case ACF_SUBTRACT:
        pkTree->SetString(3,MakeString("CombFuncRGB = SUBTRACT"));
        break;
    case ACF_INTERPOLATE:
        pkTree->SetString(3,MakeString("CombFuncRGB = INTERPOLATE"));
        break;
    case ACF_DOT3_RGB:
        pkTree->SetString(3,MakeString("CombFuncRGB = DOT3_RGB"));
        break;
    case ACF_DOT3_RGBA:
        pkTree->SetString(3,MakeString("CombFuncRGB = DOT3_RGBA"));
        break;
    default:  // ACF_QUANTITY
        break;
    }

    switch ( m_eCombineFuncAlpha )
    {
    case ACF_REPLACE:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = REPLACE"));
        break;
    case ACF_MODULATE:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = MODULATE"));
        break;
    case ACF_ADD:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = ADD"));
        break;
    case ACF_ADD_SIGNED:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = ADD_SIGNED"));
        break;
    case ACF_SUBTRACT:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = SUBTRACT"));
        break;
    case ACF_INTERPOLATE:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = INTERPOLATE"));
        break;
    case ACF_DOT3_RGB:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = DOT3_RGB"));
        break;
    case ACF_DOT3_RGBA:
        pkTree->SetString(4,MakeString("CombineFuncAlpha = DOT3_RGBA"));
        break;
    default:  // ACF_QUANTITY
        break;
    }

    switch ( m_eCombineSrc0RGB )
    {
    case ACS_TEXTURE:
        pkTree->SetString(5,MakeString("CombineSrc0RGB = TEXTURE"));
        break;
    case ACS_PRIMARY_COLOR:
        pkTree->SetString(5,MakeString("CombineSrc0RGB = PRIMARY_COLOR"));
        break;
    case ACS_CONSTANT:
        pkTree->SetString(5,MakeString("CombineSrc0RGB = CONSTANT"));
        break;
    case ACS_PREVIOUS:
        pkTree->SetString(5,MakeString("CombineSrc0RGB = PREVIOUS"));
        break;
    default:  // ACS_QUANTITY
        break;
    }

    switch ( m_eCombineSrc1RGB )
    {
    case ACS_TEXTURE:
        pkTree->SetString(6,MakeString("CombineSrc1RGB = TEXTURE"));
        break;
    case ACS_PRIMARY_COLOR:
        pkTree->SetString(6,MakeString("CombineSrc1RGB = PRIMARY_COLOR"));
        break;
    case ACS_CONSTANT:
        pkTree->SetString(6,MakeString("CombineSrc1RGB = CONSTANT"));
        break;
    case ACS_PREVIOUS:
        pkTree->SetString(6,MakeString("CombineSrc1RGB = PREVIOUS"));
        break;
    default:  // ACS_QUANTITY
        break;
    }

    switch ( m_eCombineSrc2RGB )
    {
    case ACS_TEXTURE:
        pkTree->SetString(7,MakeString("CombineSrc1RGB = TEXTURE"));
        break;
    case ACS_PRIMARY_COLOR:
        pkTree->SetString(7,MakeString("CombineSrc1RGB = PRIMARY_COLOR"));
        break;
    case ACS_CONSTANT:
        pkTree->SetString(7,MakeString("CombineSrc1RGB = CONSTANT"));
        break;
    case ACS_PREVIOUS:
        pkTree->SetString(7,MakeString("CombineSrc1RGB = PREVIOUS"));
        break;
    default:  // ACS_QUANTITY
        break;
    }

    switch ( m_eCombineSrc0Alpha )
    {
    case ACS_TEXTURE:
        pkTree->SetString(8,MakeString("CombineSrc0Alpha = TEXTURE"));
        break;
    case ACS_PRIMARY_COLOR:
        pkTree->SetString(8,MakeString("CombineSrc0Alpha = PRIMARY_COLOR"));
        break;
    case ACS_CONSTANT:
        pkTree->SetString(8,MakeString("CombineSrc0Alpha = CONSTANT"));
        break;
    case ACS_PREVIOUS:
        pkTree->SetString(8,MakeString("CombineSrc0Alpha = PREVIOUS"));
        break;
    default:  // ACS_QUANTITY
        break;
    }

    switch ( m_eCombineSrc1Alpha )
    {
    case ACS_TEXTURE:
        pkTree->SetString(9,MakeString("CombineSrc1Alpha = TEXTURE"));
        break;
    case ACS_PRIMARY_COLOR:
        pkTree->SetString(9,MakeString("CombineSrc1Alpha = PRIMARY_COLOR"));
        break;
    case ACS_CONSTANT:
        pkTree->SetString(9,MakeString("CombineSrc1Alpha = CONSTANT"));
        break;
    case ACS_PREVIOUS:
        pkTree->SetString(9,MakeString("CombineSrc1Alpha = PREVIOUS"));
        break;
    default:  // ACS_QUANTITY
        break;
    }

    switch ( m_eCombineSrc2Alpha )
    {
    case ACS_TEXTURE:
        pkTree->SetString(10,MakeString("CombineSrc2Alpha = TEXTURE"));
        break;
    case ACS_PRIMARY_COLOR:
        pkTree->SetString(10,MakeString("CombineSrc2Alpha = PRIMARY_COLOR"));
        break;
    case ACS_CONSTANT:
        pkTree->SetString(10,MakeString("CombineSrc2Alpha = CONSTANT"));
        break;
    case ACS_PREVIOUS:
        pkTree->SetString(10,MakeString("CombineSrc2Alpha = PREVIOUS"));
        break;
    default:  // ACS_QUANTITY
        break;
    }

    switch ( m_eCombineOp0RGB )
    {
    case ACO_SRC_COLOR:
        pkTree->SetString(11,MakeString("CombineOp0RGB = SRC_COLOR"));
        break;
    case ACO_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(11,
            MakeString("CombineOp0RGB = ONE_MINUS_SRC_COLOR"));
        break;
    case ACO_SRC_ALPHA:
        pkTree->SetString(11,MakeString("CombineOp0RGB = SRC_ALPHA"));
        break;
    case ACO_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(11,
            MakeString("CombineOp0RGB = ONE_MINUS_SRC_ALPHA"));
        break;
    default:  // ACO_QUANTITY
        break;
    }

    switch ( m_eCombineOp1RGB )
    {
    case ACO_SRC_COLOR:
        pkTree->SetString(12,MakeString("CombineOp1RGB = SRC_COLOR"));
        break;
    case ACO_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(12,
            MakeString("CombineOp1RGB = ONE_MINUS_SRC_COLOR"));
        break;
    case ACO_SRC_ALPHA:
        pkTree->SetString(12,MakeString("CombineOp1RGB = SRC_ALPHA"));
        break;
    case ACO_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(12,
            MakeString("CombineOp1RGB = ONE_MINUS_SRC_ALPHA"));
        break;
    default:  // ACO_QUANTITY
        break;
    }

    switch ( m_eCombineOp2RGB )
    {
    case ACO_SRC_COLOR:
        pkTree->SetString(13,MakeString("CombineOp2RGB = SRC_COLOR"));
        break;
    case ACO_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(13,
            MakeString("CombineOp2RGB = ONE_MINUS_SRC_COLOR"));
        break;
    case ACO_SRC_ALPHA:
        pkTree->SetString(13,MakeString("CombineOp2RGB = SRC_ALPHA"));
        break;
    case ACO_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(13,
            MakeString("CombineOp2RGB = ONE_MINUS_SRC_ALPHA"));
        break;
    default:  // ACO_QUANTITY
        break;
    }

    switch ( m_eCombineOp0Alpha )
    {
    case ACO_SRC_COLOR:
        pkTree->SetString(14,MakeString("CombineOp0Alpha = SRC_COLOR"));
        break;
    case ACO_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(14,
            MakeString("CombineOp0Alpha = ONE_MINUS_SRC_COLOR"));
        break;
    case ACO_SRC_ALPHA:
        pkTree->SetString(14,MakeString("CombineOp0Alpha = SRC_ALPHA"));
        break;
    case ACO_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(14,
            MakeString("CombineOp0Alpha = ONE_MINUS_SRC_ALPHA"));
        break;
    default:  // ACO_QUANTITY
        break;
    }

    switch ( m_eCombineOp1Alpha )
    {
    case ACO_SRC_COLOR:
        pkTree->SetString(15,MakeString("CombineOp1Alpha = SRC_COLOR"));
        break;
    case ACO_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(15,
            MakeString("CombineOp1Alpha = ONE_MINUS_SRC_COLOR"));
        break;
    case ACO_SRC_ALPHA:
        pkTree->SetString(15,MakeString("CombineOp1Alpha = SRC_ALPHA"));
        break;
    case ACO_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(15,
            MakeString("CombineOp1Alpha = ONE_MINUS_SRC_ALPHA"));
        break;
    default:  // ACO_QUANTITY
        break;
    }

    switch ( m_eCombineOp2Alpha )
    {
    case ACO_SRC_COLOR:
        pkTree->SetString(16,MakeString("CombineOp2Alpha = SRC_COLOR"));
        break;
    case ACO_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(16,
            MakeString("CombineOp2Alpha = ONE_MINUS_SRC_COLOR"));
        break;
    case ACO_SRC_ALPHA:
        pkTree->SetString(16,MakeString("CombineOp2Alpha = SRC_ALPHA"));
        break;
    case ACO_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(16,
            MakeString("CombineOp2Alpha = ONE_MINUS_SRC_ALPHA"));
        break;
    default:  // ACO_QUANTITY
        break;
    }

    switch ( m_eCombineScaleRGB )
    {
    case ACSC_ONE:
        pkTree->SetString(17,MakeString("CombineScaleRGB = ONE"));
        break;
    case ACSC_TWO:
        pkTree->SetString(17,MakeString("CombineScaleRGB = TWO"));
        break;
    case ACSC_FOUR:
        pkTree->SetString(17,MakeString("CombineScaleRGB = FOUR"));
        break;
    default:  // ACSC_QUANTITY
        break;
    }

    switch ( m_eCombineScaleAlpha )
    {
    case ACSC_ONE:
        pkTree->SetString(18,MakeString("CombineScaleAlpha = ONE"));
        break;
    case ACSC_TWO:
        pkTree->SetString(18,MakeString("CombineScaleAlpha = TWO"));
        break;
    case ACSC_FOUR:
        pkTree->SetString(18,MakeString("CombineScaleAlpha = FOUR"));
        break;
    default:  // ACSC_QUANTITY
        break;
    }

    switch ( m_eWrap )
    {
    case WM_CLAMP_S_CLAMP_T:
        pkTree->SetString(19,MakeString("uv mode = CLAMP_S_CLAMP_T"));
        break;
    case WM_CLAMP_S_WRAP_T:
        pkTree->SetString(19,MakeString("uv mode = CLAMP_S_WRAP_T"));
        break;
    case WM_WRAP_S_CLAMP_T:
        pkTree->SetString(19,MakeString("uv mode = WRAP_S_CLAMP_T"));
        break;
    case WM_WRAP_S_WRAP_T:
        pkTree->SetString(19,MakeString("uv mode = WRAP_S_WRAP_T"));
        break;
    case WM_CLAMP_BORDER_S_CLAMP_BORDER_T:
        pkTree->SetString(19,
            MakeString("uv mode = CLAMP_BORDER_S_CLAMP_BORDER_T"));
        break;
    default:  // WM_QUANTITY
        break;
    };

    switch ( m_eFilter )
    {
    case FM_NEAREST:
        pkTree->SetString(20,MakeString("filter = NEAREST"));
        break;
    case FM_LINEAR:
        pkTree->SetString(20,MakeString("filter = LINEAR"));
        break;
    default:  // FM_QUANTITY
        break;
    };

    switch ( m_eMipmap )
    {
    case MM_NONE:
        pkTree->SetString(21,MakeString("mipmap = NONE"));
        break;
    case MM_NEAREST:
        pkTree->SetString(21,MakeString("mipmap = NEAREST"));
        break;
    case MM_LINEAR:
        pkTree->SetString(21,MakeString("mipmap = LINEAR"));
        break;
    case MM_NEAREST_NEAREST:
        pkTree->SetString(21,MakeString("mipmap = NEAREST_NEAREST"));
        break;
    case MM_NEAREST_LINEAR:
        pkTree->SetString(21,MakeString("mipmap = NEAREST_LINEAR"));
        break;
    case MM_LINEAR_NEAREST:
        pkTree->SetString(21,MakeString("mipmap = LINEAR_NEAREST"));
        break;
    case MM_LINEAR_LINEAR:
        pkTree->SetString(21,MakeString("mipmap = LINEAR_LINEAR"));
        break;
    default:  // MM_QUANTITY
        break;
    }

    switch ( m_eEnvmap )
    {
    case EM_NONE:
        pkTree->SetString(22,MakeString("envmap = NONE"));
        break;
    case EM_IGNORE:
        pkTree->SetString(22,MakeString("envmap = IGNORE"));
        break;
    case EM_SPHERE:
        pkTree->SetString(22,MakeString("envmap = SPHERE"));
        break;
    default:  // EM_QUANTITY
        break;
    }

    pkTree->SetString(23,MakeString("blend color =",m_kBlendColor));
    pkTree->SetString(24,MakeString("priority =",m_fPriority));
    pkTree->SetString(25,MakeString("border color =",m_kBorderColor));

    // children
    pkTree->SetChild(0,Object::SaveStrings());
    pkTree->SetChild(1,m_spkImage->SaveStrings());

    return pkTree;
}
示例#15
0
//----------------------------------------------------------------------------
StringTree* AlphaState::SaveStrings ()
{
    StringTree* pkTree = new StringTree(6,0,1,0);

    // strings
    pkTree->SetString(0,MakeString(&ms_kRTTI,GetName()));
    pkTree->SetString(1,MakeString("blend =",m_bBlendEnabled));

    switch ( m_eSrcBlend )
    {
    case SBF_ZERO:
        pkTree->SetString(2,MakeString("src blend = ZERO"));
        break;
    case SBF_ONE:
        pkTree->SetString(2,MakeString("src blend = ONE"));
        break;
    case SBF_DST_COLOR:
        pkTree->SetString(2,MakeString("src blend = DST_COLOR"));
        break;
    case SBF_ONE_MINUS_DST_COLOR:
        pkTree->SetString(2,MakeString("src blend = ONE_MINUS_DST_COLOR"));
        break;
    case SBF_SRC_ALPHA:
        pkTree->SetString(2,MakeString("src blend = SRC_ALPHA"));
        break;
    case SBF_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(2,MakeString("src blend = ONE_MINUS_SRC_ALPHA"));
        break;
    case SBF_DST_ALPHA:
        pkTree->SetString(2,MakeString("src blend = DST_ALPHA"));
        break;
    case SBF_ONE_MINUS_DST_ALPHA:
        pkTree->SetString(2,MakeString("src blend = ONE_MINUS_DST_ALPHA"));
        break;
    case SBF_SRC_ALPHA_SATURATE:
        pkTree->SetString(2,MakeString("src blend = SRC_ALPHA_SATURATE"));
        break;
    default:  // SBF_QUANTITY
        break;
    }

    switch ( m_eDstBlend )
    {
    case DBF_ZERO:
        pkTree->SetString(3,MakeString("dst blend = ZERO"));
        break;
    case DBF_ONE:
        pkTree->SetString(3,MakeString("dst blend = ONE"));
        break;
    case DBF_SRC_COLOR:
        pkTree->SetString(3,MakeString("dst blend = DST_COLOR"));
        break;
    case DBF_ONE_MINUS_SRC_COLOR:
        pkTree->SetString(3,MakeString("dst blend = ONE_MINUS_DST_COLOR"));
        break;
    case DBF_SRC_ALPHA:
        pkTree->SetString(3,MakeString("dst blend = SRC_ALPHA"));
        break;
    case DBF_ONE_MINUS_SRC_ALPHA:
        pkTree->SetString(3,MakeString("dst blend = ONE_MINUS_SRC_ALPHA"));
        break;
    case DBF_DST_ALPHA:
        pkTree->SetString(3,MakeString("dst blend = DST_ALPHA"));
        break;
    case DBF_ONE_MINUS_DST_ALPHA:
        pkTree->SetString(3,MakeString("dst blend = ONE_MINUS_DST_ALPHA"));
        break;
    default:  // DBF_QUANTITY
        break;
    }

    pkTree->SetString(1,MakeString("test =",m_bTestEnabled));

    switch ( m_eTest )
    {
    case TF_NEVER:
        pkTree->SetString(4,MakeString("test func = NEVER"));
        break;
    case TF_LESS:
        pkTree->SetString(4,MakeString("test func = LESS"));
        break;
    case TF_EQUAL:
        pkTree->SetString(4,MakeString("test func = EQUAL"));
        break;
    case TF_LEQUAL:
        pkTree->SetString(4,MakeString("test func = LEQUAL"));
        break;
    case TF_GREATER:
        pkTree->SetString(4,MakeString("test func = GREATER"));
        break;
    case TF_NOTEQUAL:
        pkTree->SetString(4,MakeString("test func = NOTEQUAL"));
        break;
    case TF_GEQUAL:
        pkTree->SetString(4,MakeString("test func = GEQUAL"));
        break;
    case TF_ALWAYS:
        pkTree->SetString(4,MakeString("test func = ALWAYS"));
        break;
    default:  // TF_QUANTITY
        break;
    }

    pkTree->SetString(5,MakeString("test ref =",m_fReference));

    // children
    pkTree->SetChild(0,RenderState::SaveStrings());

    return pkTree;
}