Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain/src/lib/graphics/graphics_engine.cc @ 8697

Last change on this file since 8697 was 8697, checked in by patrick, 18 years ago

merged the terrain with the new trunk (MARK TERRAIN)

File size: 17.9 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
17
18#include "graphics_engine.h"
19#include "util/loading/resource_manager.h"
20#include "state.h"
21
22#include "world_entity.h"
23
24#include "render_2d.h"
25#include "text_engine.h"
26#include "light.h"
27#include "shader.h"
28#include "debug.h"
29
30#include "util/preferences.h"
31#include "substring.h"
32#include "text.h"
33
34#include "globals.h"
35#include "texture.h"
36
37#include "effects/graphics_effect.h"
38#include "effects/fog_effect.h"
39#include "effects/lense_flare.h"
40
41#include "shell_command.h"
42
43
44#include "parser/tinyxml/tinyxml.h"
45#include "util/loading/load_param.h"
46#include "util/loading/factory.h"
47#include "class_list.h"
48
49#ifdef __WIN32__
50 #include "static_model.h"
51#endif
52using namespace std;
53
54SHELL_COMMAND(wireframe, GraphicsEngine, wireframe);
55
56
57/**
58 * @brief standard constructor
59 */
60GraphicsEngine::GraphicsEngine ()
61{
62  this->setClassID(CL_GRAPHICS_ENGINE, "GraphicsEngine");
63  this->setName("GraphicsEngine");
64
65  this->isInit = false;
66
67  this->bDisplayFPS = false;
68  this->bAntialiasing = false;
69  this->minFPS = 9999;
70  this->maxFPS = 0;
71
72  this->geTextCFPS = NULL;
73  this->geTextMaxFPS = NULL;
74  this->geTextMinFPS = NULL;
75
76  this->fullscreenFlag = 0;
77  this->videoFlags = 0;
78  this->screen = NULL;
79
80  // initialize the Modules
81  TextEngine::getInstance();
82  this->graphicsEffects = NULL;
83
84}
85
86/**
87 * @brief The Pointer to this GraphicsEngine
88 */
89GraphicsEngine* GraphicsEngine::singletonRef = NULL;
90
91/**
92 * @brief destructs the graphicsEngine.
93*/
94GraphicsEngine::~GraphicsEngine ()
95{
96  // delete what has to be deleted here
97  this->displayFPS( false );
98
99  //TextEngine
100  delete TextEngine::getInstance();
101  // render 2D
102  delete Render2D::getInstance();
103
104  SDL_QuitSubSystem(SDL_INIT_VIDEO);
105  //   if (this->screen != NULL)
106  //     SDL_FreeSurface(this->screen);
107
108  GraphicsEngine::singletonRef = NULL;
109}
110
111
112/**
113 * @brief loads the GraphicsEngine Specific Parameters.
114 * @param root: the XML-Element to load the Data From
115 */
116void GraphicsEngine::loadParams(const TiXmlElement* root)
117{
118  LoadParamXML(root, "GraphicsEffect", this, GraphicsEngine, loadGraphicsEffects)
119  .describe("loads a graphics effect");
120}
121
122
123
124
125/**
126 * @param root The XML-element to load GraphicsEffects from
127 */
128void GraphicsEngine::loadGraphicsEffects(const TiXmlElement* root)
129{
130  LOAD_PARAM_START_CYCLE(root, element);
131  {
132    PRINTF(4)("element is: %s\n", element->Value());
133    Factory::fabricate(element);
134  }
135  LOAD_PARAM_END_CYCLE(element);
136}
137
138
139
140/**
141 * @brief initializes the GraphicsEngine with default settings.
142 */
143int GraphicsEngine::init()
144{
145  if (this->isInit)
146    return -1;
147  this->initVideo(640, 480, 16);
148  return 1;
149}
150
151/**
152 * @brief loads the GraphicsEngine's settings from a given ini-file and section
153 * @returns nothing usefull
154 */
155int GraphicsEngine::initFromPreferences()
156{
157  // looking if we are in fullscreen-mode
158  MultiType fullscreen = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_FULLSCREEN, "0");
159
160  if (fullscreen.getBool())
161    this->fullscreenFlag = SDL_FULLSCREEN;
162
163  // looking if we are in fullscreen-mode
164  MultiType textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "1");
165  Texture::setTextureEnableState(textures.getBool());
166
167  // searching for a usefull resolution
168  SubString resolution(Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_RESOLUTION, "640x480").c_str(), 'x'); ///FIXME
169  //resolution.debug();
170  MultiType x = resolution.getString(0), y = resolution.getString(1);
171  return this->initVideo(x.getInt(), y.getInt(), 16);
172
173  //   GraphicsEffect* fe = new FogEffect(NULL);
174  //   this->loadGraphicsEffect(fe);
175  //   fe->activate();
176  //   PRINTF(0)("--------------------------------------------------------------\n");
177
178  //LenseFlare* ge = new LenseFlare();
179  //this->loadGraphicsEffect(ge);
180
181  //ge->addFlare("pictures/lense_flare/sun.png"); //sun
182  //ge->addFlare("pictures/lense_flare/lens2.png"); //first halo
183  //ge->addFlare("pictures/lense_flare/lens1.png"); //small birst
184  //ge->addFlare("pictures/lense_flare/lens3.png"); //second halo
185  //ge->addFlare("pictures/lense_flare/lens4.png");
186  //ge->addFlare("pictures/lense_flare/lens1.png");
187  //ge->addFlare("pictures/lense_flare/lens3.png");
188
189  //ge->activate();
190}
191
192
193
194/**
195 * @brief initializes the Video for openGL.
196 *
197 * This has to be done only once when starting orxonox.
198 */
199int GraphicsEngine::initVideo(unsigned int resX, unsigned int resY, unsigned int bbp)
200{
201  if (this->isInit)
202    return -1;
203  //   initialize SDL_VIDEO
204  if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
205  {
206    PRINTF(1)("could not initialize SDL Video\n");
207    return -1;
208  }
209  // initialize SDL_GL-settings
210  this->setGLattribs();
211
212  // setting the Video Flags.
213  this->videoFlags = SDL_OPENGL | SDL_HWPALETTE | SDL_RESIZABLE ;
214
215  /* query SDL for information about our video hardware */
216  const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo ();
217  if( videoInfo == NULL)
218  {
219    PRINTF(1)("Failed getting Video Info :%s\n", SDL_GetError());
220    SDL_Quit ();
221  }
222  if( videoInfo->hw_available)
223    this->videoFlags |= SDL_HWSURFACE;
224  else
225    this->videoFlags |= SDL_SWSURFACE;
226  /*
227  if(VideoInfo -> blit_hw)
228    VideoFlags |= SDL_HWACCEL;
229  */
230  // setting up the Resolution
231  this->setResolution(resX, resY, bbp);
232
233  // GRABBING ALL GL-extensions
234  this->grabHardwareSettings();
235
236  // Enable default GL stuff
237  glEnable(GL_DEPTH_TEST);
238  glEnable(GL_CULL_FACE);
239  glCullFace(GL_FRONT);
240  Render2D::getInstance();
241
242  this->isInit = true;
243  return 1;
244}
245
246/**
247 * @brief sets the Window Captions and the Name of the icon.
248 * @param windowName The name of the Window
249 * @param icon The name of the Icon on the Disc
250 */
251void GraphicsEngine::setWindowName(const std::string& windowName, const std::string& icon)
252{
253  SDL_Surface* iconSurf = SDL_LoadBMP(icon.c_str());
254  if (iconSurf != NULL)
255  {
256    Uint32 colorkey = SDL_MapRGB(iconSurf->format, 0, 0, 0);
257    SDL_SetColorKey(iconSurf, SDL_SRCCOLORKEY, colorkey);
258    SDL_WM_SetIcon(iconSurf, NULL);
259    SDL_FreeSurface(iconSurf);
260  }
261
262  SDL_WM_SetCaption (windowName.c_str(), icon.c_str());
263}
264
265
266/**
267 * @brief Sets the GL-attributes
268 */
269void GraphicsEngine::setGLattribs()
270{
271  // Set video mode
272  // TO DO: parse arguments for settings
273  //SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
274  //SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
275  //SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
276  //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
277
278
279  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
280  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);
281  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0);
282  SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 0);
283  SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 0);
284  SDL_GL_SetAttribute( SDL_GL_ACCUM_BLUE_SIZE, 0);
285  SDL_GL_SetAttribute( SDL_GL_ACCUM_ALPHA_SIZE, 0);
286
287  SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);      //Use at least 5 bits of Red
288  SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);    //Use at least 5 bits of Green
289  SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);     //Use at least 5 bits of Blue
290  SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);   //Use at least 16 bits for the depth buffer
291  SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);  //Enable double buffering
292
293  // enable antialiasing?
294  if( this->bAntialiasing)
295  {
296    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,4);
297    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
298  }
299
300  glEnable(GL_CULL_FACE);
301  glCullFace(GL_FRONT);
302}
303
304/**
305 * @brief grabs the Hardware Specifics
306 *
307 * checks for all the different HW-types
308 */
309void GraphicsEngine::grabHardwareSettings()
310{
311  const char* renderer = (const char*) glGetString(GL_RENDERER);
312  const char* vendor   = (const char*) glGetString(GL_VENDOR);
313  const char* version  = (const char*) glGetString(GL_VERSION);
314  const char* extensions = (const char*) glGetString(GL_EXTENSIONS);
315
316  //  printf("%s %s %s\n %s", renderer, vendor, version, extensions);
317
318  if (renderer != NULL)
319  {
320    this->hwRenderer == renderer;
321  }
322  if (vendor != NULL)
323  {
324    this->hwVendor == vendor;
325  }
326  if (version != NULL)
327  {
328    this->hwVersion == version;
329  }
330
331  if (extensions != NULL)
332    this->hwExtensions.split(extensions, " \n\t,");
333
334  PRINT(4)("Running on : vendor: %s,  renderer: %s,  version:%s\n", vendor, renderer, version);
335  PRINT(4)("Extensions:\n");
336  for (unsigned int i = 0; i < this->hwExtensions.size(); i++)
337    PRINT(4)("%d: %s\n", i, this->hwExtensions[i].c_str());
338
339
340  // inizializing GLEW
341  GLenum err = glewInit();
342  if (GLEW_OK != err)
343  {
344    /* Problem: glewInit failed, something is seriously wrong. */
345    PRINTF(1)("%s\n", glewGetErrorString(err));
346  }
347  PRINTF(4)("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
348}
349
350
351/**
352 * @brief sets the Resolution of the Screen to display the Graphics to.
353 * @param width The width of the window
354 * @param height The height of the window
355 * @param bpp bits per pixel
356 */
357int GraphicsEngine::setResolution(int width, int height, int bpp)
358{
359  this->resolutionX = width;
360  this->resolutionY = height;
361  this->bitsPerPixel = bpp;
362  State::setResolution( width, height);
363
364  if (this->screen != NULL)
365    SDL_FreeSurface(screen);
366  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | this->fullscreenFlag)) == NULL)
367  {
368    PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
369    //    SDL_Quit();
370    //    return -1;
371    return -1;
372  }
373  glViewport(0, 0, width, height);                     // Reset The Current Viewport
374
375#ifdef __WIN32__
376  // REBUILDING TEXTURES (ON WINDOWS CONTEXT SWITCH)
377  const std::list<BaseObject*>* texList = ClassList::getList(CL_TEXTURE);
378  if (texList != NULL)
379  {
380    std::list<BaseObject*>::const_iterator reTex;
381    for (reTex = texList->begin(); reTex != texList->end(); reTex++)
382      dynamic_cast<Texture*>(*reTex)->rebuild();
383  }
384  // REBUILDING MODELS
385  const std::list<BaseObject*>* modelList = ClassList::getList(CL_STATIC_MODEL);
386  if (texList != NULL)
387  {
388    std::list<BaseObject*>::const_iterator reModel;
389    for (reModel = modelList->begin(); reModel != modelList->end(); reModel++)
390      dynamic_cast<StaticModel*>(*reModel)->rebuild();
391  }
392#endif /* __WIN32__ */
393  return 1;
394}
395
396/**
397 * @brief sets Fullscreen mode
398 * @param fullscreen true if fullscreen, false if windowed
399*/
400void GraphicsEngine::setFullscreen(bool fullscreen)
401{
402  if (fullscreen)
403    this->fullscreenFlag = SDL_FULLSCREEN;
404  else
405    this->fullscreenFlag = 0;
406  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
407}
408
409void GraphicsEngine::toggleFullscreen()
410{
411  if (this->fullscreenFlag == SDL_FULLSCREEN)
412    this->fullscreenFlag = 0;
413  else
414    this->fullscreenFlag = SDL_FULLSCREEN;
415  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
416}
417
418
419/**
420 * @brief sets the background color
421 * @param red the red part of the background
422 * @param blue the blue part of the background
423 * @param green the green part of the background
424 * @param alpha the alpha part of the background
425 */
426void GraphicsEngine::setBackgroundColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
427{
428  glClearColor(red, green, blue, alpha);
429}
430
431/**
432 * @brief Signalhandler, for when the resolution has changed
433 * @param resizeInfo SDL information about the size of the new screen size
434 */
435void GraphicsEngine::resolutionChanged(const SDL_ResizeEvent& resizeInfo)
436{
437  this->setResolution(resizeInfo.w, resizeInfo.h, this->bitsPerPixel);
438}
439
440/**
441 * @brief entering 2D Mode
442 * this is a GL-Projection-mode, that is orthogonal, for placing the font in fron of everything else
443 */
444void GraphicsEngine::enter2DMode()
445{
446  //GraphicsEngine::storeMatrices();
447  SDL_Surface *screen = SDL_GetVideoSurface();
448
449  /* Note, there may be other things you need to change,
450     depending on how you have your OpenGL state set up.
451  */
452  glPushAttrib(GL_ENABLE_BIT);
453  glDisable(GL_DEPTH_TEST);
454  glDisable(GL_CULL_FACE);
455  glDisable(GL_LIGHTING);  // will be set back when leaving 2D-mode
456
457  glMatrixMode(GL_PROJECTION);
458  glPushMatrix();
459  glLoadIdentity();
460  glOrtho(0.0, (GLdouble)screen->w, (GLdouble)screen->h, 0.0, 0.0, 1.0);
461
462  glMatrixMode(GL_MODELVIEW);
463  glPushMatrix();
464  glLoadIdentity();
465}
466
467/**
468 * @brief leaves the 2DMode again also @see Font::enter2DMode()
469 */
470void GraphicsEngine::leave2DMode()
471{
472
473  glMatrixMode(GL_MODELVIEW);
474  glPopMatrix();
475
476  glMatrixMode(GL_PROJECTION);
477  glPopMatrix();
478
479  glPopAttrib();
480}
481
482/**
483 * @brief changes to wireframe-mode.
484 */
485void GraphicsEngine::wireframe()
486{
487  glPolygonMode(GL_FRONT, GL_LINE);
488}
489
490/**
491 * @brief stores the GL_matrices
492 */
493void GraphicsEngine::storeMatrices()
494{
495  glGetDoublev(GL_PROJECTION_MATRIX, GraphicsEngine::projMat);
496  glGetDoublev(GL_MODELVIEW_MATRIX, GraphicsEngine::modMat);
497  glGetIntegerv(GL_VIEWPORT, GraphicsEngine::viewPort);
498}
499
500//! the stored ModelView Matrix.
501GLdouble GraphicsEngine::modMat[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
502//! the stored Projection Matrix
503GLdouble GraphicsEngine::projMat[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
504//! The ViewPort
505GLint GraphicsEngine::viewPort[4] = {0,0,0,0};
506
507
508
509/**
510 * @brief outputs all the Fullscreen modes.
511 */
512void GraphicsEngine::listModes()
513{
514  /* Get available fullscreen/hardware modes */
515  this->videoModes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
516
517  /* Check is there are any modes available */
518  if(this->videoModes == (SDL_Rect **)0)
519  {
520    PRINTF(1)("No modes available!\n");
521    exit(-1);
522  }
523
524  /* Check if our resolution is restricted */
525  if(this->videoModes == (SDL_Rect **)-1)
526  {
527    PRINTF(2)("All resolutions available.\n");
528  }
529  else
530  {
531    /* Print valid modes */
532    PRINT(0)("Available Resoulution Modes are\n");
533    for(int i = 0; this->videoModes[i]; ++i)
534      PRINT(4)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
535  }
536}
537
538/**
539 * @brief checks wether a certain extension is availiable
540 * @param extension the Extension to check for (ex. GL_ARB_texture_env_dot3)
541 * @return true if it is, false otherwise
542 */
543bool GraphicsEngine::hwSupportsEXT(const std::string& extension)
544{
545  for (unsigned int i = 0; i < this->hwExtensions.size(); i++)
546    if ( this->hwExtensions.getString(i) == extension)
547      return true;
548  return false;
549}
550
551/**
552 * @brief updates everything that is to be updated in the GraphicsEngine
553 */
554void GraphicsEngine::update(float dt)
555{
556  Render2D::getInstance()->update(dt);
557}
558
559
560/**
561 * @brief ticks the Text
562 * @param dt the time passed
563 */
564void GraphicsEngine::tick(float dt)
565{
566  if( unlikely(this->bDisplayFPS))
567  {
568    this->currentFPS = 1.0/dt;
569    if( unlikely(this->currentFPS > this->maxFPS)) this->maxFPS = this->currentFPS;
570    if( unlikely(this->currentFPS < this->minFPS)) this->minFPS = this->currentFPS;
571
572#ifndef NO_TEXT
573    char tmpChar1[20];
574    sprintf(tmpChar1, "Current:  %4.0f", this->currentFPS);
575    this->geTextCFPS->setText(tmpChar1);
576    char tmpChar2[20];
577    sprintf(tmpChar2, "Max:    %4.0f", this->maxFPS);
578    this->geTextMaxFPS->setText(tmpChar2);
579    char tmpChar3[20];
580    sprintf(tmpChar3, "Min:    %4.0f", this->minFPS);
581    this->geTextMinFPS->setText(tmpChar3);
582#endif /* NO_TEXT */
583
584  }
585
586  Render2D::getInstance()->tick(dt);
587
588  // tick the graphics effects
589  if (this->graphicsEffects != NULL || (this->graphicsEffects = ClassList::getList(CL_GRAPHICS_EFFECT)) != NULL)
590  {
591    std::list<BaseObject*>::const_iterator it;
592    for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
593      dynamic_cast<GraphicsEffect*>(*it)->tick(dt);
594  }
595}
596
597/**
598 * @brief draws all Elements that should be displayed on the Background.
599 */
600void GraphicsEngine::drawBackgroundElements() const
601{
602  GraphicsEngine::storeMatrices();
603
604  Render2D::getInstance()->draw(E2D_LAYER_BELOW_ALL, E2D_LAYER_BELOW_ALL);
605}
606
607void GraphicsEngine::draw() const
608{
609  //  LightManager::getInstance()->draw();
610
611  if (this->graphicsEffects != NULL)
612  {
613    //draw the graphics effects
614    list<BaseObject*>::const_iterator it;
615    for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
616      dynamic_cast<GraphicsEffect*>(*it)->draw();
617  }
618  GraphicsEngine::storeMatrices();
619  Shader::suspendShader();
620  Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
621  Shader::restoreShader();
622}
623
624
625/**
626 * @brief displays the Frames per second
627 * @param display if the text should be displayed
628*/
629void GraphicsEngine::displayFPS(bool display)
630{
631#ifndef NO_TEXT
632  if( display )
633  {
634    if (this->geTextCFPS == NULL)
635    {
636      this->geTextCFPS = new Text("fonts/arial_black.ttf", 15);
637      this->geTextCFPS->setName("curFPS");
638      this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
639      this->geTextCFPS->setAbsCoor2D(5, 0);
640    }
641    if (this->geTextMaxFPS == NULL)
642    {
643      this->geTextMaxFPS = new Text("fonts/arial_black.ttf", 15);
644      this->geTextMaxFPS->setName("MaxFPS");
645      this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
646      this->geTextMaxFPS->setAbsCoor2D(5, 20);
647    }
648    if (this->geTextMinFPS == NULL)
649    {
650      this->geTextMinFPS = new Text("fonts/arial_black.ttf", 15);
651      this->geTextMinFPS->setName("MinFPS");
652      this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
653      this->geTextMinFPS->setAbsCoor2D(5, 40);
654    }
655  }
656  else
657  {
658    delete this->geTextCFPS;
659    this->geTextCFPS = NULL;
660    delete this->geTextMaxFPS;
661    this->geTextMaxFPS = NULL;
662    delete this->geTextMinFPS;
663    this->geTextMinFPS = NULL;
664  }
665  this->bDisplayFPS = display;
666#else
667  this->bDisplayFPS = false;
668#endif /* NO_TEXT */
669}
670
671
672/**
673 * @brief processes the events for the GraphicsEngine class
674 * @param the event to handle
675 */
676void GraphicsEngine::process(const Event &event)
677{
678  switch (event.type)
679  {
680    case EV_VIDEO_RESIZE:
681      this->resolutionChanged(event.resize);
682      break;
683  }
684}
Note: See TracBrowser for help on using the repository browser.