llviewerdisplay.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * @file llviewerdisplay.h
  3. * @brief LLViewerDisplay class header file
  4. *
  5. * $LicenseInfo:firstyear=2004&license=viewergpl$
  6. *
  7. * Copyright (c) 2004-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLVIEWERDISPLAY_H
  33. #define LL_LLVIEWERDISPLAY_H
  34. #include "llfontgl.h"
  35. #include "llmatrix4a.h"
  36. void display_startup();
  37. void display_cleanup();
  38. void display(bool rebuild = true, F32 zoom_factor = 1.f, S32 subfield = 0,
  39. bool for_snapshot = false);
  40. void display_update_camera(); // Also called from LLPipeline
  41. // Uses whole screen to render hud:
  42. bool setup_hud_matrices();
  43. // Specifies portion of screen (in pixels) to render hud attachments from (for
  44. // picking):
  45. bool setup_hud_matrices(const LLRect& screen_region);
  46. bool get_hud_matrices(LLMatrix4a& proj, LLMatrix4a& model);
  47. bool get_hud_matrices(const LLRect& screen_region,
  48. LLMatrix4a& proj, LLMatrix4a& model);
  49. // Utility function for rendering HUD elements
  50. void hud_render_text(const LLWString& wstr, const LLVector3& pos_agent,
  51. const LLFontGL& font, U8 style,
  52. F32 x_offset, F32 y_offset, const LLColor4& color,
  53. bool orthographic);
  54. // Also used in llviewerwindow.cpp for snapshots
  55. void render_ui(F32 zoom_factor = 1.f);
  56. // Used by LLViewerWindow::cubeSnapshot() for PBR rendering only.
  57. void display_cube_face();
  58. extern bool gDisplaySwapBuffers;
  59. extern bool gDepthDirty;
  60. extern bool gTeleportDisplay;
  61. extern LLFrameTimer gTeleportDisplayTimer;
  62. extern bool gForceRenderLandFence;
  63. extern bool gResizeScreenTexture;
  64. extern bool gResizeShadowTexture;
  65. extern F32 gSavedDrawDistance;
  66. extern bool gUpdateDrawDistance;
  67. extern U32 gLastFPSAverage;
  68. extern bool gShaderProfileFrame;
  69. extern bool gScreenIsDirty;
  70. // IMPORTANT: this MUST always be false while in EE rendering mode. HB
  71. extern bool gCubeSnapshot;
  72. #endif // LL_LLVIEWERDISPLAY_H