1 // render.h 2 // 3 // Copyright (C) 2001-2008, Celestia Development Team 4 // Contact: Chris Laurel <claurel@gmail.com> 5 // 6 // This program is free software; you can redistribute it and/or 7 // modify it under the terms of the GNU General Public License 8 // as published by the Free Software Foundation; either version 2 9 // of the License, or (at your option) any later version. 10 11 #ifndef _CELENGINE_RENDER_H_ 12 #define _CELENGINE_RENDER_H_ 13 14 #include <vector> 15 #include <list> 16 #include <string> 17 #include <celmath/frustum.h> 18 #include <celengine/observer.h> 19 #include <celengine/universe.h> 20 #include <celengine/selection.h> 21 #include <celengine/glcontext.h> 22 #include <celengine/starcolors.h> 23 #include <celengine/rendcontext.h> 24 #include <celtxf/texturefont.h> 25 26 27 class RendererWatcher; 28 class FrameTree; 29 class ReferenceMark; 30 31 struct LightSource 32 { 33 Vec3d position; 34 Color color; 35 float luminosity; 36 float radius; 37 }; 38 39 40 struct RenderListEntry 41 { 42 enum RenderableType 43 { 44 RenderableStar, 45 RenderableBody, 46 RenderableCometTail, 47 RenderableReferenceMark, 48 }; 49 50 union 51 { 52 const Star* star; 53 Body* body; 54 const ReferenceMark* refMark; 55 }; 56 57 Point3f position; 58 Vec3f sun; 59 float distance; 60 float radius; 61 float centerZ; 62 float nearZ; 63 float farZ; 64 float discSizeInPixels; 65 float appMag; 66 RenderableType renderableType; 67 bool isOpaque; 68 //std::vector<LightSource>* lightSourceList; 69 }; 70 71 72 struct SecondaryIlluminator 73 { 74 const Body* body; 75 Vec3d position_v; // viewer relative position 76 float radius; // radius in km 77 float reflectedIrradiance; // albedo times total irradiance from direct sources 78 }; 79 80 81 class Renderer 82 { 83 public: 84 Renderer(); 85 ~Renderer(); 86 87 struct DetailOptions 88 { 89 DetailOptions(); 90 unsigned int ringSystemSections; 91 unsigned int orbitPathSamplePoints; 92 unsigned int shadowTextureSize; 93 unsigned int eclipseTextureSize; 94 }; 95 96 bool init(GLContext*, int, int, DetailOptions&); shutdown()97 void shutdown() {}; 98 void resize(int, int); 99 100 float calcPixelSize(float fov, float windowHeight); 101 void setFaintestAM45deg(float); 102 float getFaintestAM45deg() const; 103 104 void setRenderMode(int); 105 void autoMag(float& faintestMag); 106 void render(const Observer&, 107 const Universe&, 108 float faintestVisible, 109 const Selection& sel); 110 void draw(const Observer&, 111 const Universe&, 112 float faintestVisible, 113 const Selection& sel); 114 115 enum { 116 NoLabels = 0x000, 117 StarLabels = 0x001, 118 PlanetLabels = 0x002, 119 MoonLabels = 0x004, 120 ConstellationLabels = 0x008, 121 GalaxyLabels = 0x010, 122 AsteroidLabels = 0x020, 123 SpacecraftLabels = 0x040, 124 LocationLabels = 0x080, 125 CometLabels = 0x100, 126 NebulaLabels = 0x200, 127 OpenClusterLabels = 0x400, 128 I18nConstellationLabels = 0x800, 129 DwarfPlanetLabels = 0x1000, 130 MinorMoonLabels = 0x2000, 131 GlobularLabels = 0x4000, 132 BodyLabelMask = (PlanetLabels | DwarfPlanetLabels | MoonLabels | MinorMoonLabels | AsteroidLabels | SpacecraftLabels | CometLabels), 133 }; 134 135 enum { 136 ShowNothing = 0x0000, 137 ShowStars = 0x0001, 138 ShowPlanets = 0x0002, 139 ShowGalaxies = 0x0004, 140 ShowDiagrams = 0x0008, 141 ShowCloudMaps = 0x0010, 142 ShowOrbits = 0x0020, 143 ShowCelestialSphere = 0x0040, 144 ShowNightMaps = 0x0080, 145 ShowAtmospheres = 0x0100, 146 ShowSmoothLines = 0x0200, 147 ShowEclipseShadows = 0x0400, 148 ShowStarsAsPoints = 0x0800, 149 ShowRingShadows = 0x1000, 150 ShowBoundaries = 0x2000, 151 ShowAutoMag = 0x4000, 152 ShowCometTails = 0x8000, 153 ShowMarkers = 0x10000, 154 ShowPartialTrajectories = 0x20000, 155 ShowNebulae = 0x40000, 156 ShowOpenClusters = 0x80000, 157 ShowGlobulars = 0x100000, 158 ShowCloudShadows = 0x200000, 159 ShowGalacticGrid = 0x400000, 160 ShowEclipticGrid = 0x800000, 161 ShowHorizonGrid = 0x1000000, 162 ShowEcliptic = 0x2000000, 163 }; 164 165 enum StarStyle 166 { 167 FuzzyPointStars = 0, 168 PointStars = 1, 169 ScaledDiscStars = 2, 170 StarStyleCount = 3, 171 }; 172 173 // constants 174 static const int DefaultRenderFlags = Renderer::ShowStars | 175 Renderer::ShowPlanets | 176 Renderer::ShowGalaxies | 177 Renderer::ShowGlobulars | 178 Renderer::ShowCloudMaps | 179 Renderer::ShowAtmospheres | 180 Renderer::ShowEclipseShadows | 181 Renderer::ShowRingShadows | 182 Renderer::ShowCometTails | 183 Renderer::ShowNebulae | 184 Renderer::ShowOpenClusters | 185 Renderer::ShowAutoMag | 186 Renderer::ShowSmoothLines; 187 188 int getRenderFlags() const; 189 void setRenderFlags(int); 190 int getLabelMode() const; 191 void setLabelMode(int); 192 float getAmbientLightLevel() const; 193 void setAmbientLightLevel(float); 194 float getMinimumOrbitSize() const; 195 void setMinimumOrbitSize(float); 196 float getMinimumFeatureSize() const; 197 void setMinimumFeatureSize(float); 198 float getDistanceLimit() const; 199 void setDistanceLimit(float); 200 int getOrbitMask() const; 201 void setOrbitMask(int); 202 int getScreenDpi() const; 203 void setScreenDpi(int); 204 const ColorTemperatureTable* getStarColorTable() const; 205 void setStarColorTable(const ColorTemperatureTable*); 206 bool getVideoSync() const; 207 void setVideoSync(bool); 208 209 bool getFragmentShaderEnabled() const; 210 void setFragmentShaderEnabled(bool); 211 bool fragmentShaderSupported() const; 212 bool getVertexShaderEnabled() const; 213 void setVertexShaderEnabled(bool); 214 bool vertexShaderSupported() const; 215 216 #ifdef USE_HDR 217 bool getBloomEnabled(); 218 void setBloomEnabled(bool); 219 void increaseBrightness(); 220 void decreaseBrightness(); 221 float getBrightness(); 222 #endif 223 getGLContext()224 GLContext* getGLContext() { return context; } 225 226 void setStarStyle(StarStyle); 227 StarStyle getStarStyle() const; 228 void setResolution(unsigned int resolution); 229 unsigned int getResolution() const; 230 231 void loadTextures(Body*); 232 233 // Label related methods 234 enum LabelAlignment 235 { 236 AlignCenter, 237 AlignLeft, 238 AlignRight 239 }; 240 241 enum LabelVerticalAlignment 242 { 243 VerticalAlignCenter, 244 VerticalAlignBottom, 245 VerticalAlignTop, 246 }; 247 248 static const int MaxLabelLength = 48; 249 struct Annotation 250 { 251 char labelText[MaxLabelLength]; 252 const MarkerRepresentation* markerRep; 253 Color color; 254 Point3f position; 255 LabelAlignment halign : 3; 256 LabelVerticalAlignment valign : 3; 257 float size; 258 259 bool operator<(const Annotation&) const; 260 }; 261 262 void addForegroundAnnotation(const MarkerRepresentation* markerRep, 263 const std::string& labelText, 264 Color color, 265 const Point3f& position, 266 LabelAlignment halign = AlignLeft, 267 LabelVerticalAlignment valign = VerticalAlignBottom, 268 float size = 0.0f); 269 void addBackgroundAnnotation(const MarkerRepresentation* markerRep, 270 const std::string& labelText, 271 Color color, 272 const Point3f& position, 273 LabelAlignment halign = AlignLeft, 274 LabelVerticalAlignment valign = VerticalAlignBottom, 275 float size = 0.0f); 276 void addSortedAnnotation(const MarkerRepresentation* markerRep, 277 const std::string& labelText, 278 Color color, 279 const Point3f& position, 280 LabelAlignment halign = AlignLeft, 281 LabelVerticalAlignment valign = VerticalAlignBottom, 282 float size = 0.0f); 283 284 // Callbacks for renderables; these belong in a special renderer interface 285 // only visible in object's render methods. 286 void beginObjectAnnotations(); 287 void addObjectAnnotation(const MarkerRepresentation* markerRep, const std::string& labelText, Color, const Point3f&); 288 void endObjectAnnotations(); 289 Quatf getCameraOrientation() const; 290 float getNearPlaneDistance() const; 291 292 void clearAnnotations(std::vector<Annotation>&); 293 void clearSortedAnnotations(); 294 295 void invalidateOrbitCache(); 296 297 struct OrbitPathListEntry 298 { 299 float centerZ; 300 float radius; 301 Body* body; 302 const Star* star; 303 Point3f origin; 304 float opacity; 305 306 bool operator<(const OrbitPathListEntry&) const; 307 }; 308 309 enum FontStyle 310 { 311 FontNormal = 0, 312 FontLarge = 1, 313 FontCount = 2, 314 }; 315 316 void setFont(FontStyle, TextureFont*); 317 TextureFont* getFont(FontStyle) const; 318 319 bool settingsHaveChanged() const; 320 void markSettingsChanged(); 321 322 void addWatcher(RendererWatcher*); 323 void removeWatcher(RendererWatcher*); 324 void notifyWatchers() const; 325 326 public: 327 // Internal types 328 // TODO: Figure out how to make these private. Even with a friend 329 // 330 struct Particle 331 { 332 Point3f center; 333 float size; 334 Color color; 335 float pad0, pad1, pad2; 336 }; 337 338 struct RenderProperties 339 { RenderPropertiesRenderProperties340 RenderProperties() : 341 surface(NULL), 342 atmosphere(NULL), 343 rings(NULL), 344 radius(1.0f), 345 geometryScale(1.0f), 346 semiAxes(1.0f, 1.0f, 1.0f), 347 geometry(InvalidResource), 348 orientation(1.0f) 349 {}; 350 351 Surface* surface; 352 const Atmosphere* atmosphere; 353 RingSystem* rings; 354 float radius; 355 float geometryScale; 356 Vec3f semiAxes; 357 ResourceHandle geometry; 358 Quatf orientation; 359 std::vector<EclipseShadow>* eclipseShadows; 360 }; 361 362 class StarVertexBuffer 363 { 364 public: 365 StarVertexBuffer(unsigned int _capacity); 366 ~StarVertexBuffer(); 367 void start(); 368 void render(); 369 void finish(); 370 void addStar(const Vec3f&, const Color&, float); 371 void setBillboardOrientation(const Quatf&); 372 373 private: 374 unsigned int capacity; 375 unsigned int nStars; 376 float* vertices; 377 float* texCoords; 378 unsigned char* colors; 379 Vec3f v0, v1, v2, v3; 380 }; 381 382 383 class PointStarVertexBuffer 384 { 385 public: 386 PointStarVertexBuffer(unsigned int _capacity); 387 ~PointStarVertexBuffer(); 388 void startPoints(const GLContext&); 389 void startSprites(const GLContext&); 390 void render(); 391 void finish(); 392 void addStar(const Vec3f& f, const Color&, float); 393 void setTexture(Texture*); 394 395 private: 396 struct StarVertex 397 { 398 Vec3f position; 399 float size; 400 unsigned char color[4]; 401 float pad; 402 }; 403 404 unsigned int capacity; 405 unsigned int nStars; 406 StarVertex* vertices; 407 const GLContext* context; 408 bool useSprites; 409 Texture* texture; 410 }; 411 412 private: 413 struct SkyVertex 414 { 415 float x, y, z; 416 unsigned char color[4]; 417 }; 418 419 struct SkyContourPoint 420 { 421 Vec3f v; 422 Vec3f eyeDir; 423 float centerDist; 424 float eyeDist; 425 float cosSkyCapAltitude; 426 }; 427 428 template <class OBJ> struct ObjectLabel 429 { 430 OBJ* obj; 431 std::string label; 432 ObjectLabelObjectLabel433 ObjectLabel() : 434 obj (NULL), 435 label("") 436 {}; 437 ObjectLabelObjectLabel438 ObjectLabel(OBJ* _obj, const std::string& _label) : 439 obj (_obj), 440 label(_label) 441 {}; 442 ObjectLabelObjectLabel443 ObjectLabel(const ObjectLabel& objLbl) : 444 obj (objLbl.obj), 445 label(objLbl.label) 446 {}; 447 448 ObjectLabel& operator = (const ObjectLabel& objLbl) 449 { 450 obj = objLbl.obj; 451 label = objLbl.label; 452 return *this; 453 }; 454 }; 455 456 typedef ObjectLabel<Star> StarLabel; 457 typedef ObjectLabel<DeepSkyObject> DSOLabel; // currently not used 458 459 struct DepthBufferPartition 460 { 461 int index; 462 float nearZ; 463 float farZ; 464 }; 465 466 private: 467 void setFieldOfView(float); 468 void renderStars(const StarDatabase& starDB, 469 float faintestVisible, 470 const Observer& observer); 471 void renderPointStars(const StarDatabase& starDB, 472 float faintestVisible, 473 const Observer& observer); 474 void renderDeepSkyObjects(const Universe&, 475 const Observer&, 476 float faintestMagNight); 477 void renderSkyGrids(const Observer& observer); 478 void renderSelectionPointer(const Observer& observer, 479 double now, 480 const Frustum& viewFrustum, 481 const Selection& sel); 482 483 void buildRenderLists(const Point3d& astrocentricObserverPos, 484 const Frustum& viewFrustum, 485 const Vec3d& viewPlaneNormal, 486 const Vec3d& frameCenter, 487 const FrameTree* tree, 488 const Observer& observer, 489 double now); 490 void buildOrbitLists(const Point3d& astrocentricObserverPos, 491 const Quatf& observerOrientation, 492 const Frustum& viewFrustum, 493 const FrameTree* tree, 494 double now); 495 void buildLabelLists(const Frustum& viewFrustum, 496 double now); 497 498 void addRenderListEntries(RenderListEntry& rle, 499 Body& body, 500 bool isLabeled); 501 502 void addStarOrbitToRenderList(const Star& star, 503 const Observer& observer, 504 double now); 505 506 void renderObject(Point3f pos, 507 float distance, 508 double now, 509 Quatf cameraOrientation, 510 float nearPlaneDistance, 511 float farPlaneDistance, 512 RenderProperties& obj, 513 const LightingState&); 514 515 void renderPlanet(Body& body, 516 Point3f pos, 517 float distance, 518 float appMag, 519 const Observer& observer, 520 const Quatf& cameraOrientation, 521 float, float); 522 523 void renderStar(const Star& star, 524 Point3f pos, 525 float distance, 526 float appMag, 527 Quatf orientation, 528 double now, 529 float, float); 530 531 void renderReferenceMark(const ReferenceMark& refMark, 532 Point3f pos, 533 float distance, 534 double now, 535 float nearPlaneDistance); 536 537 void renderCometTail(const Body& body, 538 Point3f pos, 539 double now, 540 float discSizeInPixels); 541 542 void renderObjectAsPoint_nosprite(Point3f center, 543 float radius, 544 float appMag, 545 float _faintestMag, 546 float discSizeInPixels, 547 Color color, 548 const Quatf& cameraOrientation, 549 bool useHalos); 550 void renderObjectAsPoint(Point3f center, 551 float radius, 552 float appMag, 553 float _faintestMag, 554 float discSizeInPixels, 555 Color color, 556 const Quatf& cameraOrientation, 557 bool useHalos, 558 bool emissive); 559 560 void renderEllipsoidAtmosphere(const Atmosphere& atmosphere, 561 Point3f center, 562 const Quatf& orientation, 563 Vec3f semiAxes, 564 const Vec3f& sunDirection, 565 const LightingState& ls, 566 float fade, 567 bool lit); 568 569 void renderLocations(const Body& body, 570 const Vec3d& bodyPosition, 571 const Quatd& bodyOrientation); 572 573 // Render an item from the render list 574 void renderItem(const RenderListEntry& rle, 575 const Observer& observer, 576 const Quatf& cameraOrientation, 577 float nearPlaneDistance, 578 float farPlaneDistance); 579 580 bool testEclipse(const Body& receiver, 581 const Body& caster, 582 const DirectionalLight& light, 583 double now, 584 vector<EclipseShadow>& shadows); 585 586 void labelConstellations(const AsterismList& asterisms, 587 const Observer& observer); 588 void renderParticles(const std::vector<Particle>& particles, 589 Quatf orientation); 590 591 592 void addAnnotation(std::vector<Annotation>&, 593 const MarkerRepresentation*, 594 const std::string& labelText, 595 Color color, 596 const Point3f& position, 597 LabelAlignment halign = AlignLeft, 598 LabelVerticalAlignment = VerticalAlignBottom, 599 float size = 0.0f); 600 void renderAnnotations(const std::vector<Annotation>&, FontStyle fs); 601 void renderBackgroundAnnotations(FontStyle fs); 602 void renderForegroundAnnotations(FontStyle fs); 603 std::vector<Annotation>::iterator renderSortedAnnotations(std::vector<Annotation>::iterator, 604 float nearDist, 605 float farDist, 606 FontStyle fs); 607 std::vector<Renderer::Annotation>::iterator renderAnnotations(std::vector<Annotation>::iterator startIter, 608 std::vector<Annotation>::iterator endIter, 609 float nearDist, 610 float farDist, 611 FontStyle fs); 612 613 void renderMarkers(const MarkerList&, 614 const UniversalCoord& cameraPosition, 615 const Quatd& cameraOrientation, 616 double jd); 617 618 void renderOrbit(const OrbitPathListEntry&, 619 double now, 620 const Quatf& cameraOrientation, 621 const Frustum& frustum, 622 float nearDist, 623 float farDist); 624 625 #ifdef USE_HDR 626 private: 627 int sceneTexWidth, sceneTexHeight; 628 GLfloat sceneTexWScale, sceneTexHScale; 629 GLsizei blurBaseWidth, blurBaseHeight; 630 GLuint sceneTexture; 631 Texture **blurTextures; 632 Texture *blurTempTexture; 633 GLuint gaussianLists[4]; 634 GLint blurFormat; 635 bool useBlendSubtract; 636 bool useLuminanceAlpha; 637 bool bloomEnabled; 638 float maxBodyMag; 639 float exposure, exposurePrev; 640 float brightPlus; 641 642 void genBlurTexture(int blurLevel); 643 void genBlurTextures(); 644 void genSceneTexture(); 645 void renderToBlurTexture(int blurLevel); 646 void renderToTexture(const Observer& observer, 647 const Universe& universe, 648 float faintestMagNight, 649 const Selection& sel); 650 void drawSceneTexture(); 651 void drawBlur(); 652 void drawGaussian3x3(float xdelta, float ydelta, GLsizei width, GLsizei height, float blend); 653 void drawGaussian5x5(float xdelta, float ydelta, GLsizei width, GLsizei height, float blend); 654 void drawGaussian9x9(float xdelta, float ydelta, GLsizei width, GLsizei height, float blend); 655 void drawBlendedVertices(float xdelta, float ydelta, float blend); 656 #endif 657 658 private: 659 GLContext* context; 660 661 int windowWidth; 662 int windowHeight; 663 float fov; 664 double cosViewConeAngle; 665 int screenDpi; 666 float corrFac; 667 float pixelSize; 668 float faintestAutoMag45deg; 669 TextureFont* font[FontCount]; 670 671 int renderMode; 672 int labelMode; 673 int renderFlags; 674 int orbitMask; 675 float ambientLightLevel; 676 bool fragmentShaderEnabled; 677 bool vertexShaderEnabled; 678 float brightnessBias; 679 680 float brightnessScale; 681 float faintestMag; 682 float faintestPlanetMag; 683 float saturationMagNight; 684 float saturationMag; 685 StarStyle starStyle; 686 687 Color ambientColor; 688 std::string displayedSurface; 689 690 Quatf m_cameraOrientation; 691 StarVertexBuffer* starVertexBuffer; 692 PointStarVertexBuffer* pointStarVertexBuffer; 693 PointStarVertexBuffer* glareVertexBuffer; 694 std::vector<RenderListEntry> renderList; 695 std::vector<SecondaryIlluminator> secondaryIlluminators; 696 std::vector<DepthBufferPartition> depthPartitions; 697 std::vector<Particle> glareParticles; 698 std::vector<Annotation> backgroundAnnotations; 699 std::vector<Annotation> foregroundAnnotations; 700 std::vector<Annotation> depthSortedAnnotations; 701 std::vector<Annotation> objectAnnotations; 702 std::vector<OrbitPathListEntry> orbitPathList; 703 std::vector<EclipseShadow> eclipseShadows[MaxLights]; 704 std::vector<const Star*> nearStars; 705 706 std::vector<LightSource> lightSourceList; 707 708 double modelMatrix[16]; 709 double projMatrix[16]; 710 711 bool useCompressedTextures; 712 bool useVertexPrograms; 713 bool useRescaleNormal; 714 bool usePointSprite; 715 bool useClampToBorder; 716 unsigned int textureResolution; 717 DetailOptions detailOptions; 718 719 bool useNewStarRendering; 720 721 uint32 frameCount; 722 723 int currentIntervalIndex; 724 725 726 public: 727 struct OrbitSample 728 { 729 double t; 730 Point3d pos; 731 OrbitSampleOrbitSample732 OrbitSample(const Point3d& _pos, double _t) : t(_t), pos(_pos) { } OrbitSampleOrbitSample733 OrbitSample() { } 734 }; 735 736 struct OrbitSection 737 { 738 Capsuled boundingVolume; 739 uint32 firstSample; 740 }; 741 742 struct CachedOrbit 743 { 744 std::vector<OrbitSample> trajectory; 745 std::vector<OrbitSection> sections; 746 uint32 lastUsed; 747 }; 748 749 private: 750 typedef std::map<const Orbit*, CachedOrbit*> OrbitCache; 751 OrbitCache orbitCache; 752 uint32 lastOrbitCacheFlush; 753 754 float minOrbitSize; 755 float distanceLimit; 756 float minFeatureSize; 757 uint32 locationFilter; 758 759 SkyVertex* skyVertices; 760 uint32* skyIndices; 761 SkyContourPoint* skyContour; 762 763 const ColorTemperatureTable* colorTemp; 764 765 Selection highlightObject; 766 767 bool videoSync; 768 bool settingsChanged; 769 770 // True if we're in between a begin/endObjectAnnotations 771 bool objectAnnotationSetOpen; 772 773 double realTime; 774 775 // Location markers 776 public: 777 MarkerRepresentation mountainRep; 778 MarkerRepresentation craterRep; 779 MarkerRepresentation observatoryRep; 780 MarkerRepresentation cityRep; 781 MarkerRepresentation genericLocationRep; 782 MarkerRepresentation galaxyRep; 783 MarkerRepresentation nebulaRep; 784 MarkerRepresentation openClusterRep; 785 MarkerRepresentation globularRep; 786 787 std::list<RendererWatcher*> watchers; 788 789 public: 790 // Colors for all lines and labels 791 static Color StarLabelColor; 792 static Color PlanetLabelColor; 793 static Color DwarfPlanetLabelColor; 794 static Color MoonLabelColor; 795 static Color MinorMoonLabelColor; 796 static Color AsteroidLabelColor; 797 static Color CometLabelColor; 798 static Color SpacecraftLabelColor; 799 static Color LocationLabelColor; 800 static Color GalaxyLabelColor; 801 static Color GlobularLabelColor; 802 static Color NebulaLabelColor; 803 static Color OpenClusterLabelColor; 804 static Color ConstellationLabelColor; 805 static Color EquatorialGridLabelColor; 806 static Color PlanetographicGridLabelColor; 807 static Color GalacticGridLabelColor; 808 static Color EclipticGridLabelColor; 809 static Color HorizonGridLabelColor; 810 811 static Color StarOrbitColor; 812 static Color PlanetOrbitColor; 813 static Color DwarfPlanetOrbitColor; 814 static Color MoonOrbitColor; 815 static Color MinorMoonOrbitColor; 816 static Color AsteroidOrbitColor; 817 static Color CometOrbitColor; 818 static Color SpacecraftOrbitColor; 819 static Color SelectionOrbitColor; 820 821 static Color ConstellationColor; 822 static Color BoundaryColor; 823 static Color EquatorialGridColor; 824 static Color PlanetographicGridColor; 825 static Color PlanetEquatorColor; 826 static Color GalacticGridColor; 827 static Color EclipticGridColor; 828 static Color HorizonGridColor; 829 static Color EclipticColor; 830 831 static Color SelectionCursorColor; 832 }; 833 834 835 class RendererWatcher 836 { 837 public: RendererWatcher()838 RendererWatcher() {}; ~RendererWatcher()839 virtual ~RendererWatcher() {}; 840 841 virtual void notifyRenderSettingsChanged(const Renderer*) = 0; 842 }; 843 844 845 #endif // _CELENGINE_RENDER_H_ 846