lldebugview.cpp

Go to the documentation of this file.
00001 
00032 #include "llviewerprecompiledheaders.h"
00033 
00034 #include "lldebugview.h"
00035 
00036 // library includes
00037 #include "llframestatview.h"
00038 #include "llfasttimerview.h"
00039 #include "llmemoryview.h"
00040 #include "llconsole.h"
00041 #include "lltextureview.h"
00042 #include "llresmgr.h"
00043 #include "imageids.h"
00044 #include "llvelocitybar.h"
00045 #include "llviewerwindow.h"
00046 #include "llfloaterstats.h"
00047 
00048 //
00049 // Globals
00050 //
00051 
00052 LLDebugView* gDebugView = NULL;
00053 
00054 //
00055 // Methods
00056 //
00057 
00058 LLDebugView::LLDebugView(const std::string& name, const LLRect &rect)
00059 :       LLView(name, rect, FALSE)
00060 {
00061         LLRect r;
00062 
00063         r.set(0, rect.getHeight() - 100, rect.getWidth()/2, 100);
00064         mDebugConsolep = new LLConsole("debug console", 20, r, -1, 0.f );
00065         mDebugConsolep->setFollowsBottom();
00066         mDebugConsolep->setFollowsLeft();
00067         mDebugConsolep->setVisible( FALSE );
00068         addChild(mDebugConsolep);
00069 
00070         r.set(150 - 25, rect.getHeight() - 50, rect.getWidth()/2 - 25, rect.getHeight() - 450);
00071         mFrameStatView = new LLFrameStatView("frame stat", r);
00072         mFrameStatView->setFollowsTop();
00073         mFrameStatView->setFollowsLeft();
00074         mFrameStatView->setVisible(FALSE);                      // start invisible
00075         addChild(mFrameStatView);
00076 
00077         r.set(25, rect.getHeight() - 50, (S32) (gViewerWindow->getVirtualWindowRect().getWidth() * 0.75f), 
00078                                                                          (S32) (gViewerWindow->getVirtualWindowRect().getHeight() * 0.75f));
00079         mFastTimerView = new LLFastTimerView("fast timers", r);
00080         mFastTimerView->setFollowsTop();
00081         mFastTimerView->setFollowsLeft();
00082         mFastTimerView->setVisible(FALSE);                      // start invisible
00083         addChild(mFastTimerView);
00084 
00085         r.set(25, rect.getHeight() - 50, rect.getWidth()/2, rect.getHeight() - 450);
00086         mMemoryView = new LLMemoryView("memory", r);
00087         mMemoryView->setFollowsTop();
00088         mMemoryView->setFollowsLeft();
00089         mMemoryView->setVisible(FALSE);                 // start invisible
00090         addChild(mMemoryView);
00091 
00092         r.set(150, rect.getHeight() - 50, 820, 100);
00093         gTextureView = new LLTextureView("gTextureView", r);
00094         gTextureView->setRect(r);
00095         gTextureView->setFollowsBottom();
00096         gTextureView->setFollowsLeft();
00097         addChild(gTextureView);
00098         //gTextureView->reshape(r.getWidth(), r.getHeight(), TRUE);
00099 
00100         //
00101         // Debug statistics
00102         //
00103         r.set(rect.getWidth() - 250,
00104                   rect.getHeight() - 50,
00105                   rect.getWidth(),
00106                   rect.getHeight() - 450);
00107         mFloaterStatsp = new LLFloaterStats(r);
00108 
00109         mFloaterStatsp->setFollowsTop();
00110         mFloaterStatsp->setFollowsRight();
00111         // since this is a floater, it belongs to LLFloaterView
00112         //addChild(mFloaterStatsp);
00113 
00114         const S32 VELOCITY_LEFT = 10; // 370;
00115         const S32 VELOCITY_WIDTH = 500;
00116         const S32 VELOCITY_TOP = 140;
00117         const S32 VELOCITY_HEIGHT = 45;
00118         r.setLeftTopAndSize( VELOCITY_LEFT, VELOCITY_TOP, VELOCITY_WIDTH, VELOCITY_HEIGHT );
00119         gVelocityBar = new LLVelocityBar("Velocity Bar", r);
00120         gVelocityBar->setFollowsBottom();
00121         gVelocityBar->setFollowsLeft();
00122         addChild(gVelocityBar);
00123 }
00124 
00125 
00126 LLDebugView::~LLDebugView()
00127 {
00128         // These have already been deleted.  Fix the globals appropriately.
00129         gDebugView = NULL;
00130         gTextureView = NULL;
00131 }
00132 

Generated on Fri May 16 08:33:17 2008 for SecondLife by  doxygen 1.5.5