示例#1
0
	bool DescribeLayerRequest::Create(rude::CGI& cgi)
	{
		SetVersion(cgi["version"]);
		SetMapName(cgi["mapName"]);
		SetLayerName(cgi["layerName"]);
		return true;
	}
//--------------------------------------------------------------------------
/// Constructor
//--------------------------------------------------------------------------
FrameDebugger::FrameDebugger()
{
    m_dwBreakPoint = 0;
    m_bAutoRenderTarget = true;
    m_ulDrawCallCounter = 0;

    m_bForceClear = true;
    m_ClearColor[0] = 0.0f; // red
    m_ClearColor[1] = 0.4f; // green
    m_ClearColor[2] = 0.8f; // blue
    m_ClearColor[3] = 1.0f; // alpha

    m_iWireframeColor = SG_GET_INT(OptionWireFrameColor);

    m_bWireframeOverlay = SG_GET_BOOL(OptionWireFrameOverlay);

    // 1 = pink/purple, 2 = green, 3 = blue
    if (2 == m_iWireframeColor)
    {
        // green
        m_fWireframeOverlayColor[0] = 0.0f;
        m_fWireframeOverlayColor[1] = 1.0f;
        m_fWireframeOverlayColor[2] = 0.0f;
    }
    else if (3 == m_iWireframeColor)
    {
        // blue
        m_fWireframeOverlayColor[0] = 0.0f;
        m_fWireframeOverlayColor[1] = 0.0f;
        m_fWireframeOverlayColor[2] = 1.0f;
    }
    else
    {
        // 1 or other
        // pink / purple
        m_fWireframeOverlayColor[0] = 1.0f;
        m_fWireframeOverlayColor[1] = 0.0f;
        m_fWireframeOverlayColor[2] = 1.0f;
    }

    m_fWireframeOverlayColor[3] = 1.0f;

    AddCommand(CONTENT_XML, "breakpoint",          "BreakPoint",            CMD_BREAKPOINT,           NO_DISPLAY, INCLUDE, m_dwBreakPoint);
    AddCommand(CONTENT_XML, "autorendertarget",    "Auto Render Target",    CMD_AUTORENDERTARGET,     NO_DISPLAY, INCLUDE, m_bAutoRenderTarget);
    AddCommand(CONTENT_XML, "forceclear",          "Force Clear",           CMD_FORCECLEAR,           NO_DISPLAY, INCLUDE, m_bForceClear);
    AddCommand(CONTENT_XML, "wireframeoverlay",    "WireFrame Overlay",     CMD_WIREFRAMEOVERLAY,     NO_DISPLAY, INCLUDE, m_bWireframeOverlay);
    AddCommand(CONTENT_XML, "stats",               "Stats",                 CMD_STATISTICS,           NO_DISPLAY, INCLUDE, m_Stats);
    AddCommand(CONTENT_XML, "currentdrawcall",     "Current Draw Call",     CMD_CURRENTDRAWCALL,      NO_DISPLAY, INCLUDE, m_CurrentDrawCall);
    AddCommand(CONTENT_XML, "DrawCallList",        "DrawCallList",          "DrawCallList.xml",       NO_DISPLAY, INCLUDE, m_drawCallList);
    AddCommand(CONTENT_XML, "ConfigHUD",           "Config HUD",            CMD_CONFIGHUD,            NO_DISPLAY, INCLUDE, m_bConfigHUD);

    SetLayerName("FrameDebugger");
}