Merge lp:~kiithsacmp/stellarium/glexperiment into lp:stellarium
- glexperiment
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | treaves | ||||||||
Approved revision: | 5580 | ||||||||
Merge reported by: | treaves | ||||||||
Merged at revision: | not available | ||||||||
Proposed branch: | lp:~kiithsacmp/stellarium/glexperiment | ||||||||
Merge into: | lp:stellarium | ||||||||
Diff against target: |
69550 lines (+19192/-43349) 197 files modified
.bzrignore (+1/-0) CMakeLists.txt (+1/-0) Doxyfile.cmake (+4/-4) data/default_config.ini (+2/-1) data/shaders/xyYToRGB.glsl (+34/-32) doc/codingConventions.doxygen (+0/-2) doc/doc-header.html (+1/-0) doc/mainpage.doxygen (+33/-7) doc/renderer-api-overview.svg (+658/-0) doc/renderer-implementation-overview.svg (+835/-0) doc/renderer.doxygen (+421/-0) doc/scripting.doxygen (+2/-2) doc/stellarium-architecture.svg (+25/-30) plugins/AngleMeasure/src/AngleMeasure.cpp (+29/-38) plugins/AngleMeasure/src/AngleMeasure.hpp (+1/-1) plugins/CompassMarks/src/CompassMarks.cpp (+19/-30) plugins/CompassMarks/src/CompassMarks.hpp (+1/-1) plugins/Exoplanets/src/Exoplanet.cpp (+16/-17) plugins/Exoplanets/src/Exoplanet.hpp (+3/-7) plugins/Exoplanets/src/Exoplanets.cpp (+31/-20) plugins/Exoplanets/src/Exoplanets.hpp (+5/-6) plugins/HelloStelModule/src/HelloStelModule.cpp (+5/-6) plugins/HelloStelModule/src/HelloStelModule.hpp (+1/-1) plugins/LogBook/src/LogBook.cpp (+1/-10) plugins/LogBook/src/LogBook.hpp (+1/-1) plugins/Observability/src/Observability.cpp (+13/-15) plugins/Observability/src/Observability.hpp (+1/-1) plugins/Oculars/src/Oculars.cpp (+120/-96) plugins/Oculars/src/Oculars.hpp (+6/-6) plugins/Pulsars/src/Pulsar.cpp (+13/-17) plugins/Pulsars/src/Pulsar.hpp (+4/-7) plugins/Pulsars/src/Pulsars.cpp (+38/-24) plugins/Pulsars/src/Pulsars.hpp (+4/-6) plugins/Quasars/src/Quasar.cpp (+19/-22) plugins/Quasars/src/Quasar.hpp (+3/-6) plugins/Quasars/src/Quasars.cpp (+37/-27) plugins/Quasars/src/Quasars.hpp (+4/-6) plugins/Satellites/src/Satellite.cpp (+23/-25) plugins/Satellites/src/Satellite.hpp (+11/-13) plugins/Satellites/src/Satellites.cpp (+54/-30) plugins/Satellites/src/Satellites.hpp (+4/-3) plugins/SolarSystemEditor/src/SolarSystemEditor.cpp (+1/-1) plugins/SolarSystemEditor/src/SolarSystemEditor.hpp (+1/-1) plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp (+3/-10) plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp (+2/-3) plugins/Supernovae/src/Supernova.cpp (+8/-11) plugins/Supernovae/src/Supernova.hpp (+2/-6) plugins/Supernovae/src/Supernovae.cpp (+32/-25) plugins/Supernovae/src/Supernovae.hpp (+3/-7) plugins/TelescopeControl/src/TelescopeControl.cpp (+66/-34) plugins/TelescopeControl/src/TelescopeControl.hpp (+4/-6) plugins/TextUserInterface/src/TextUserInterface.cpp (+22/-16) plugins/TextUserInterface/src/TextUserInterface.hpp (+1/-1) plugins/TimeZoneConfiguration/src/TimeZoneConfiguration.hpp (+1/-1) src/CLIProcessor.cpp (+1/-1) src/CMakeLists.txt (+70/-32) src/StelMainGraphicsView.cpp (+29/-70) src/StelMainGraphicsView.hpp (+5/-6) src/StelMainWindow.cpp (+2/-2) src/StelMainWindow.hpp (+1/-1) src/core/OctahedronPolygon.cpp (+33/-34) src/core/OctahedronPolygon.hpp (+30/-11) src/core/RefractionExtinction.cpp (+25/-13) src/core/RefractionExtinction.hpp (+103/-8) src/core/StelApp.cpp (+23/-30) src/core/StelApp.hpp (+14/-19) src/core/StelAppGraphicsWidget.cpp (+73/-110) src/core/StelAppGraphicsWidget.hpp (+8/-18) src/core/StelCore.cpp (+62/-16) src/core/StelCore.hpp (+3/-2) src/core/StelFileMgr.hpp (+3/-3) src/core/StelLoadingBar.cpp (+32/-26) src/core/StelLoadingBar.hpp (+4/-5) src/core/StelModule.cpp (+2/-2) src/core/StelModule.hpp (+10/-5) src/core/StelMovementMgr.hpp (+1/-1) src/core/StelObject.hpp (+1/-1) src/core/StelObjectMgr.hpp (+2/-2) src/core/StelObserver.cpp (+1/-1) src/core/StelPainter.cpp (+0/-2206) src/core/StelPainter.hpp (+0/-437) src/core/StelProjector.cpp (+1/-13) src/core/StelProjector.hpp (+164/-13) src/core/StelProjectorClasses.hpp (+154/-1) src/core/StelSkyDrawer.cpp (+170/-285) src/core/StelSkyDrawer.hpp (+75/-37) src/core/StelSkyImageTile.cpp (+53/-41) src/core/StelSkyImageTile.hpp (+12/-9) src/core/StelSkyLayer.hpp (+5/-4) src/core/StelSkyLayerMgr.cpp (+7/-10) src/core/StelSkyLayerMgr.hpp (+1/-1) src/core/StelSkyPolygon.cpp (+11/-15) src/core/StelSkyPolygon.hpp (+3/-3) src/core/StelSphereGeometry.cpp (+773/-102) src/core/StelSphereGeometry.hpp (+381/-83) src/core/StelTexture.cpp (+0/-263) src/core/StelTexture.hpp (+0/-189) src/core/StelTextureMgr.cpp (+0/-163) src/core/StelTextureMgr.hpp (+0/-67) src/core/StelTextureTypes.hpp (+0/-34) src/core/StelUtils.cpp (+20/-7) src/core/StelUtils.hpp (+7/-3) src/core/StelVertexArray.cpp (+0/-131) src/core/StelVertexArray.hpp (+0/-166) src/core/StelViewportEffect.cpp (+382/-229) src/core/StelViewportEffect.hpp (+71/-22) src/core/TrailGroup.cpp (+93/-34) src/core/TrailGroup.hpp (+38/-8) src/core/TriangleIterator.hpp (+135/-0) src/core/Triplet.hpp (+41/-0) src/core/VecMath.hpp (+14/-14) src/core/external/GLee.c (+0/-18170) src/core/external/GLee.h (+0/-17646) src/core/modules/Atmosphere.cpp (+286/-275) src/core/modules/Atmosphere.hpp (+49/-32) src/core/modules/Comet.cpp (+0/-3) src/core/modules/Constellation.cpp (+133/-68) src/core/modules/Constellation.hpp (+53/-12) src/core/modules/ConstellationMgr.cpp (+70/-77) src/core/modules/ConstellationMgr.hpp (+15/-6) src/core/modules/GeodesicGridDrawer.hpp (+2/-0) src/core/modules/GridLinesMgr.cpp (+211/-181) src/core/modules/GridLinesMgr.hpp (+1/-1) src/core/modules/LabelMgr.cpp (+57/-44) src/core/modules/LabelMgr.hpp (+3/-2) src/core/modules/Landscape.cpp (+346/-191) src/core/modules/Landscape.hpp (+114/-27) src/core/modules/LandscapeMgr.cpp (+32/-27) src/core/modules/LandscapeMgr.hpp (+20/-20) src/core/modules/Meteor.cpp (+192/-185) src/core/modules/Meteor.hpp (+17/-3) src/core/modules/MeteorMgr.cpp (+8/-13) src/core/modules/MeteorMgr.hpp (+1/-1) src/core/modules/MilkyWay.cpp (+48/-34) src/core/modules/MilkyWay.hpp (+10/-4) src/core/modules/MinorPlanet.cpp (+0/-3) src/core/modules/Nebula.cpp (+62/-37) src/core/modules/Nebula.hpp (+25/-8) src/core/modules/NebulaMgr.cpp (+61/-44) src/core/modules/NebulaMgr.hpp (+7/-5) src/core/modules/Planet.cpp (+647/-218) src/core/modules/Planet.hpp (+159/-39) src/core/modules/SolarSystem.cpp (+220/-40) src/core/modules/SolarSystem.hpp (+23/-5) src/core/modules/StarMgr.cpp (+42/-31) src/core/modules/StarMgr.hpp (+5/-5) src/core/modules/ZoneArray.cpp (+51/-45) src/core/modules/ZoneArray.hpp (+16/-15) src/core/renderer/GenericVertexTypes.hpp (+73/-0) src/core/renderer/StelCircleArcRenderer.hpp (+344/-0) src/core/renderer/StelGLSLShader.hpp (+327/-0) src/core/renderer/StelGLUtilityFunctions.cpp (+80/-0) src/core/renderer/StelGLUtilityFunctions.hpp (+362/-0) src/core/renderer/StelGeometryBuilder.cpp (+600/-0) src/core/renderer/StelGeometryBuilder.hpp (+792/-0) src/core/renderer/StelIndexBuffer.hpp (+197/-0) src/core/renderer/StelLight.hpp (+42/-0) src/core/renderer/StelQGL1ArrayVertexBufferBackend.cpp (+153/-0) src/core/renderer/StelQGL1ArrayVertexBufferBackend.hpp (+58/-0) src/core/renderer/StelQGL1Renderer.hpp (+212/-0) src/core/renderer/StelQGL2ArrayVertexBufferBackend.cpp (+175/-0) src/core/renderer/StelQGL2ArrayVertexBufferBackend.hpp (+64/-0) src/core/renderer/StelQGL2Renderer.hpp (+590/-0) src/core/renderer/StelQGLArrayVertexBufferBackend.cpp (+215/-0) src/core/renderer/StelQGLArrayVertexBufferBackend.hpp (+254/-0) src/core/renderer/StelQGLGLSLShader.cpp (+212/-0) src/core/renderer/StelQGLGLSLShader.hpp (+552/-0) src/core/renderer/StelQGLIndexBuffer.hpp (+141/-0) src/core/renderer/StelQGLRenderer.cpp (+561/-0) src/core/renderer/StelQGLRenderer.hpp (+615/-0) src/core/renderer/StelQGLTextureBackend.cpp (+533/-0) src/core/renderer/StelQGLTextureBackend.hpp (+202/-0) src/core/renderer/StelQGLViewport.cpp (+30/-0) src/core/renderer/StelQGLViewport.hpp (+460/-0) src/core/renderer/StelRenderer.cpp (+39/-0) src/core/renderer/StelRenderer.hpp (+736/-0) src/core/renderer/StelTextureBackend.hpp (+239/-0) src/core/renderer/StelTextureCache.hpp (+174/-0) src/core/renderer/StelTextureLoader.hpp (+204/-0) src/core/renderer/StelTextureNew.cpp (+31/-0) src/core/renderer/StelTextureNew.hpp (+134/-0) src/core/renderer/StelTextureParams.hpp (+113/-0) src/core/renderer/StelVertexAttribute.hpp (+245/-0) src/core/renderer/StelVertexBuffer.hpp (+304/-0) src/core/renderer/StelVertexBufferBackend.hpp (+164/-0) src/gui/ConfigurationDialog.cpp (+3/-0) src/gui/StelGui.hpp (+2/-2) src/gui/StelScriptSyntaxHighlighter.cpp (+1/-1) src/gui/configurationDialog.ui (+28/-21) src/noGui/StelNoGui.hpp (+2/-2) src/scripting/ScreenImageMgr.cpp (+2/-1) src/scripting/ScreenImageMgr.hpp (+4/-5) src/tests/testStelVertexArray.cpp (+0/-108) src/tests/testStelVertexArray.hpp (+0/-40) src/tests/testStelVertexBuffer.cpp (+129/-0) src/tests/testStelVertexBuffer.hpp (+28/-0) util/texture_check.pl (+1/-1) |
||||||||
To merge this branch: | bzr merge lp:~kiithsacmp/stellarium/glexperiment | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
treaves | Needs Fixing | ||
Review via email: mp+121962@code.launchpad.net |
Commit message
Description of the change
Graphics code refactor and solar system shadows.
Ferdinand Majerech (kiithsacmp) wrote : | # |
I'll look at those compilation bugs (don't have a Mac, though).
As for performance, there is visible decrease with the GL2 backend
(60-70% performance), but nothing that massive. On my new PC (i5 3570K
3.4GHz, Radeon HD6770, open source AMD drivers (Catalyst doesn't work
for Ubuntu 12.10 yet, but Catalyst with 12.04 had similar slowdown, at
higher FPS))
Also, try the GL1 backend (simplest way is to use --safe-mode) - on my machine
it's speed roughly matches trunk (most of time slightly - ~10% slower,
sometimes, e.g. planet drawing, faster)
Most likely there's a driver specific issue (what's the driver, GPU?
Is that on the Mac?) Maybe a profiler would help.
A profile might help but it usually only helps find CPU-bound problems,
it's unlikely this is the case here.
Also, any shader warnings? (show up during run time)
Going to compare FPS trunk<->refactored right now, will reply later
with results.
On 8/30/12, treaves <email address hidden> wrote:
> Review: Needs Fixing
>
> This simply fails to compile.
>
> Looking into it more, there are several issues:
> - GL_RGBA32F on Mac is GL_RGBA32F_ARB. It looks like this may be due to
> Apple not having updated their include files to reflect that it is now
> standard, and not experimental.
>
> - SolarSystem.
> type 'Vec4f' (aka 'Vector4<float>')
> - SolarSystem.
> type 'Mat4d' (aka 'Matrix4<double>')
>
> For those last two, you need to do heap allocation, or refactor the code to
> use a Qt structure (QVector perhaps?).
>
> Once those are taken care of, it compiles and runs (I used the heap
> allocation because it was the most expedient solution). However. On my
> very new, very expensive, very high end computer, the frame rate goes from
> 75 for the 0.11.4 release we just made, to 15. That's a phenomenal decrease
> in performance! I'll try it tomorrow on my crappy work machine running
> Ubuntu, to see how it is there. Is this kind of performance decrease
> expected?
> --
> https:/
> You are the owner of lp:~kiithsacmp/stellarium/glexperiment.
>
Ferdinand Majerech (kiithsacmp) wrote : | # |
Ok, results:
These are on release builds. Debug builds _are_ a lot slower (not 5
times slower, though) after the refactor, due to a lot of uninlined
functions and invariant calls.
VSync(default on open source drivers) is on, so I'm fixed to at most 60FPS.
No idea how to disable it with these drivers, will google later.
Stellarium just plain opened (default settings, night sky right now):
trunk: 59-60FPS (VSync)
refactored-GL2: 59-60FPS (VSync)
refactored-GL1: 59-60FPS (VSync)
Stellarium opened, disabled atmosphere/ground, zoomed out max, pulsars
enabled at default settings (lots of rectangles)
trunk: 59-60FPS (VSync)
refactored-GL2: 45-55FPS
refactored-GL1: 59-60FPS (VSync)
Looking at Saturn(FOV ~0.01 deg)
trunk: 3-4FPS (WTF? this didn't happen before - yes,
this is trunk, not my code. No debug spam either)
refactored-GL2: 27-29FPS
refactored-GL1: 26-29FPS
Also, is there some shader warning spamming terminal output?
That might decrease FPS quite a bit.
I'll try my integrated Intel GPU (HD2000) later, and maybe old GeForce
(~5years, don't remember which)
On 8/30/12, No Idea <email address hidden> wrote:
> I'll look at those compilation bugs (don't have a Mac, though).
>
> As for performance, there is visible decrease with the GL2 backend
> (60-70% performance), but nothing that massive. On my new PC (i5 3570K
> 3.4GHz, Radeon HD6770, open source AMD drivers (Catalyst doesn't work
> for Ubuntu 12.10 yet, but Catalyst with 12.04 had similar slowdown, at
> higher FPS))
>
> Also, try the GL1 backend (simplest way is to use --safe-mode) - on my
> machine
> it's speed roughly matches trunk (most of time slightly - ~10% slower,
> sometimes, e.g. planet drawing, faster)
>
>
> Most likely there's a driver specific issue (what's the driver, GPU?
> Is that on the Mac?) Maybe a profiler would help.
>
> A profile might help but it usually only helps find CPU-bound problems,
> it's unlikely this is the case here.
>
> Also, any shader warnings? (show up during run time)
>
>
> Going to compare FPS trunk<->refactored right now, will reply later
> with results.
>
> On 8/30/12, treaves <email address hidden> wrote:
>> Review: Needs Fixing
>>
>> This simply fails to compile.
>>
>> Looking into it more, there are several issues:
>> - GL_RGBA32F on Mac is GL_RGBA32F_ARB. It looks like this may be due to
>> Apple not having updated their include files to reflect that it is now
>> standard, and not experimental.
>>
>> - SolarSystem.
>> type 'Vec4f' (aka 'Vector4<float>')
>> - SolarSystem.
>> type 'Mat4d' (aka 'Matrix4<double>')
>>
>> For those last two, you need to do heap allocation, or refactor the code
>> to
>> use a Qt structure (QVector perhaps?).
>>
>> Once those are taken care of, it compiles and runs (I used the heap
>> allocation because it was the most expedient solution). However. On my
>> very new, very expensive, very high end computer, the frame rate goes
>> from
>> 75 for the 0.11.4 release we just made, to 15. That's a phenomenal
>> decrease
>> in performance! I'll t...
Ferdinand Majerech (kiithsacmp) wrote : | # |
I tried to max it out to get as low FPS as possible.
I enabled all plugins, grids, markers, etc.
(The result looks crazy: http://
trunk: 23-24FPS
refactored-GL2: 11.5-11.7FPS
refactored-GL1: 13-14FPS
There is quite large slowdown here, but again nowhere near 75>15FPS.
treaves (treaves) wrote : | # |
Ya, this is my Mac. It has a pretty nice OpenGL profiler, as Mac's use
OpenGL so heavily. I'll give it a spin in that tonight, and make sure I'm
not in debug mode still (I probably was).
On Wed, Aug 29, 2012 at 11:20 PM, Ferdinand Majerech
<email address hidden>wrote:
> I tried to max it out to get as low FPS as possible.
> I enabled all plugins, grids, markers, etc.
> (The result looks crazy: http://
>
> trunk: 23-24FPS
> refactored-GL2: 11.5-11.7FPS
> refactored-GL1: 13-14FPS
>
> There is quite large slowdown here, but again nowhere near 75>15FPS.
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~kiithsacmp/stellarium/glexperiment into lp:stellarium.
>
treaves (treaves) wrote : | # |
Works fine on my Ubuntu box. If you have those two other issues resolved, I'll compile & merge tonight.
- 5576. By Ferdinand Majerech
-
Fixed a compilation bug (RGBA_32F/_ARB) on Mac (needs testing).
- 5577. By Ferdinand Majerech
-
Fixed a release-mode compiler warning.
- 5578. By Ferdinand Majerech
-
Another release mode compiler warning fix.
- 5579. By Ferdinand Majerech
-
Fixed strict aliasing issues found in release mode.
- 5580. By Ferdinand Majerech
-
Fixed shadows compiler bug on Mac. (Needs testing!)
Ferdinand Majerech (kiithsacmp) wrote : | # |
I've finally tested it on Catalyst - shadows work fine.
The last thing that needs testing is Mac compilation.
So right now I have it tested on:
AMD open source
AMD Catalyst
NVidia Nouveau
Intel open source
All of them work fine.
Intel open source is about same speed as AMD open source, even though on a much crappier GPU.
Nouveau is about 50% of that (30-35FPS zoomed out no atmosphere/ground)
Catalyst is way faster (120-140FPS, the bottleneck here is most likely CPU)
Catalyst became laggy on very close zoom to a planet with GL2 - but that was on 2560x1440 -
most likely shadow fragment shader overhead
Sorry, did no precise measurements. I'd be more interested in measurements
on stuff that is almost too slow so I can improve performance there
(i.e. improving 80 FPS to 120 is not as good as 20 FPS to 30)
Also; one possible source of slowdown on your Mac (but again, not that huge slowdown):
Viewport effects (i.e. spherical mirror distortion) now work even if FBOs are not used,
(previously they would simply be disabled), but with a round-about, slow implementation.
I also disabled FBO for now because there seems to be a bug in GL2 Qt paint engine,
where the paint engine expects certain state to be set to certain values and I wasn't
able to work around that.
So if you have spherical mirror distortion enabled, you're using the fallback
viewport texture implementation instead of FBOs, which is slow. But again,
not 75-to-15 slow, so I'm not sure.
treaves (treaves) wrote : | # |
O.K. Compiles fine. In RELEASE mode, I still get only 20 FPS. My machine:
- SSD (NO HDD)
- 16 GB memory
- NVidia GeForece GT 650M with 1G memory
- 2.6 GHz Intel Core i7
This is pushing a Retina display which is 2880x1800 and a 27" Thunderbolt display at 2560x1440, so, it is pushing a lot of pixels. I'm still surprised at the difference. We'll get it into trunk and see what happens.
Opening in safe mode allows for up to 25 FPS; so your code, even in GL 1.0, is three times slower.
I did run in Instruments. There are about 30 parameters that I can monitor, but unfortunately my ignorance of OpenGL doesn't allow for understanding what I'm seeing.
There are no log messages about shader issues (or other issues).
Ferdinand Majerech (kiithsacmp) wrote : | # |
That is... really weird. It would make sense if it would be fragment shader on so many pixels, but
GL1 would be fast then (unless the driver emulates GL1 with a non-cheap fragment shader - but then trunk would be slow, too).
The largest resolution I can test with is 2560x1440, and the AMD open source drivers have no problem with
60 FPS with that resolution. My GPU is probably a bit faster (non-mobile), but it still doesn't explain trunk-vs-refactored difference.
I might try to APITrace pre- and post- change code to see what different calls are emitted, but not right now
(working on statistics right now, want to have that before optimization work).
If your profiler only records GL calls (which is what APITrace does), it's not that useful; you need to know
about how the driver works with which calls to figure out what is slow. It would be awesome to have a profiler
that actually, well, profiles, which is complicated as the GPU is working asynchronously. Afaik AMD gDebugger does something like that, once Catalyst supports 12.10 I might try that.
It would be useful to have a Mac profile with an Intel GPU (afaik there are no Macs with AMD GPUs?), especially trunk-vs-refactored difference. If the problem is still there, it's Mac specific. If not, NVidia specific (or NVidia+Mac specific). Does the Mac have Optimus, and if so, is there some way to force the Intel GPU to be used?
Also, it'd be good to have some Windows numbers. Don't have a Windows box, though, nor any experience with
compiling a C++ project on Windows.
Preview Diff
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2012-07-22 14:33:23 +0000 | |||
3 | +++ .bzrignore 2012-08-30 16:29:19 +0000 | |||
4 | @@ -4,5 +4,6 @@ | |||
5 | 4 | CMakeLists.txt.user | 4 | CMakeLists.txt.user |
6 | 5 | Stellarium.bat | 5 | Stellarium.bat |
7 | 6 | stellarium.iss | 6 | stellarium.iss |
8 | 7 | *.kdev4 | ||
9 | 7 | ./doc/qt.tag | 8 | ./doc/qt.tag |
10 | 8 | ./locale | 9 | ./locale |
11 | 9 | 10 | ||
12 | === modified file 'CMakeLists.txt' | |||
13 | --- CMakeLists.txt 2012-08-25 15:21:39 +0000 | |||
14 | +++ CMakeLists.txt 2012-08-30 16:29:19 +0000 | |||
15 | @@ -423,6 +423,7 @@ | |||
16 | 423 | ${CMAKE_BINARY_DIR} | 423 | ${CMAKE_BINARY_DIR} |
17 | 424 | ${CMAKE_SOURCE_DIR}/src | 424 | ${CMAKE_SOURCE_DIR}/src |
18 | 425 | ${CMAKE_SOURCE_DIR}/src/core | 425 | ${CMAKE_SOURCE_DIR}/src/core |
19 | 426 | ${CMAKE_SOURCE_DIR}/src/core/renderer | ||
20 | 426 | ${CMAKE_SOURCE_DIR}/src/core/modules | 427 | ${CMAKE_SOURCE_DIR}/src/core/modules |
21 | 427 | ${CMAKE_SOURCE_DIR}/src/core/planetsephems | 428 | ${CMAKE_SOURCE_DIR}/src/core/planetsephems |
22 | 428 | ${CMAKE_SOURCE_DIR}/src/core/external | 429 | ${CMAKE_SOURCE_DIR}/src/core/external |
23 | 429 | 430 | ||
24 | === modified file 'Doxyfile.cmake' | |||
25 | --- Doxyfile.cmake 2012-05-09 04:30:26 +0000 | |||
26 | +++ Doxyfile.cmake 2012-08-30 16:29:19 +0000 | |||
27 | @@ -423,7 +423,7 @@ | |||
28 | 423 | 423 | ||
29 | 424 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. | 424 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. |
30 | 425 | 425 | ||
32 | 426 | SORT_MEMBERS_CTORS_1ST = NO | 426 | SORT_MEMBERS_CTORS_1ST = YES |
33 | 427 | 427 | ||
34 | 428 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the | 428 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the |
35 | 429 | # hierarchy of group names into alphabetical order. If set to NO (the default) | 429 | # hierarchy of group names into alphabetical order. If set to NO (the default) |
36 | @@ -484,13 +484,13 @@ | |||
37 | 484 | # at the bottom of the documentation of classes and structs. If set to YES the | 484 | # at the bottom of the documentation of classes and structs. If set to YES the |
38 | 485 | # list will mention the files that were used to generate the documentation. | 485 | # list will mention the files that were used to generate the documentation. |
39 | 486 | 486 | ||
41 | 487 | SHOW_USED_FILES = NO | 487 | SHOW_USED_FILES = YES |
42 | 488 | 488 | ||
43 | 489 | # If the sources in your project are distributed over multiple directories | 489 | # If the sources in your project are distributed over multiple directories |
44 | 490 | # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy | 490 | # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy |
45 | 491 | # in the documentation. The default is NO. | 491 | # in the documentation. The default is NO. |
46 | 492 | 492 | ||
48 | 493 | SHOW_DIRECTORIES = NO | 493 | SHOW_DIRECTORIES = YES |
49 | 494 | 494 | ||
50 | 495 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. | 495 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. |
51 | 496 | # This will remove the Files entry from the Quick Index and from the | 496 | # This will remove the Files entry from the Quick Index and from the |
52 | @@ -703,7 +703,7 @@ | |||
53 | 703 | # Note: To get rid of all source code in the generated output, make sure also | 703 | # Note: To get rid of all source code in the generated output, make sure also |
54 | 704 | # VERBATIM_HEADERS is set to NO. | 704 | # VERBATIM_HEADERS is set to NO. |
55 | 705 | 705 | ||
57 | 706 | SOURCE_BROWSER = NO | 706 | SOURCE_BROWSER = YES |
58 | 707 | 707 | ||
59 | 708 | # Setting the INLINE_SOURCES tag to YES will include the body | 708 | # Setting the INLINE_SOURCES tag to YES will include the body |
60 | 709 | # of functions and classes directly in the documentation. | 709 | # of functions and classes directly in the documentation. |
61 | 710 | 710 | ||
62 | === modified file 'data/default_config.ini' | |||
63 | --- data/default_config.ini 2012-08-28 17:10:57 +0000 | |||
64 | +++ data/default_config.ini 2012-08-30 16:29:19 +0000 | |||
65 | @@ -18,7 +18,8 @@ | |||
66 | 18 | vertical_offset = 0 | 18 | vertical_offset = 0 |
67 | 19 | minimum_fps = 18 | 19 | minimum_fps = 18 |
68 | 20 | maximum_fps = 10000 | 20 | maximum_fps = 10000 |
70 | 21 | viewport_effect = none | 21 | viewport_effect = sphericMirrorDistorter |
71 | 22 | #viewport_effect = none | ||
72 | 22 | 23 | ||
73 | 23 | [projection] | 24 | [projection] |
74 | 24 | type = ProjectionStereographic | 25 | type = ProjectionStereographic |
75 | 25 | 26 | ||
76 | === modified file 'data/shaders/xyYToRGB.glsl' | |||
77 | --- data/shaders/xyYToRGB.glsl 2010-03-04 18:55:22 +0000 | |||
78 | +++ data/shaders/xyYToRGB.glsl 2012-08-30 16:29:19 +0000 | |||
79 | @@ -16,45 +16,47 @@ | |||
80 | 16 | uniform mediump mat4 projectionMatrix; | 16 | uniform mediump mat4 projectionMatrix; |
81 | 17 | 17 | ||
82 | 18 | // Contains the 2d position of the point on the screen (before multiplication by the projection matrix) | 18 | // Contains the 2d position of the point on the screen (before multiplication by the projection matrix) |
84 | 19 | attribute mediump vec2 skyVertex; | 19 | attribute mediump vec2 vertex; |
85 | 20 | 20 | ||
86 | 21 | // Contains the r,g,b,Y (luminosity) components. | 21 | // Contains the r,g,b,Y (luminosity) components. |
88 | 22 | attribute highp vec4 skyColor; | 22 | attribute highp vec4 color; |
89 | 23 | 23 | ||
90 | 24 | // The output variable passed to the fragment shader | 24 | // The output variable passed to the fragment shader |
91 | 25 | varying mediump vec4 resultSkyColor; | 25 | varying mediump vec4 resultSkyColor; |
92 | 26 | 26 | ||
93 | 27 | void main() | 27 | void main() |
94 | 28 | { | 28 | { |
97 | 29 | gl_Position = projectionMatrix*vec4(skyVertex, 0., 1.); | 29 | gl_Position = projectionMatrix*vec4(vertex, 0., 1.); |
98 | 30 | highp vec4 color = skyColor; | 30 | |
99 | 31 | // Must be a separate variable due to Intel drivers | ||
100 | 32 | vec4 tempColor = color; | ||
101 | 31 | 33 | ||
102 | 32 | /////////////////////////////////////////////////////////////////////////// | 34 | /////////////////////////////////////////////////////////////////////////// |
103 | 33 | // First compute the xy color component | 35 | // First compute the xy color component |
104 | 34 | // color contains the unprojected vertex position in r,g,b | 36 | // color contains the unprojected vertex position in r,g,b |
105 | 35 | // + the Y (luminance) component of the color in the alpha channel | 37 | // + the Y (luminance) component of the color in the alpha channel |
107 | 36 | if (color[3]>0.01) | 38 | if (tempColor[3]>0.01) |
108 | 37 | { | 39 | { |
110 | 38 | highp float cosDistSunq = sunPos[0]*color[0] + sunPos[1]*color[1] + sunPos[2]*color[2]; | 40 | highp float cosDistSunq = sunPos[0]*tempColor[0] + sunPos[1]*tempColor[1] + sunPos[2]*tempColor[2]; |
111 | 39 | highp float distSun=acos(cosDistSunq); | 41 | highp float distSun=acos(cosDistSunq); |
113 | 40 | highp float oneOverCosZenithAngle = (color[2]==0.) ? 9999999999999. : 1. / color[2]; | 42 | highp float oneOverCosZenithAngle = (tempColor[2]==0.) ? 9999999999999. : 1. / tempColor[2]; |
114 | 41 | 43 | ||
115 | 42 | cosDistSunq*=cosDistSunq; | 44 | cosDistSunq*=cosDistSunq; |
119 | 43 | color[0] = term_x * (1. + Ax * exp(Bx*oneOverCosZenithAngle))* (1. + Cx * exp(Dx*distSun) + Ex * cosDistSunq); | 45 | tempColor[0] = term_x * (1. + Ax * exp(Bx*oneOverCosZenithAngle))* (1. + Cx * exp(Dx*distSun) + Ex * cosDistSunq); |
120 | 44 | color[1] = term_y * (1. + Ay * exp(By*oneOverCosZenithAngle))* (1. + Cy * exp(Dy*distSun) + Ey * cosDistSunq); | 46 | tempColor[1] = term_y * (1. + Ay * exp(By*oneOverCosZenithAngle))* (1. + Cy * exp(Dy*distSun) + Ey * cosDistSunq); |
121 | 45 | if (color[0] < 0. || color[1] < 0.) | 47 | if (tempColor[0] < 0. || tempColor[1] < 0.) |
122 | 46 | { | 48 | { |
125 | 47 | color[0] = 0.25; | 49 | tempColor[0] = 0.25; |
126 | 48 | color[1] = 0.25; | 50 | tempColor[1] = 0.25; |
127 | 49 | } | 51 | } |
128 | 50 | } | 52 | } |
129 | 51 | else | 53 | else |
130 | 52 | { | 54 | { |
133 | 53 | color[0] = 0.25; | 55 | tempColor[0] = 0.25; |
134 | 54 | color[1] = 0.25; | 56 | tempColor[1] = 0.25; |
135 | 55 | } | 57 | } |
138 | 56 | color[2]=color[3]; | 58 | tempColor[2]=tempColor[3]; |
139 | 57 | color[3]=1.; | 59 | tempColor[3]=1.; |
140 | 58 | 60 | ||
141 | 59 | 61 | ||
142 | 60 | /////////////////////////////////////////////////////////////////////////// | 62 | /////////////////////////////////////////////////////////////////////////// |
143 | @@ -64,39 +66,39 @@ | |||
144 | 64 | // if log10Y>0.6, photopic vision only (with the cones, colors are seen) | 66 | // if log10Y>0.6, photopic vision only (with the cones, colors are seen) |
145 | 65 | // else scotopic vision if log10Y<-2 (with the rods, no colors, everything blue), | 67 | // else scotopic vision if log10Y<-2 (with the rods, no colors, everything blue), |
146 | 66 | // else mesopic vision (with rods and cones, transition state) | 68 | // else mesopic vision (with rods and cones, transition state) |
148 | 67 | if (color[2] <= 0.01) | 69 | if (tempColor[2] <= 0.01) |
149 | 68 | { | 70 | { |
150 | 69 | // special case for s = 0 (x=0.25, y=0.25) | 71 | // special case for s = 0 (x=0.25, y=0.25) |
157 | 70 | color[2] *= 0.5121445; | 72 | tempColor[2] *= 0.5121445; |
158 | 71 | color[2] = pow(color[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma; | 73 | tempColor[2] = pow(tempColor[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma; |
159 | 72 | color[0] = 0.787077*color[2]; | 74 | tempColor[0] = 0.787077*tempColor[2]; |
160 | 73 | color[1] = 0.9898434*color[2]; | 75 | tempColor[1] = 0.9898434*tempColor[2]; |
161 | 74 | color[2] *= 1.9256125; | 76 | tempColor[2] *= 1.9256125; |
162 | 75 | resultSkyColor = color*brightnessScale; | 77 | resultSkyColor = tempColor*brightnessScale; |
163 | 76 | } | 78 | } |
164 | 77 | else | 79 | else |
165 | 78 | { | 80 | { |
167 | 79 | if (color[2]<3.9810717055349722) | 81 | if (tempColor[2]<3.9810717055349722) |
168 | 80 | { | 82 | { |
169 | 81 | // Compute s, ratio between scotopic and photopic vision | 83 | // Compute s, ratio between scotopic and photopic vision |
171 | 82 | float op = (log(color[2])/ln10 + 2.)/2.6; | 84 | float op = (log(tempColor[2])/ln10 + 2.)/2.6; |
172 | 83 | float s = op * op *(3. - 2. * op); | 85 | float s = op * op *(3. - 2. * op); |
173 | 84 | // Do the blue shift for scotopic vision simulation (night vision) [3] | 86 | // Do the blue shift for scotopic vision simulation (night vision) [3] |
174 | 85 | // The "night blue" is x,y(0.25, 0.25) | 87 | // The "night blue" is x,y(0.25, 0.25) |
177 | 86 | color[0] = (1. - s) * 0.25 + s * color[0]; // Add scotopic + photopic components | 88 | tempColor[0] = (1. - s) * 0.25 + s * tempColor[0]; // Add scotopic + photopic components |
178 | 87 | color[1] = (1. - s) * 0.25 + s * color[1]; // Add scotopic + photopic components | 89 | tempColor[1] = (1. - s) * 0.25 + s * tempColor[1]; // Add scotopic + photopic components |
179 | 88 | // Take into account the scotopic luminance approximated by V [3] [4] | 90 | // Take into account the scotopic luminance approximated by V [3] [4] |
182 | 89 | float V = color[2] * (1.33 * (1. + color[1] / color[0] + color[0] * (1. - color[0] - color[1])) - 1.68); | 91 | float V = tempColor[2] * (1.33 * (1. + tempColor[1] / tempColor[0] + tempColor[0] * (1. - tempColor[0] - tempColor[1])) - 1.68); |
183 | 90 | color[2] = 0.4468 * (1. - s) * V + s * color[2]; | 92 | tempColor[2] = 0.4468 * (1. - s) * V + s * tempColor[2]; |
184 | 91 | } | 93 | } |
185 | 92 | 94 | ||
186 | 93 | // 2. Adapt the luminance value and scale it to fit in the RGB range [2] | 95 | // 2. Adapt the luminance value and scale it to fit in the RGB range [2] |
189 | 94 | // color[2] = std::pow(adaptLuminanceScaled(color[2]), oneOverGamma); | 96 | // tempColor[2] = std::pow(adaptLuminanceScaled(tempColor[2]), oneOverGamma); |
190 | 95 | color[2] = pow(color[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma; | 97 | tempColor[2] = pow(tempColor[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma; |
191 | 96 | 98 | ||
192 | 97 | // Convert from xyY to XZY | 99 | // Convert from xyY to XZY |
193 | 98 | // Use a XYZ to Adobe RGB (1998) matrix which uses a D65 reference white | 100 | // Use a XYZ to Adobe RGB (1998) matrix which uses a D65 reference white |
195 | 99 | mediump vec3 tmp = vec3(color[0] * color[2] / color[1], color[2], (1. - color[0] - color[1]) * color[2] / color[1]); | 101 | mediump vec3 tmp = vec3(tempColor[0] * tempColor[2] / tempColor[1], tempColor[2], (1. - tempColor[0] - tempColor[1]) * tempColor[2] / tempColor[1]); |
196 | 100 | resultSkyColor = vec4(2.04148*tmp.x-0.564977*tmp.y-0.344713*tmp.z, -0.969258*tmp.x+1.87599*tmp.y+0.0415557*tmp.z, 0.0134455*tmp.x-0.118373*tmp.y+1.01527*tmp.z, 1.); | 102 | resultSkyColor = vec4(2.04148*tmp.x-0.564977*tmp.y-0.344713*tmp.z, -0.969258*tmp.x+1.87599*tmp.y+0.0415557*tmp.z, 0.0134455*tmp.x-0.118373*tmp.y+1.01527*tmp.z, 1.); |
197 | 101 | resultSkyColor*=brightnessScale; | 103 | resultSkyColor*=brightnessScale; |
198 | 102 | } | 104 | } |
199 | 103 | 105 | ||
200 | === modified file 'doc/codingConventions.doxygen' | |||
201 | --- doc/codingConventions.doxygen 2012-04-29 12:13:30 +0000 | |||
202 | +++ doc/codingConventions.doxygen 2012-08-30 16:29:19 +0000 | |||
203 | @@ -20,9 +20,7 @@ | |||
204 | 20 | /*! | 20 | /*! |
205 | 21 | 21 | ||
206 | 22 | @page codingStyle Coding Style Conventions in Stellarium | 22 | @page codingStyle Coding Style Conventions in Stellarium |
207 | 23 | |||
208 | 24 | @tableofcontents | 23 | @tableofcontents |
209 | 25 | |||
210 | 26 | The increasing number of contributors require that we clearly define coding rules and guidelines. Although for historical reasons the current code of Stellarium does not always comply to these rules, they should now be respected for any addition or modification of the code. | 24 | The increasing number of contributors require that we clearly define coding rules and guidelines. Although for historical reasons the current code of Stellarium does not always comply to these rules, they should now be respected for any addition or modification of the code. |
211 | 27 | 25 | ||
212 | 28 | @section stylistic_conventions_sec Stylistic Conventions | 26 | @section stylistic_conventions_sec Stylistic Conventions |
213 | 29 | 27 | ||
214 | === modified file 'doc/doc-header.html' | |||
215 | --- doc/doc-header.html 2011-08-03 17:51:45 +0000 | |||
216 | +++ doc/doc-header.html 2012-08-30 16:29:19 +0000 | |||
217 | @@ -19,6 +19,7 @@ | |||
218 | 19 | <a href="codingStyle.html">Coding Style</a> · | 19 | <a href="codingStyle.html">Coding Style</a> · |
219 | 20 | <a href="scripting.html">Scripting</a> · | 20 | <a href="scripting.html">Scripting</a> · |
220 | 21 | <a href="plugins.html">Plugins</a> · | 21 | <a href="plugins.html">Plugins</a> · |
221 | 22 | <a href="renderer.html">Renderer</a> · | ||
222 | 22 | <a href="fileStructure.html">File Structure</a> | 23 | <a href="fileStructure.html">File Structure</a> |
223 | 23 | </td> | 24 | </td> |
224 | 24 | </tr> | 25 | </tr> |
225 | 25 | 26 | ||
226 | === added file 'doc/images/renderer-api-overview.png' | |||
227 | 26 | Binary files doc/images/renderer-api-overview.png 1970-01-01 00:00:00 +0000 and doc/images/renderer-api-overview.png 2012-08-30 16:29:19 +0000 differ | 27 | Binary files doc/images/renderer-api-overview.png 1970-01-01 00:00:00 +0000 and doc/images/renderer-api-overview.png 2012-08-30 16:29:19 +0000 differ |
228 | === added file 'doc/images/renderer-implementation-overview.png' | |||
229 | 27 | Binary files doc/images/renderer-implementation-overview.png 1970-01-01 00:00:00 +0000 and doc/images/renderer-implementation-overview.png 2012-08-30 16:29:19 +0000 differ | 28 | Binary files doc/images/renderer-implementation-overview.png 1970-01-01 00:00:00 +0000 and doc/images/renderer-implementation-overview.png 2012-08-30 16:29:19 +0000 differ |
230 | === modified file 'doc/images/stellarium-architecture.png' | |||
231 | 28 | Binary files doc/images/stellarium-architecture.png 2010-04-18 21:00:25 +0000 and doc/images/stellarium-architecture.png 2012-08-30 16:29:19 +0000 differ | 29 | Binary files doc/images/stellarium-architecture.png 2010-04-18 21:00:25 +0000 and doc/images/stellarium-architecture.png 2012-08-30 16:29:19 +0000 differ |
232 | === modified file 'doc/mainpage.doxygen' | |||
233 | --- doc/mainpage.doxygen 2012-04-29 12:13:30 +0000 | |||
234 | +++ doc/mainpage.doxygen 2012-08-30 16:29:19 +0000 | |||
235 | @@ -28,13 +28,39 @@ | |||
236 | 28 | 28 | ||
237 | 29 | @section architecture_sec Program Architecture | 29 | @section architecture_sec Program Architecture |
238 | 30 | 30 | ||
246 | 31 | The code of Stellarium is split into several main blocks: | 31 | The code of Stellarium is split into several main blocks: <ul> |
247 | 32 | <ul> | 32 | |
248 | 33 | <li>the main loop and main widget classes StelMainWindow, StelMainGraphicsView and StelAppGraphicsScene. Those classes have a single instance which is created at startup by the ::main() function. They perform various tasks such as the creation of the main program window and openGL context, the creation of the stellarium core, the creation of the GUI. After initialization, they manage user's input event propagation and event loop. There are heavily based on %Qt features.</li> | 33 | <li> the main loop and main widget classes StelMainWindow, StelMainGraphicsView and |
249 | 34 | <li>the core which provides a number of generic services and features to the other components. The main class is the StelApp singleton class which is used everywhere in the code to access other elements. It is the StelApp instance which creates all the main core services and modules at initialization. Example services are OpenGL textures management with the StelTextureMgr, font management with the StelFontMgr, sky images management (images which have a fixed position in the sky) with the StelSkyImageMgr etc.. Two especially important manager classes (the ones with the "Mgr" suffix) are the StelModuleMgr and StelCore classes: the first one manages the collection of StelModule instances which are registered in the program (see next point for more info on what a StelModule is). The second one provides performance critical features for rendering various elements using openGL, or for computing coordinate transformation and other mathematical services.</li> | 34 | StelAppGraphicsWidget. Those classes have a single instance created at startup by the ::main() |
250 | 35 | <li>a collection of StelModule instances which display the main elements of the program such as planets and stars. Each StelModule should be registered to the StelModuleMgr. Because many components of Stellarium derive from the StelModule class, it is possible for the main loop to treat them generically by calling their standard methods such StelModule::update() and StelModule::draw() at each program iteration. It also allows other program components to access them by name. StelModule can also be loaded dynamically by Stellarium, which is the standard way of creating @ref plugins.</li> | 35 | function. They perform tasks such as creating of the main window and renderer, creating the |
251 | 36 | <li>the Graphical User Interface (StelGui). It is based on styled %Qt widgets which are rendered directly in the openGL window. Users actions trigger signals which are connected to core and StelModules slots.</li> | 36 | stellarium core, creating the GUI. After initialization, they manage user's input event |
252 | 37 | <li>the script engine (StelScriptMgr) allows scripts to calls slots from the core and StelModules slots.</li> | 37 | propagation and event loop. They are heavily based on %Qt features. </li> |
253 | 38 | |||
254 | 39 | <li> the core which provides generic services and features to the other components. The main | ||
255 | 40 | class is the StelApp singleton which is used everywhere in the code to access other elements. | ||
256 | 41 | The StelApp instance creates all the main core services and modules at initialization. Example | ||
257 | 42 | services are sky layer management (e.g. images which have a fixed position in the sky) with the | ||
258 | 43 | StelSkyLayerMgr, drawing with StelRenderer etc. . Two especially important manager classes are | ||
259 | 44 | the StelModuleMgr and StelCore: the former manages the collection of StelModule instances | ||
260 | 45 | registered in the program (see next point for more info on what a StelModule is). The latter | ||
261 | 46 | provides performance critical features for computing coordinate transformation and other | ||
262 | 47 | mathematical services. </li> | ||
263 | 48 | |||
264 | 49 | <li> a collection of StelModule instances which display the main elements of the program such as | ||
265 | 50 | planets and stars. Each StelModule should be registered to the StelModuleMgr. Because many | ||
266 | 51 | Stellarium components derive from the StelModule class, the main loop is able to treat them | ||
267 | 52 | generically by calling their standard methods such StelModule::update() and StelModule::draw() | ||
268 | 53 | at each program iteration. This also allows other program components to access them by name. | ||
269 | 54 | StelModule can also be loaded dynamically by Stellarium, which is the standard way of creating | ||
270 | 55 | @ref plugins. </li> | ||
271 | 56 | |||
272 | 57 | <li> the Graphical User Interface (StelGui). It is based on styled %Qt widgets which are | ||
273 | 58 | rendered directly in the graphics window. User actions trigger signals connected to core and | ||
274 | 59 | StelModules slots. </li> | ||
275 | 60 | |||
276 | 61 | <li> the script engine (StelScriptMgr) allows scripts to calls slots from the core and | ||
277 | 62 | StelModule slots. </li> | ||
278 | 63 | |||
279 | 38 | </ul> | 64 | </ul> |
280 | 39 | @image html stellarium-architecture.png | 65 | @image html stellarium-architecture.png |
281 | 40 | 66 | ||
282 | 41 | 67 | ||
283 | === added file 'doc/renderer-api-overview.svg' | |||
284 | --- doc/renderer-api-overview.svg 1970-01-01 00:00:00 +0000 | |||
285 | +++ doc/renderer-api-overview.svg 2012-08-30 16:29:19 +0000 | |||
286 | @@ -0,0 +1,658 @@ | |||
287 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
288 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
289 | 3 | |||
290 | 4 | <svg | ||
291 | 5 | xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" | ||
292 | 6 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
293 | 7 | xmlns:cc="http://creativecommons.org/ns#" | ||
294 | 8 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
295 | 9 | xmlns:svg="http://www.w3.org/2000/svg" | ||
296 | 10 | xmlns="http://www.w3.org/2000/svg" | ||
297 | 11 | xmlns:xlink="http://www.w3.org/1999/xlink" | ||
298 | 12 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
299 | 13 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
300 | 14 | width="1052.3622" | ||
301 | 15 | height="744.09448" | ||
302 | 16 | id="svg3265" | ||
303 | 17 | version="1.1" | ||
304 | 18 | inkscape:version="0.48.3.1 r9886" | ||
305 | 19 | sodipodi:docname="api-overview.svg" | ||
306 | 20 | inkscape:export-filename="/home/kiith-sa/Programming/stellarium/doc/images/api-overview.png" | ||
307 | 21 | inkscape:export-xdpi="90" | ||
308 | 22 | inkscape:export-ydpi="90"> | ||
309 | 23 | <defs | ||
310 | 24 | id="defs3267"> | ||
311 | 25 | <marker | ||
312 | 26 | inkscape:stockid="EmptyDiamondL" | ||
313 | 27 | orient="auto" | ||
314 | 28 | refY="0.0" | ||
315 | 29 | refX="0.0" | ||
316 | 30 | id="EmptyDiamondL" | ||
317 | 31 | style="overflow:visible"> | ||
318 | 32 | <path | ||
319 | 33 | id="path9879" | ||
320 | 34 | d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z " | ||
321 | 35 | style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt" | ||
322 | 36 | transform="scale(0.8)" /> | ||
323 | 37 | </marker> | ||
324 | 38 | <linearGradient | ||
325 | 39 | id="linearGradient9420" | ||
326 | 40 | osb:paint="solid"> | ||
327 | 41 | <stop | ||
328 | 42 | style="stop-color:#000000;stop-opacity:1;" | ||
329 | 43 | offset="0" | ||
330 | 44 | id="stop9422" /> | ||
331 | 45 | </linearGradient> | ||
332 | 46 | <linearGradient | ||
333 | 47 | id="linearGradient8650" | ||
334 | 48 | osb:paint="solid"> | ||
335 | 49 | <stop | ||
336 | 50 | style="stop-color:#000000;stop-opacity:1;" | ||
337 | 51 | offset="0" | ||
338 | 52 | id="stop8652" /> | ||
339 | 53 | </linearGradient> | ||
340 | 54 | <marker | ||
341 | 55 | inkscape:stockid="Tail" | ||
342 | 56 | orient="auto" | ||
343 | 57 | refY="0.0" | ||
344 | 58 | refX="0.0" | ||
345 | 59 | id="Tail" | ||
346 | 60 | style="overflow:visible"> | ||
347 | 61 | <g | ||
348 | 62 | id="g4852" | ||
349 | 63 | transform="scale(-1.2)"> | ||
350 | 64 | <path | ||
351 | 65 | id="path4854" | ||
352 | 66 | d="M -3.8048674,-3.9585227 L 0.54352094,0" | ||
353 | 67 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" /> | ||
354 | 68 | <path | ||
355 | 69 | id="path4856" | ||
356 | 70 | d="M -1.2866832,-3.9585227 L 3.0617053,0" | ||
357 | 71 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" /> | ||
358 | 72 | <path | ||
359 | 73 | id="path4858" | ||
360 | 74 | d="M 1.3053582,-3.9585227 L 5.6537466,0" | ||
361 | 75 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" /> | ||
362 | 76 | <path | ||
363 | 77 | id="path4860" | ||
364 | 78 | d="M -3.8048674,4.1775838 L 0.54352094,0.21974226" | ||
365 | 79 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" /> | ||
366 | 80 | <path | ||
367 | 81 | id="path4862" | ||
368 | 82 | d="M -1.2866832,4.1775838 L 3.0617053,0.21974226" | ||
369 | 83 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" /> | ||
370 | 84 | <path | ||
371 | 85 | id="path4864" | ||
372 | 86 | d="M 1.3053582,4.1775838 L 5.6537466,0.21974226" | ||
373 | 87 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" /> | ||
374 | 88 | </g> | ||
375 | 89 | </marker> | ||
376 | 90 | <marker | ||
377 | 91 | inkscape:stockid="EmptyTriangleInL" | ||
378 | 92 | orient="auto" | ||
379 | 93 | refY="0.0" | ||
380 | 94 | refX="0.0" | ||
381 | 95 | id="EmptyTriangleInL" | ||
382 | 96 | style="overflow:visible"> | ||
383 | 97 | <path | ||
384 | 98 | id="path4967" | ||
385 | 99 | d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " | ||
386 | 100 | style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt" | ||
387 | 101 | transform="scale(-0.8) translate(-6,0)" /> | ||
388 | 102 | </marker> | ||
389 | 103 | <marker | ||
390 | 104 | inkscape:stockid="EmptyTriangleOutL" | ||
391 | 105 | orient="auto" | ||
392 | 106 | refY="0.0" | ||
393 | 107 | refX="0.0" | ||
394 | 108 | id="EmptyTriangleOutL" | ||
395 | 109 | style="overflow:visible"> | ||
396 | 110 | <path | ||
397 | 111 | id="path4976" | ||
398 | 112 | d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " | ||
399 | 113 | style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt" | ||
400 | 114 | transform="scale(0.8) translate(-6,0)" /> | ||
401 | 115 | </marker> | ||
402 | 116 | <marker | ||
403 | 117 | inkscape:stockid="SemiCircleOut" | ||
404 | 118 | orient="auto" | ||
405 | 119 | refY="0.0" | ||
406 | 120 | refX="0.0" | ||
407 | 121 | id="SemiCircleOut" | ||
408 | 122 | style="overflow:visible"> | ||
409 | 123 | <path | ||
410 | 124 | id="path4997" | ||
411 | 125 | d="M -2.5,-0.80913858 C -2.5,1.9508614 -4.7400000,4.1908614 -7.5,4.1908614 L -7.5,-5.8091386 C -4.7400000,-5.8091386 -2.5,-3.5691386 -2.5,-0.80913858 z " | ||
412 | 126 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" | ||
413 | 127 | transform="scale(0.6) translate(7.125493,0.763446)" /> | ||
414 | 128 | </marker> | ||
415 | 129 | <marker | ||
416 | 130 | inkscape:stockid="CurveOut" | ||
417 | 131 | orient="auto" | ||
418 | 132 | refY="0.0" | ||
419 | 133 | refX="0.0" | ||
420 | 134 | id="CurveOut" | ||
421 | 135 | style="overflow:visible"> | ||
422 | 136 | <path | ||
423 | 137 | id="path5003" | ||
424 | 138 | d="M -5.4129913,-5.0456926 C -2.6529913,-5.0456926 -0.41299131,-2.8056926 -0.41299131,-0.045692580 C -0.41299131,2.7143074 -2.6529913,4.9543074 -5.4129913,4.9543074" | ||
425 | 139 | style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" | ||
426 | 140 | transform="scale(0.6)" /> | ||
427 | 141 | </marker> | ||
428 | 142 | <marker | ||
429 | 143 | inkscape:stockid="Scissors" | ||
430 | 144 | orient="auto" | ||
431 | 145 | refY="0.0" | ||
432 | 146 | refX="0.0" | ||
433 | 147 | id="Scissors" | ||
434 | 148 | style="overflow:visible"> | ||
435 | 149 | <path | ||
436 | 150 | id="schere" | ||
437 | 151 | d="M 9.0898857,-3.6061018 C 8.1198849,-4.7769976 6.3697607,-4.7358294 5.0623558,-4.2327734 L -3.1500488,-1.1548705 C -5.5383421,-2.4615840 -7.8983361,-2.0874077 -7.8983361,-2.7236578 C -7.8983361,-3.2209742 -7.4416699,-3.1119800 -7.5100293,-4.4068519 C -7.5756648,-5.6501286 -8.8736064,-6.5699315 -10.100428,-6.4884954 C -11.327699,-6.4958500 -12.599867,-5.5553341 -12.610769,-4.2584343 C -12.702194,-2.9520479 -11.603560,-1.7387447 -10.304005,-1.6532027 C -8.7816644,-1.4265411 -6.0857470,-2.3487593 -4.8210600,-0.082342643 C -5.7633447,1.6559151 -7.4350844,1.6607341 -8.9465707,1.5737277 C -10.201445,1.5014928 -11.708664,1.8611256 -12.307219,3.0945882 C -12.885586,4.2766744 -12.318421,5.9591904 -10.990470,6.3210002 C -9.6502788,6.8128279 -7.8098011,6.1912892 -7.4910978,4.6502760 C -7.2454393,3.4624530 -8.0864637,2.9043186 -7.7636052,2.4731223 C -7.5199917,2.1477623 -5.9728246,2.3362771 -3.2164999,1.0982979 L 5.6763468,4.2330688 C 6.8000164,4.5467672 8.1730685,4.5362646 9.1684433,3.4313614 L -0.051640930,-0.053722219 L 9.0898857,-3.6061018 z M -9.2179159,-5.5066058 C -7.9233569,-4.7838060 -8.0290767,-2.8230356 -9.3743431,-2.4433169 C -10.590861,-2.0196559 -12.145370,-3.2022863 -11.757521,-4.5207817 C -11.530373,-5.6026336 -10.104134,-6.0014137 -9.2179159,-5.5066058 z M -9.1616516,2.5107591 C -7.8108215,3.0096239 -8.0402087,5.2951947 -9.4138723,5.6023681 C -10.324932,5.9187072 -11.627422,5.4635705 -11.719569,4.3902287 C -11.897178,3.0851737 -10.363484,1.9060805 -9.1616516,2.5107591 z " | ||
438 | 152 | style="fill:#000000;" /> | ||
439 | 153 | </marker> | ||
440 | 154 | <marker | ||
441 | 155 | inkscape:stockid="Legs" | ||
442 | 156 | orient="auto" | ||
443 | 157 | refY="0.0" | ||
444 | 158 | refX="0.0" | ||
445 | 159 | id="Legs" | ||
446 | 160 | style="overflow:visible"> | ||
447 | 161 | <g | ||
448 | 162 | id="g5015" | ||
449 | 163 | transform="scale(-0.7)"> | ||
450 | 164 | <g | ||
451 | 165 | id="g5017" | ||
452 | 166 | transform="matrix(0,-1.000000,-1.000000,0,20.70862,21.31391)"> | ||
453 | 167 | <path | ||
454 | 168 | id="path5019" | ||
455 | 169 | d="M 21.221250,20.675360 C 14.311099,25.396517 18.766725,27.282204 15.380179,34.118595" | ||
456 | 170 | style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt" /> | ||
457 | 171 | <path | ||
458 | 172 | id="path5021" | ||
459 | 173 | d="M 21.398110,20.548120 C 20.037601,28.895644 24.934182,29.318060 25.903151,34.373078" | ||
460 | 174 | style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt" /> | ||
461 | 175 | </g> | ||
462 | 176 | <path | ||
463 | 177 | id="path5023" | ||
464 | 178 | d="M -14.090070,-6.7318716 L -15.012238,-2.6884886 L -11.049487,-3.9115586 L -14.090070,-6.7318716 z " | ||
465 | 179 | style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt" /> | ||
466 | 180 | <path | ||
467 | 181 | id="path5025" | ||
468 | 182 | d="M -15.215679,4.5567534 L -13.341552,8.2563664 L -11.074678,4.7835114 L -15.215679,4.5567534 z " | ||
469 | 183 | style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt" /> | ||
470 | 184 | </g> | ||
471 | 185 | </marker> | ||
472 | 186 | <marker | ||
473 | 187 | inkscape:stockid="CurveIn" | ||
474 | 188 | orient="auto" | ||
475 | 189 | refY="0.0" | ||
476 | 190 | refX="0.0" | ||
477 | 191 | id="CurveIn" | ||
478 | 192 | style="overflow:visible"> | ||
479 | 193 | <path | ||
480 | 194 | id="path5000" | ||
481 | 195 | d="M 4.6254930,-5.0456926 C 1.8654930,-5.0456926 -0.37450702,-2.8056926 -0.37450702,-0.045692580 C -0.37450702,2.7143074 1.8654930,4.9543074 4.6254930,4.9543074" | ||
482 | 196 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;fill:none" | ||
483 | 197 | transform="scale(0.6)" /> | ||
484 | 198 | </marker> | ||
485 | 199 | <marker | ||
486 | 200 | inkscape:stockid="EmptyDiamondLstart" | ||
487 | 201 | orient="auto" | ||
488 | 202 | refY="0.0" | ||
489 | 203 | refX="0.0" | ||
490 | 204 | id="EmptyDiamondLstart" | ||
491 | 205 | style="overflow:visible"> | ||
492 | 206 | <path | ||
493 | 207 | id="path4931" | ||
494 | 208 | d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z " | ||
495 | 209 | style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt" | ||
496 | 210 | transform="scale(0.8) translate(7,0)" /> | ||
497 | 211 | </marker> | ||
498 | 212 | <marker | ||
499 | 213 | inkscape:stockid="Arrow2Lstart" | ||
500 | 214 | orient="auto" | ||
501 | 215 | refY="0.0" | ||
502 | 216 | refX="0.0" | ||
503 | 217 | id="Arrow2Lstart" | ||
504 | 218 | style="overflow:visible"> | ||
505 | 219 | <path | ||
506 | 220 | id="path4834" | ||
507 | 221 | style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round" | ||
508 | 222 | d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " | ||
509 | 223 | transform="scale(1.1) translate(1,0)" /> | ||
510 | 224 | </marker> | ||
511 | 225 | <marker | ||
512 | 226 | inkscape:stockid="Arrow1Lstart" | ||
513 | 227 | orient="auto" | ||
514 | 228 | refY="0.0" | ||
515 | 229 | refX="0.0" | ||
516 | 230 | id="Arrow1Lstart" | ||
517 | 231 | style="overflow:visible"> | ||
518 | 232 | <path | ||
519 | 233 | id="path4816" | ||
520 | 234 | d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
521 | 235 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" | ||
522 | 236 | transform="scale(0.8) translate(12.5,0)" /> | ||
523 | 237 | </marker> | ||
524 | 238 | <marker | ||
525 | 239 | inkscape:stockid="Arrow1Lend" | ||
526 | 240 | orient="auto" | ||
527 | 241 | refY="0.0" | ||
528 | 242 | refX="0.0" | ||
529 | 243 | id="Arrow1Lend" | ||
530 | 244 | style="overflow:visible;"> | ||
531 | 245 | <path | ||
532 | 246 | id="path4819" | ||
533 | 247 | d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
534 | 248 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;" | ||
535 | 249 | transform="scale(0.8) rotate(180) translate(12.5,0)" /> | ||
536 | 250 | </marker> | ||
537 | 251 | </defs> | ||
538 | 252 | <sodipodi:namedview | ||
539 | 253 | id="base" | ||
540 | 254 | pagecolor="#ffffff" | ||
541 | 255 | bordercolor="#666666" | ||
542 | 256 | borderopacity="1.0" | ||
543 | 257 | inkscape:pageopacity="0.0" | ||
544 | 258 | inkscape:pageshadow="2" | ||
545 | 259 | inkscape:zoom="1.4142136" | ||
546 | 260 | inkscape:cx="611.81556" | ||
547 | 261 | inkscape:cy="403.85116" | ||
548 | 262 | inkscape:document-units="px" | ||
549 | 263 | inkscape:current-layer="layer1" | ||
550 | 264 | showgrid="true" | ||
551 | 265 | inkscape:window-width="2560" | ||
552 | 266 | inkscape:window-height="1385" | ||
553 | 267 | inkscape:window-x="-2" | ||
554 | 268 | inkscape:window-y="-3" | ||
555 | 269 | inkscape:window-maximized="1"> | ||
556 | 270 | <inkscape:grid | ||
557 | 271 | type="xygrid" | ||
558 | 272 | id="grid4630" | ||
559 | 273 | empspacing="5" | ||
560 | 274 | visible="true" | ||
561 | 275 | enabled="true" | ||
562 | 276 | snapvisiblegridlinesonly="true" /> | ||
563 | 277 | </sodipodi:namedview> | ||
564 | 278 | <metadata | ||
565 | 279 | id="metadata3270"> | ||
566 | 280 | <rdf:RDF> | ||
567 | 281 | <cc:Work | ||
568 | 282 | rdf:about=""> | ||
569 | 283 | <dc:format>image/svg+xml</dc:format> | ||
570 | 284 | <dc:type | ||
571 | 285 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
572 | 286 | <dc:title></dc:title> | ||
573 | 287 | </cc:Work> | ||
574 | 288 | </rdf:RDF> | ||
575 | 289 | </metadata> | ||
576 | 290 | <g | ||
577 | 291 | inkscape:label="Layer 1" | ||
578 | 292 | inkscape:groupmode="layer" | ||
579 | 293 | id="layer1" | ||
580 | 294 | transform="translate(0,-308.2677)"> | ||
581 | 295 | <rect | ||
582 | 296 | style="fill:#000000;fill-opacity:0.1254902" | ||
583 | 297 | id="rect8829" | ||
584 | 298 | width="1050" | ||
585 | 299 | height="570" | ||
586 | 300 | x="0" | ||
587 | 301 | y="482.36218" /> | ||
588 | 302 | <rect | ||
589 | 303 | style="fill:#00ff00;fill-opacity:0.1254902" | ||
590 | 304 | id="rect8771" | ||
591 | 305 | width="460" | ||
592 | 306 | height="120" | ||
593 | 307 | x="10" | ||
594 | 308 | y="522.36218" /> | ||
595 | 309 | <rect | ||
596 | 310 | style="fill:#00ff00;fill-opacity:0.1254902" | ||
597 | 311 | id="rect8773" | ||
598 | 312 | width="460" | ||
599 | 313 | height="30" | ||
600 | 314 | x="10" | ||
601 | 315 | y="522.36218" /> | ||
602 | 316 | <text | ||
603 | 317 | xml:space="preserve" | ||
604 | 318 | style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
605 | 319 | x="70" | ||
606 | 320 | y="549.36169" | ||
607 | 321 | id="text8775" | ||
608 | 322 | sodipodi:linespacing="125%"><tspan | ||
609 | 323 | sodipodi:role="line" | ||
610 | 324 | x="70" | ||
611 | 325 | y="549.36169" | ||
612 | 326 | id="tspan8779">Renderer API extensions</tspan></text> | ||
613 | 327 | <rect | ||
614 | 328 | id="rect7204" | ||
615 | 329 | width="1030" | ||
616 | 330 | height="390" | ||
617 | 331 | x="10" | ||
618 | 332 | y="652.36218" | ||
619 | 333 | style="fill:#0000ff;fill-opacity:0.1254902" /> | ||
620 | 334 | <rect | ||
621 | 335 | style="fill:#0000ff;fill-opacity:0.1254902" | ||
622 | 336 | id="rect8749" | ||
623 | 337 | width="1030" | ||
624 | 338 | height="30" | ||
625 | 339 | x="10" | ||
626 | 340 | y="652.36218" /> | ||
627 | 341 | <text | ||
628 | 342 | xml:space="preserve" | ||
629 | 343 | style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
630 | 344 | x="400" | ||
631 | 345 | y="679.36169" | ||
632 | 346 | id="text8751" | ||
633 | 347 | sodipodi:linespacing="125%"><tspan | ||
634 | 348 | sodipodi:role="line" | ||
635 | 349 | id="tspan8753" | ||
636 | 350 | x="400" | ||
637 | 351 | y="679.36169">Main Renderer API</tspan></text> | ||
638 | 352 | <g | ||
639 | 353 | id="g4775" | ||
640 | 354 | transform="translate(-290,280)"> | ||
641 | 355 | <rect | ||
642 | 356 | y="692.36218" | ||
643 | 357 | x="380" | ||
644 | 358 | height="30" | ||
645 | 359 | width="190" | ||
646 | 360 | id="rect4693" | ||
647 | 361 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
648 | 362 | <flowRoot | ||
649 | 363 | xml:space="preserve" | ||
650 | 364 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
651 | 365 | id="flowRoot8908"><flowRegion | ||
652 | 366 | id="flowRegion8910"><use | ||
653 | 367 | x="0" | ||
654 | 368 | y="0" | ||
655 | 369 | xlink:href="#rect4693" | ||
656 | 370 | id="use8912" | ||
657 | 371 | width="1052.3622" | ||
658 | 372 | height="744.09448" /></flowRegion><flowPara | ||
659 | 373 | id="flowPara8914">StelIndexBuffer</flowPara></flowRoot> </g> | ||
660 | 374 | <g | ||
661 | 375 | id="g4782" | ||
662 | 376 | transform="translate(320,170)"> | ||
663 | 377 | <rect | ||
664 | 378 | y="802.36218" | ||
665 | 379 | x="440" | ||
666 | 380 | height="30" | ||
667 | 381 | width="200" | ||
668 | 382 | id="rect4695" | ||
669 | 383 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
670 | 384 | <flowRoot | ||
671 | 385 | xml:space="preserve" | ||
672 | 386 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
673 | 387 | id="flowRoot8900"><flowRegion | ||
674 | 388 | id="flowRegion8902"><use | ||
675 | 389 | x="0" | ||
676 | 390 | y="0" | ||
677 | 391 | xlink:href="#rect4695" | ||
678 | 392 | id="use8904" | ||
679 | 393 | width="1052.3622" | ||
680 | 394 | height="744.09448" /></flowRegion><flowPara | ||
681 | 395 | id="flowPara8906">StelGLSLShader</flowPara></flowRoot> </g> | ||
682 | 396 | <g | ||
683 | 397 | id="g4789" | ||
684 | 398 | transform="translate(190,-130)"> | ||
685 | 399 | <rect | ||
686 | 400 | y="892.36218" | ||
687 | 401 | x="520" | ||
688 | 402 | height="30" | ||
689 | 403 | width="190" | ||
690 | 404 | id="rect4697" | ||
691 | 405 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
692 | 406 | <flowRoot | ||
693 | 407 | xml:space="preserve" | ||
694 | 408 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
695 | 409 | id="flowRoot8892"><flowRegion | ||
696 | 410 | id="flowRegion8894"><use | ||
697 | 411 | x="0" | ||
698 | 412 | y="0" | ||
699 | 413 | xlink:href="#rect4697" | ||
700 | 414 | id="use8896" | ||
701 | 415 | width="1052.3622" | ||
702 | 416 | height="744.09448" /></flowRegion><flowPara | ||
703 | 417 | id="flowPara8898">StelTextureNew</flowPara></flowRoot> </g> | ||
704 | 418 | <g | ||
705 | 419 | id="g4796" | ||
706 | 420 | transform="translate(-670,70)"> | ||
707 | 421 | <rect | ||
708 | 422 | y="492.36218" | ||
709 | 423 | x="770" | ||
710 | 424 | height="30" | ||
711 | 425 | width="260" | ||
712 | 426 | id="rect4699" | ||
713 | 427 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
714 | 428 | <flowRoot | ||
715 | 429 | xml:space="preserve" | ||
716 | 430 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
717 | 431 | id="flowRoot8951"><flowRegion | ||
718 | 432 | id="flowRegion8953"><use | ||
719 | 433 | x="0" | ||
720 | 434 | y="0" | ||
721 | 435 | xlink:href="#rect4699" | ||
722 | 436 | id="use8955" | ||
723 | 437 | width="1052.3622" | ||
724 | 438 | height="744.09448" /></flowRegion><flowPara | ||
725 | 439 | id="flowPara8957">StelGeometryBuilder</flowPara></flowRoot> </g> | ||
726 | 440 | <g | ||
727 | 441 | id="g4803" | ||
728 | 442 | transform="translate(-690,200)"> | ||
729 | 443 | <rect | ||
730 | 444 | y="402.36218" | ||
731 | 445 | x="790" | ||
732 | 446 | height="30" | ||
733 | 447 | width="270" | ||
734 | 448 | id="rect4701" | ||
735 | 449 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
736 | 450 | <flowRoot | ||
737 | 451 | xml:space="preserve" | ||
738 | 452 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
739 | 453 | id="flowRoot8916"><flowRegion | ||
740 | 454 | id="flowRegion8918"><use | ||
741 | 455 | x="0" | ||
742 | 456 | y="0" | ||
743 | 457 | xlink:href="#rect4701" | ||
744 | 458 | id="use8920" | ||
745 | 459 | width="1052.3622" | ||
746 | 460 | height="744.09448" /></flowRegion><flowPara | ||
747 | 461 | id="flowPara8922">StelCircleArcRenderer</flowPara></flowRoot> </g> | ||
748 | 462 | <g | ||
749 | 463 | id="g4761" | ||
750 | 464 | transform="translate(100,280)"> | ||
751 | 465 | <rect | ||
752 | 466 | y="432.36218" | ||
753 | 467 | x="340" | ||
754 | 468 | height="30" | ||
755 | 469 | width="160" | ||
756 | 470 | id="rect4751" | ||
757 | 471 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
758 | 472 | <flowRoot | ||
759 | 473 | xml:space="preserve" | ||
760 | 474 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
761 | 475 | id="flowRoot8876"><flowRegion | ||
762 | 476 | id="flowRegion8878"><use | ||
763 | 477 | x="0" | ||
764 | 478 | y="0" | ||
765 | 479 | xlink:href="#rect4751" | ||
766 | 480 | id="use8880" | ||
767 | 481 | width="1052.3622" | ||
768 | 482 | height="744.09448" /></flowRegion><flowPara | ||
769 | 483 | id="flowPara8882">StelRenderer</flowPara></flowRoot> </g> | ||
770 | 484 | <path | ||
771 | 485 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:none" | ||
772 | 486 | d="m 230,762.36218 0,-40 210,0" | ||
773 | 487 | id="path4810" | ||
774 | 488 | inkscape:connector-curvature="0" /> | ||
775 | 489 | <flowRoot | ||
776 | 490 | xml:space="preserve" | ||
777 | 491 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
778 | 492 | id="flowRoot8055" | ||
779 | 493 | transform="translate(20,158.1017)"><flowRegion | ||
780 | 494 | id="flowRegion8057"><use | ||
781 | 495 | x="0" | ||
782 | 496 | y="0" | ||
783 | 497 | xlink:href="#path4810" | ||
784 | 498 | id="use8059" | ||
785 | 499 | width="1052.3622" | ||
786 | 500 | height="744.09448" | ||
787 | 501 | transform="translate(-10,-154.0392)" /></flowRegion><flowPara | ||
788 | 502 | id="flowPara8061">constructs</flowPara></flowRoot> <path | ||
789 | 503 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 8;stroke-dashoffset:0;marker-start:url(#Arrow1Lstart);marker-end:none" | ||
790 | 504 | d="m 860,972.36218 0,-40 -330,0 0,-190 0,0" | ||
791 | 505 | id="path8283" | ||
792 | 506 | inkscape:connector-curvature="0" | ||
793 | 507 | sodipodi:nodetypes="ccccc" /> | ||
794 | 508 | <path | ||
795 | 509 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-mid:none;marker-end:url(#Arrow1Lend)" | ||
796 | 510 | d="m 600,722.36218 200,0 0,40" | ||
797 | 511 | id="path5668" | ||
798 | 512 | inkscape:connector-curvature="0" /> | ||
799 | 513 | <text | ||
800 | 514 | xml:space="preserve" | ||
801 | 515 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
802 | 516 | x="710" | ||
803 | 517 | y="742.36218" | ||
804 | 518 | id="text5670" | ||
805 | 519 | sodipodi:linespacing="125%"><tspan | ||
806 | 520 | sodipodi:role="line" | ||
807 | 521 | id="tspan5672" | ||
808 | 522 | x="710" | ||
809 | 523 | y="742.36218">constructs</tspan></text> | ||
810 | 524 | <text | ||
811 | 525 | xml:space="preserve" | ||
812 | 526 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
813 | 527 | x="420" | ||
814 | 528 | y="922.36218" | ||
815 | 529 | id="text5686" | ||
816 | 530 | sodipodi:linespacing="125%"><tspan | ||
817 | 531 | sodipodi:role="line" | ||
818 | 532 | x="420" | ||
819 | 533 | y="922.36218" | ||
820 | 534 | id="tspan5690">constructs</tspan></text> | ||
821 | 535 | <path | ||
822 | 536 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
823 | 537 | d="m 510,434.09448 0,190 -330,0 0,40" | ||
824 | 538 | id="path6987" | ||
825 | 539 | inkscape:connector-curvature="0" | ||
826 | 540 | transform="translate(0,308.2677)" | ||
827 | 541 | sodipodi:nodetypes="cccc" /> | ||
828 | 542 | <rect | ||
829 | 543 | style="fill:#000000;fill-opacity:0.1254902" | ||
830 | 544 | id="rect8852" | ||
831 | 545 | width="1050" | ||
832 | 546 | height="30" | ||
833 | 547 | x="0" | ||
834 | 548 | y="482.36218" /> | ||
835 | 549 | <text | ||
836 | 550 | xml:space="preserve" | ||
837 | 551 | style="font-size:32.00026321px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
838 | 552 | x="420.00293" | ||
839 | 553 | y="509.35849" | ||
840 | 554 | id="text8854" | ||
841 | 555 | sodipodi:linespacing="125%" | ||
842 | 556 | transform="scale(0.999993,1.000007)"><tspan | ||
843 | 557 | sodipodi:role="line" | ||
844 | 558 | x="420.00293" | ||
845 | 559 | y="509.35849" | ||
846 | 560 | id="tspan8858">Renderer API</tspan></text> | ||
847 | 561 | <g | ||
848 | 562 | id="g8943" | ||
849 | 563 | transform="translate(110,20)"> | ||
850 | 564 | <rect | ||
851 | 565 | y="742.36218" | ||
852 | 566 | x="20" | ||
853 | 567 | height="30" | ||
854 | 568 | width="200" | ||
855 | 569 | id="rect4659" | ||
856 | 570 | style="fill:#000000;fill-opacity:0.15686275" /> | ||
857 | 571 | <g | ||
858 | 572 | id="g8937"> | ||
859 | 573 | <flowRoot | ||
860 | 574 | xml:space="preserve" | ||
861 | 575 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
862 | 576 | id="flowRoot8929"><flowRegion | ||
863 | 577 | id="flowRegion8931"><use | ||
864 | 578 | x="0" | ||
865 | 579 | y="0" | ||
866 | 580 | xlink:href="#rect4659" | ||
867 | 581 | id="use8933" | ||
868 | 582 | width="1052.3622" | ||
869 | 583 | height="744.09448" /></flowRegion><flowPara | ||
870 | 584 | id="flowPara8935">StelVertexBuffer</flowPara></flowRoot> </g> | ||
871 | 585 | </g> | ||
872 | 586 | <path | ||
873 | 587 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
874 | 588 | d="m 470,274.09448 50,0 0,70" | ||
875 | 589 | id="path8978" | ||
876 | 590 | inkscape:connector-curvature="0" | ||
877 | 591 | transform="translate(0,308.2677)" /> | ||
878 | 592 | <text | ||
879 | 593 | xml:space="preserve" | ||
880 | 594 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
881 | 595 | x="480" | ||
882 | 596 | y="602.36218" | ||
883 | 597 | id="text9410" | ||
884 | 598 | sodipodi:linespacing="125%"><tspan | ||
885 | 599 | sodipodi:role="line" | ||
886 | 600 | x="480" | ||
887 | 601 | y="602.36218" | ||
888 | 602 | id="tspan9414">uses</tspan></text> | ||
889 | 603 | <rect | ||
890 | 604 | style="fill:#ffff00;fill-opacity:0.1254902;stroke:none" | ||
891 | 605 | id="rect9530" | ||
892 | 606 | width="1050" | ||
893 | 607 | height="120" | ||
894 | 608 | x="0" | ||
895 | 609 | y="312.36218" /> | ||
896 | 610 | <rect | ||
897 | 611 | style="fill:none;stroke:#000000;stroke-width:25.90816879000000128;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" | ||
898 | 612 | id="rect9418" | ||
899 | 613 | width="1024.092" | ||
900 | 614 | height="94.091827" | ||
901 | 615 | x="12.954084" | ||
902 | 616 | y="325.31625" /> | ||
903 | 617 | <flowRoot | ||
904 | 618 | xml:space="preserve" | ||
905 | 619 | style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
906 | 620 | id="flowRoot9544" | ||
907 | 621 | transform="translate(0,31.796903)"><flowRegion | ||
908 | 622 | id="flowRegion9546"><use | ||
909 | 623 | x="0" | ||
910 | 624 | y="0" | ||
911 | 625 | xlink:href="#rect9530" | ||
912 | 626 | id="use9548" | ||
913 | 627 | width="1052.3622" | ||
914 | 628 | height="744.09448" /></flowRegion><flowPara | ||
915 | 629 | id="flowPara9550">User code (plugins, modules, core)</flowPara></flowRoot> <path | ||
916 | 630 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
917 | 631 | d="m 520,124.09448 0,50" | ||
918 | 632 | id="path9552" | ||
919 | 633 | inkscape:connector-curvature="0" | ||
920 | 634 | transform="translate(0,308.2677)" /> | ||
921 | 635 | <text | ||
922 | 636 | xml:space="preserve" | ||
923 | 637 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
924 | 638 | x="530" | ||
925 | 639 | y="462.36218" | ||
926 | 640 | id="text10684" | ||
927 | 641 | sodipodi:linespacing="125%"><tspan | ||
928 | 642 | sodipodi:role="line" | ||
929 | 643 | x="530" | ||
930 | 644 | y="462.36218" | ||
931 | 645 | id="tspan10688">uses</tspan></text> | ||
932 | 646 | <text | ||
933 | 647 | xml:space="preserve" | ||
934 | 648 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
935 | 649 | x="540" | ||
936 | 650 | y="922.36218" | ||
937 | 651 | id="text10894" | ||
938 | 652 | sodipodi:linespacing="125%"><tspan | ||
939 | 653 | sodipodi:role="line" | ||
940 | 654 | id="tspan10896" | ||
941 | 655 | x="540" | ||
942 | 656 | y="922.36218">constructs (if isGLSLSupported() is true)</tspan></text> | ||
943 | 657 | </g> | ||
944 | 658 | </svg> | ||
945 | 0 | 659 | ||
946 | === added file 'doc/renderer-implementation-overview.svg' | |||
947 | --- doc/renderer-implementation-overview.svg 1970-01-01 00:00:00 +0000 | |||
948 | +++ doc/renderer-implementation-overview.svg 2012-08-30 16:29:19 +0000 | |||
949 | @@ -0,0 +1,835 @@ | |||
950 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
951 | 2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
952 | 3 | |||
953 | 4 | <svg | ||
954 | 5 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
955 | 6 | xmlns:cc="http://creativecommons.org/ns#" | ||
956 | 7 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
957 | 8 | xmlns:svg="http://www.w3.org/2000/svg" | ||
958 | 9 | xmlns="http://www.w3.org/2000/svg" | ||
959 | 10 | xmlns:xlink="http://www.w3.org/1999/xlink" | ||
960 | 11 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
961 | 12 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
962 | 13 | width="297mm" | ||
963 | 14 | height="210mm" | ||
964 | 15 | id="svg11050" | ||
965 | 16 | version="1.1" | ||
966 | 17 | inkscape:version="0.48.3.1 r9886" | ||
967 | 18 | sodipodi:docname="implementation-overview-2.svg"> | ||
968 | 19 | <defs | ||
969 | 20 | id="defs11052"> | ||
970 | 21 | <marker | ||
971 | 22 | inkscape:stockid="Arrow1Lstart" | ||
972 | 23 | orient="auto" | ||
973 | 24 | refY="0.0" | ||
974 | 25 | refX="0.0" | ||
975 | 26 | id="Arrow1Lstart" | ||
976 | 27 | style="overflow:visible"> | ||
977 | 28 | <path | ||
978 | 29 | id="path4071" | ||
979 | 30 | d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
980 | 31 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" | ||
981 | 32 | transform="scale(0.8) translate(12.5,0)" /> | ||
982 | 33 | </marker> | ||
983 | 34 | <marker | ||
984 | 35 | inkscape:stockid="Arrow2Lend" | ||
985 | 36 | orient="auto" | ||
986 | 37 | refY="0.0" | ||
987 | 38 | refX="0.0" | ||
988 | 39 | id="Arrow2Lend" | ||
989 | 40 | style="overflow:visible;"> | ||
990 | 41 | <path | ||
991 | 42 | id="path4092" | ||
992 | 43 | style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" | ||
993 | 44 | d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " | ||
994 | 45 | transform="scale(1.1) rotate(180) translate(1,0)" /> | ||
995 | 46 | </marker> | ||
996 | 47 | <marker | ||
997 | 48 | inkscape:stockid="Arrow1Mstart" | ||
998 | 49 | orient="auto" | ||
999 | 50 | refY="0.0" | ||
1000 | 51 | refX="0.0" | ||
1001 | 52 | id="Arrow1Mstart" | ||
1002 | 53 | style="overflow:visible"> | ||
1003 | 54 | <path | ||
1004 | 55 | id="path4077" | ||
1005 | 56 | d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
1006 | 57 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt" | ||
1007 | 58 | transform="scale(0.4) translate(10,0)" /> | ||
1008 | 59 | </marker> | ||
1009 | 60 | <marker | ||
1010 | 61 | inkscape:stockid="Arrow1Lend" | ||
1011 | 62 | orient="auto" | ||
1012 | 63 | refY="0.0" | ||
1013 | 64 | refX="0.0" | ||
1014 | 65 | id="Arrow1Lend" | ||
1015 | 66 | style="overflow:visible;"> | ||
1016 | 67 | <path | ||
1017 | 68 | id="path3885" | ||
1018 | 69 | d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " | ||
1019 | 70 | style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;" | ||
1020 | 71 | transform="scale(0.8) rotate(180) translate(12.5,0)" /> | ||
1021 | 72 | </marker> | ||
1022 | 73 | </defs> | ||
1023 | 74 | <sodipodi:namedview | ||
1024 | 75 | inkscape:document-units="mm" | ||
1025 | 76 | pagecolor="#ffffff" | ||
1026 | 77 | bordercolor="#666666" | ||
1027 | 78 | borderopacity="1.0" | ||
1028 | 79 | inkscape:pageopacity="0.0" | ||
1029 | 80 | inkscape:pageshadow="2" | ||
1030 | 81 | inkscape:zoom="1.2279853" | ||
1031 | 82 | inkscape:cx="380.33865" | ||
1032 | 83 | inkscape:cy="386.971" | ||
1033 | 84 | inkscape:current-layer="layer1" | ||
1034 | 85 | id="namedview11054" | ||
1035 | 86 | showgrid="false" | ||
1036 | 87 | units="mm" | ||
1037 | 88 | inkscape:window-width="2560" | ||
1038 | 89 | inkscape:window-height="1385" | ||
1039 | 90 | inkscape:window-x="-2" | ||
1040 | 91 | inkscape:window-y="-3" | ||
1041 | 92 | inkscape:window-maximized="1"> | ||
1042 | 93 | <inkscape:grid | ||
1043 | 94 | type="xygrid" | ||
1044 | 95 | id="grid11083" | ||
1045 | 96 | empspacing="5" | ||
1046 | 97 | visible="true" | ||
1047 | 98 | enabled="true" | ||
1048 | 99 | snapvisiblegridlinesonly="true" /> | ||
1049 | 100 | </sodipodi:namedview> | ||
1050 | 101 | <metadata | ||
1051 | 102 | id="metadata11056"> | ||
1052 | 103 | <rdf:RDF> | ||
1053 | 104 | <cc:Work | ||
1054 | 105 | rdf:about=""> | ||
1055 | 106 | <dc:format>image/svg+xml</dc:format> | ||
1056 | 107 | <dc:type | ||
1057 | 108 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
1058 | 109 | <dc:title></dc:title> | ||
1059 | 110 | </cc:Work> | ||
1060 | 111 | </rdf:RDF> | ||
1061 | 112 | </metadata> | ||
1062 | 113 | <g | ||
1063 | 114 | inkscape:label="Layer 1" | ||
1064 | 115 | inkscape:groupmode="layer" | ||
1065 | 116 | id="layer1"> | ||
1066 | 117 | <g | ||
1067 | 118 | id="g11633" | ||
1068 | 119 | transform="translate(160,270)"> | ||
1069 | 120 | <rect | ||
1070 | 121 | y="194.09448" | ||
1071 | 122 | x="250" | ||
1072 | 123 | height="30" | ||
1073 | 124 | width="230" | ||
1074 | 125 | id="rect11595" | ||
1075 | 126 | style="fill:#ff0000;fill-opacity:0.25098039;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" /> | ||
1076 | 127 | <flowRoot | ||
1077 | 128 | id="flowRoot11601" | ||
1078 | 129 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1079 | 130 | xml:space="preserve"><flowRegion | ||
1080 | 131 | id="flowRegion11603"><use | ||
1081 | 132 | id="use11605" | ||
1082 | 133 | xlink:href="#rect11595" | ||
1083 | 134 | y="0" | ||
1084 | 135 | x="0" | ||
1085 | 136 | width="1052.3622" | ||
1086 | 137 | height="744.09448" /></flowRegion><flowPara | ||
1087 | 138 | id="flowPara11607">StelQGL1Renderer</flowPara></flowRoot> </g> | ||
1088 | 139 | <g | ||
1089 | 140 | id="g11647" | ||
1090 | 141 | transform="translate(30,170)"> | ||
1091 | 142 | <rect | ||
1092 | 143 | y="84.094482" | ||
1093 | 144 | x="390" | ||
1094 | 145 | height="30" | ||
1095 | 146 | width="210" | ||
1096 | 147 | id="rect11085" | ||
1097 | 148 | style="fill:#ff0000;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1098 | 149 | <flowRoot | ||
1099 | 150 | id="flowRoot11617" | ||
1100 | 151 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1101 | 152 | xml:space="preserve"><flowRegion | ||
1102 | 153 | id="flowRegion11619"><use | ||
1103 | 154 | id="use11621" | ||
1104 | 155 | xlink:href="#rect11085" | ||
1105 | 156 | y="0" | ||
1106 | 157 | x="0" | ||
1107 | 158 | width="1052.3622" | ||
1108 | 159 | height="744.09448" /></flowRegion><flowPara | ||
1109 | 160 | id="flowPara11623">StelQGLRenderer</flowPara></flowRoot> </g> | ||
1110 | 161 | <g | ||
1111 | 162 | id="g11654" | ||
1112 | 163 | transform="translate(30,0)"> | ||
1113 | 164 | <rect | ||
1114 | 165 | y="24.094482" | ||
1115 | 166 | x="410" | ||
1116 | 167 | height="30" | ||
1117 | 168 | width="160" | ||
1118 | 169 | id="rect11599" | ||
1119 | 170 | style="fill:#ff0000;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1120 | 171 | <flowRoot | ||
1121 | 172 | id="flowRoot11625" | ||
1122 | 173 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1123 | 174 | xml:space="preserve"><flowRegion | ||
1124 | 175 | id="flowRegion11627"><use | ||
1125 | 176 | id="use11629" | ||
1126 | 177 | xlink:href="#rect11599" | ||
1127 | 178 | y="0" | ||
1128 | 179 | x="0" | ||
1129 | 180 | width="1052.3622" | ||
1130 | 181 | height="744.09448" /></flowRegion><flowPara | ||
1131 | 182 | id="flowPara11631">StelRenderer</flowPara></flowRoot> <path | ||
1132 | 183 | style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend);stroke-dashoffset:0;marker-start:none" | ||
1133 | 184 | d="m 520,54.094482 0,199.999998" | ||
1134 | 185 | id="path3108" | ||
1135 | 186 | inkscape:connector-curvature="0" | ||
1136 | 187 | transform="translate(-30,0)" /> | ||
1137 | 188 | <path | ||
1138 | 189 | style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1139 | 190 | d="m 630,274.09448 10,0 0,170 -120,0 0,20" | ||
1140 | 191 | id="path4883" | ||
1141 | 192 | inkscape:connector-curvature="0" | ||
1142 | 193 | transform="translate(-30,0)" | ||
1143 | 194 | sodipodi:nodetypes="ccccc" /> | ||
1144 | 195 | </g> | ||
1145 | 196 | <g | ||
1146 | 197 | id="g12057" | ||
1147 | 198 | transform="translate(-580,-200)"> | ||
1148 | 199 | <g | ||
1149 | 200 | id="g11923"> | ||
1150 | 201 | <rect | ||
1151 | 202 | style="fill:#00ff00;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" | ||
1152 | 203 | id="rect11874" | ||
1153 | 204 | width="200" | ||
1154 | 205 | height="30" | ||
1155 | 206 | x="590" | ||
1156 | 207 | y="264.09448" /> | ||
1157 | 208 | <g | ||
1158 | 209 | id="g11909"> | ||
1159 | 210 | <flowRoot | ||
1160 | 211 | id="flowRoot11901" | ||
1161 | 212 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1162 | 213 | xml:space="preserve"><flowRegion | ||
1163 | 214 | id="flowRegion11903"><use | ||
1164 | 215 | id="use11905" | ||
1165 | 216 | xlink:href="#rect11874" | ||
1166 | 217 | y="0" | ||
1167 | 218 | x="0" | ||
1168 | 219 | width="1052.3622" | ||
1169 | 220 | height="744.09448" /></flowRegion><flowPara | ||
1170 | 221 | id="flowPara11907">StelGLSLShader</flowPara></flowRoot> </g> | ||
1171 | 222 | </g> | ||
1172 | 223 | </g> | ||
1173 | 224 | <g | ||
1174 | 225 | id="g12066" | ||
1175 | 226 | transform="translate(-580,290)"> | ||
1176 | 227 | <rect | ||
1177 | 228 | y="324.09448" | ||
1178 | 229 | x="600" | ||
1179 | 230 | height="30" | ||
1180 | 231 | width="250" | ||
1181 | 232 | id="rect11876" | ||
1182 | 233 | style="fill:#00ff00;fill-opacity:0.25098039;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" /> | ||
1183 | 234 | <flowRoot | ||
1184 | 235 | id="flowRoot11931" | ||
1185 | 236 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1186 | 237 | xml:space="preserve"><flowRegion | ||
1187 | 238 | id="flowRegion11933"><use | ||
1188 | 239 | id="use11935" | ||
1189 | 240 | xlink:href="#rect11876" | ||
1190 | 241 | y="0" | ||
1191 | 242 | x="0" | ||
1192 | 243 | width="1052.3622" | ||
1193 | 244 | height="744.09448" /></flowRegion><flowPara | ||
1194 | 245 | id="flowPara11937">StelQGLGLSLShader</flowPara></flowRoot> </g> | ||
1195 | 246 | <g | ||
1196 | 247 | id="g12073" | ||
1197 | 248 | transform="translate(-10,-300)"> | ||
1198 | 249 | <rect | ||
1199 | 250 | y="364.09448" | ||
1200 | 251 | x="630" | ||
1201 | 252 | height="30" | ||
1202 | 253 | width="190" | ||
1203 | 254 | id="rect11878" | ||
1204 | 255 | style="fill:#00ffff;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1205 | 256 | <flowRoot | ||
1206 | 257 | id="flowRoot11939" | ||
1207 | 258 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1208 | 259 | xml:space="preserve"><flowRegion | ||
1209 | 260 | id="flowRegion11941"><use | ||
1210 | 261 | id="use11943" | ||
1211 | 262 | xlink:href="#rect11878" | ||
1212 | 263 | y="0" | ||
1213 | 264 | x="0" | ||
1214 | 265 | width="1052.3622" | ||
1215 | 266 | height="744.09448" /></flowRegion><flowPara | ||
1216 | 267 | id="flowPara11945">StelIndexBuffer</flowPara></flowRoot> </g> | ||
1217 | 268 | <g | ||
1218 | 269 | id="g12080" | ||
1219 | 270 | transform="translate(30,-100)"> | ||
1220 | 271 | <rect | ||
1221 | 272 | y="394.09448" | ||
1222 | 273 | x="620" | ||
1223 | 274 | height="30" | ||
1224 | 275 | width="240" | ||
1225 | 276 | id="rect11880" | ||
1226 | 277 | style="fill:#00ffff;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1227 | 278 | <flowRoot | ||
1228 | 279 | id="flowRoot11947" | ||
1229 | 280 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1230 | 281 | xml:space="preserve"><flowRegion | ||
1231 | 282 | id="flowRegion11949"><use | ||
1232 | 283 | id="use11951" | ||
1233 | 284 | xlink:href="#rect11880" | ||
1234 | 285 | y="0" | ||
1235 | 286 | x="0" | ||
1236 | 287 | width="1052.3622" | ||
1237 | 288 | height="744.09448" /></flowRegion><flowPara | ||
1238 | 289 | id="flowPara11953">StelQGLIndexBuffer</flowPara></flowRoot> </g> | ||
1239 | 290 | <g | ||
1240 | 291 | id="g12087" | ||
1241 | 292 | transform="translate(-400,-360)"> | ||
1242 | 293 | <rect | ||
1243 | 294 | y="424.09448" | ||
1244 | 295 | x="630" | ||
1245 | 296 | height="30" | ||
1246 | 297 | width="190" | ||
1247 | 298 | id="rect11882" | ||
1248 | 299 | style="fill:#0000ff;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1249 | 300 | <flowRoot | ||
1250 | 301 | id="flowRoot11955" | ||
1251 | 302 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1252 | 303 | xml:space="preserve"><flowRegion | ||
1253 | 304 | id="flowRegion11957"><use | ||
1254 | 305 | id="use11959" | ||
1255 | 306 | xlink:href="#rect11882" | ||
1256 | 307 | y="0" | ||
1257 | 308 | x="0" | ||
1258 | 309 | width="1052.3622" | ||
1259 | 310 | height="744.09448" /></flowRegion><flowPara | ||
1260 | 311 | id="flowPara11961">StelTextureNew</flowPara></flowRoot> </g> | ||
1261 | 312 | <g | ||
1262 | 313 | id="g12094" | ||
1263 | 314 | transform="translate(-440,-330)"> | ||
1264 | 315 | <rect | ||
1265 | 316 | y="474.09448" | ||
1266 | 317 | x="640" | ||
1267 | 318 | height="30" | ||
1268 | 319 | width="240" | ||
1269 | 320 | id="rect11884" | ||
1270 | 321 | style="fill:#0000ff;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1271 | 322 | <flowRoot | ||
1272 | 323 | id="flowRoot11963" | ||
1273 | 324 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1274 | 325 | xml:space="preserve"><flowRegion | ||
1275 | 326 | id="flowRegion11965"><use | ||
1276 | 327 | id="use11967" | ||
1277 | 328 | xlink:href="#rect11884" | ||
1278 | 329 | y="0" | ||
1279 | 330 | x="0" | ||
1280 | 331 | width="1052.3622" | ||
1281 | 332 | height="744.09448" /></flowRegion><flowPara | ||
1282 | 333 | id="flowPara11969">StelTextureBackend</flowPara></flowRoot> </g> | ||
1283 | 334 | <g | ||
1284 | 335 | id="g12101" | ||
1285 | 336 | transform="translate(-570,-250)"> | ||
1286 | 337 | <rect | ||
1287 | 338 | y="544.09448" | ||
1288 | 339 | x="680" | ||
1289 | 340 | height="30" | ||
1290 | 341 | width="290" | ||
1291 | 342 | id="rect11886" | ||
1292 | 343 | style="fill:#0000ff;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1293 | 344 | <flowRoot | ||
1294 | 345 | id="flowRoot11971" | ||
1295 | 346 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1296 | 347 | xml:space="preserve"><flowRegion | ||
1297 | 348 | id="flowRegion11973"><use | ||
1298 | 349 | id="use11975" | ||
1299 | 350 | xlink:href="#rect11886" | ||
1300 | 351 | y="0" | ||
1301 | 352 | x="0" | ||
1302 | 353 | width="1052.3622" | ||
1303 | 354 | height="744.09448" /></flowRegion><flowPara | ||
1304 | 355 | id="flowPara11977">StelQGLTextureBackend</flowPara></flowRoot> </g> | ||
1305 | 356 | <g | ||
1306 | 357 | id="g12108" | ||
1307 | 358 | transform="translate(630,-460)"> | ||
1308 | 359 | <g | ||
1309 | 360 | id="g12050"> | ||
1310 | 361 | <rect | ||
1311 | 362 | style="fill:#ffff00;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" | ||
1312 | 363 | id="rect11888" | ||
1313 | 364 | width="200" | ||
1314 | 365 | height="30" | ||
1315 | 366 | x="200" | ||
1316 | 367 | y="524.09448" /> | ||
1317 | 368 | <flowRoot | ||
1318 | 369 | xml:space="preserve" | ||
1319 | 370 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1320 | 371 | id="flowRoot11979"><flowRegion | ||
1321 | 372 | id="flowRegion11981"><use | ||
1322 | 373 | x="0" | ||
1323 | 374 | y="0" | ||
1324 | 375 | xlink:href="#rect11888" | ||
1325 | 376 | id="use11983" | ||
1326 | 377 | width="1052.3622" | ||
1327 | 378 | height="744.09448" /></flowRegion><flowPara | ||
1328 | 379 | id="flowPara11985">StelVertexBuffer</flowPara></flowRoot> </g> | ||
1329 | 380 | </g> | ||
1330 | 381 | <g | ||
1331 | 382 | id="g12043" | ||
1332 | 383 | transform="translate(270,-60)"> | ||
1333 | 384 | <rect | ||
1334 | 385 | y="394.09448" | ||
1335 | 386 | x="150" | ||
1336 | 387 | height="30" | ||
1337 | 388 | width="210" | ||
1338 | 389 | id="rect11872" | ||
1339 | 390 | style="fill:#ff6000;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1340 | 391 | <flowRoot | ||
1341 | 392 | id="flowRoot11987" | ||
1342 | 393 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1343 | 394 | xml:space="preserve"><flowRegion | ||
1344 | 395 | id="flowRegion11989"><use | ||
1345 | 396 | id="use11991" | ||
1346 | 397 | xlink:href="#rect11872" | ||
1347 | 398 | y="0" | ||
1348 | 399 | x="0" | ||
1349 | 400 | width="1052.3622" | ||
1350 | 401 | height="744.09448" /></flowRegion><flowPara | ||
1351 | 402 | id="flowPara11993">StelQGLViewport</flowPara></flowRoot> </g> | ||
1352 | 403 | <g | ||
1353 | 404 | id="g12116" | ||
1354 | 405 | transform="translate(510,-430)"> | ||
1355 | 406 | <rect | ||
1356 | 407 | y="574.09448" | ||
1357 | 408 | x="220" | ||
1358 | 409 | height="30" | ||
1359 | 410 | width="300" | ||
1360 | 411 | id="rect11893" | ||
1361 | 412 | style="fill:#ffff00;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1362 | 413 | <flowRoot | ||
1363 | 414 | id="flowRoot11995" | ||
1364 | 415 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1365 | 416 | xml:space="preserve"><flowRegion | ||
1366 | 417 | id="flowRegion11997"><use | ||
1367 | 418 | id="use11999" | ||
1368 | 419 | xlink:href="#rect11893" | ||
1369 | 420 | y="0" | ||
1370 | 421 | x="0" | ||
1371 | 422 | width="1052.3622" | ||
1372 | 423 | height="744.09448" /></flowRegion><flowPara | ||
1373 | 424 | id="flowPara12001">StelVertexBufferBackend</flowPara></flowRoot> </g> | ||
1374 | 425 | <g | ||
1375 | 426 | id="g12123" | ||
1376 | 427 | transform="translate(430,-260)"> | ||
1377 | 428 | <rect | ||
1378 | 429 | y="614.09448" | ||
1379 | 430 | x="250" | ||
1380 | 431 | height="30" | ||
1381 | 432 | width="350" | ||
1382 | 433 | id="rect11895" | ||
1383 | 434 | style="fill:#ffff00;fill-opacity:0.37647059;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" /> | ||
1384 | 435 | <flowRoot | ||
1385 | 436 | id="flowRoot12003" | ||
1386 | 437 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1387 | 438 | xml:space="preserve"><flowRegion | ||
1388 | 439 | id="flowRegion12005"><use | ||
1389 | 440 | id="use12007" | ||
1390 | 441 | xlink:href="#rect11895" | ||
1391 | 442 | y="0" | ||
1392 | 443 | x="0" | ||
1393 | 444 | width="1052.3622" | ||
1394 | 445 | height="744.09448" /></flowRegion><flowPara | ||
1395 | 446 | id="flowPara12009">StelQGLVertexBufferBackend</flowPara></flowRoot> </g> | ||
1396 | 447 | <g | ||
1397 | 448 | id="g12130" | ||
1398 | 449 | transform="translate(370,-150)"> | ||
1399 | 450 | <rect | ||
1400 | 451 | y="664.09448" | ||
1401 | 452 | x="290" | ||
1402 | 453 | height="30" | ||
1403 | 454 | width="370" | ||
1404 | 455 | id="rect11897" | ||
1405 | 456 | style="fill:#ffff00;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" /> | ||
1406 | 457 | <flowRoot | ||
1407 | 458 | id="flowRoot12011" | ||
1408 | 459 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1409 | 460 | xml:space="preserve"><flowRegion | ||
1410 | 461 | id="flowRegion12013"><use | ||
1411 | 462 | id="use12015" | ||
1412 | 463 | xlink:href="#rect11897" | ||
1413 | 464 | y="0" | ||
1414 | 465 | x="0" | ||
1415 | 466 | width="1052.3622" | ||
1416 | 467 | height="744.09448" /></flowRegion><flowPara | ||
1417 | 468 | id="flowPara12017">StelQGL1VertexBufferBackend</flowPara></flowRoot> </g> | ||
1418 | 469 | <g | ||
1419 | 470 | id="g12137" | ||
1420 | 471 | transform="translate(330,-90)"> | ||
1421 | 472 | <rect | ||
1422 | 473 | y="704.09448" | ||
1423 | 474 | x="330" | ||
1424 | 475 | height="30" | ||
1425 | 476 | width="370" | ||
1426 | 477 | id="rect11899" | ||
1427 | 478 | style="fill:#ffff00;fill-opacity:0.37647059;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" /> | ||
1428 | 479 | <flowRoot | ||
1429 | 480 | id="flowRoot12019" | ||
1430 | 481 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1431 | 482 | xml:space="preserve"><flowRegion | ||
1432 | 483 | id="flowRegion12021"><use | ||
1433 | 484 | id="use12023" | ||
1434 | 485 | xlink:href="#rect11899" | ||
1435 | 486 | y="0" | ||
1436 | 487 | x="0" | ||
1437 | 488 | width="1052.3622" | ||
1438 | 489 | height="744.09448" /></flowRegion><flowPara | ||
1439 | 490 | id="flowPara12025">StelQGL2VertexBufferBackend</flowPara></flowRoot> </g> | ||
1440 | 491 | <g | ||
1441 | 492 | id="g12217" | ||
1442 | 493 | transform="translate(0,-50)"> | ||
1443 | 494 | <rect | ||
1444 | 495 | y="614.09448" | ||
1445 | 496 | x="410" | ||
1446 | 497 | height="30" | ||
1447 | 498 | width="230" | ||
1448 | 499 | id="rect11597" | ||
1449 | 500 | style="fill:#ff0000;fill-opacity:0.25098039;stroke:#000000;stroke-width:0.97894502;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" /> | ||
1450 | 501 | <g | ||
1451 | 502 | id="g12211"> | ||
1452 | 503 | <flowRoot | ||
1453 | 504 | xml:space="preserve" | ||
1454 | 505 | style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1455 | 506 | id="flowRoot12203"><flowRegion | ||
1456 | 507 | id="flowRegion12205"><use | ||
1457 | 508 | x="0" | ||
1458 | 509 | y="0" | ||
1459 | 510 | xlink:href="#rect11597" | ||
1460 | 511 | id="use12207" | ||
1461 | 512 | width="1052.3622" | ||
1462 | 513 | height="744.09448" /></flowRegion><flowPara | ||
1463 | 514 | id="flowPara12209">StelQGL2Renderer</flowPara></flowRoot> </g> | ||
1464 | 515 | </g> | ||
1465 | 516 | <path | ||
1466 | 517 | style="fill:none;stroke:#ff0001;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1467 | 518 | d="m 420,274.09448 -10,0 0,180 -10,0 0,90 120,0 0,20" | ||
1468 | 519 | id="path5069" | ||
1469 | 520 | inkscape:connector-curvature="0" | ||
1470 | 521 | sodipodi:nodetypes="ccccccc" /> | ||
1471 | 522 | <path | ||
1472 | 523 | style="fill:none;stroke:#000000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1473 | 524 | d="m 410,584.09448 -270,0 0,30" | ||
1474 | 525 | id="path5255" | ||
1475 | 526 | inkscape:connector-curvature="0" | ||
1476 | 527 | sodipodi:nodetypes="ccc" /> | ||
1477 | 528 | <path | ||
1478 | 529 | style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1479 | 530 | d="m 310,174.09448 0,120" | ||
1480 | 531 | id="path5445" | ||
1481 | 532 | inkscape:connector-curvature="0" /> | ||
1482 | 533 | <path | ||
1483 | 534 | style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1484 | 535 | d="m 900,174.09448 0,180" | ||
1485 | 536 | id="path5635" | ||
1486 | 537 | inkscape:connector-curvature="0" | ||
1487 | 538 | sodipodi:nodetypes="cc" /> | ||
1488 | 539 | <path | ||
1489 | 540 | style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1490 | 541 | d="m 900,384.09448 0,130" | ||
1491 | 542 | id="path5823" | ||
1492 | 543 | inkscape:connector-curvature="0" | ||
1493 | 544 | sodipodi:nodetypes="cc" /> | ||
1494 | 545 | <path | ||
1495 | 546 | style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow1Lend)" | ||
1496 | 547 | d="m 1030,374.09448 10,0 0,220 -200,0 0,20" | ||
1497 | 548 | id="path6011" | ||
1498 | 549 | inkscape:connector-curvature="0" | ||
1499 | 550 | sodipodi:nodetypes="ccccc" /> | ||
1500 | 551 | <path | ||
1501 | 552 | style="fill:none;stroke:#ff0000;stroke-width:0.99921260000000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1502 | 553 | d="m 710,94.094482 0,199.999998" | ||
1503 | 554 | id="path6571" | ||
1504 | 555 | inkscape:connector-curvature="0" /> | ||
1505 | 556 | <path | ||
1506 | 557 | style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow1Lend)" | ||
1507 | 558 | d="m 190,94.094482 0,179.999998 -90,0 0,340" | ||
1508 | 559 | id="path6759" | ||
1509 | 560 | inkscape:connector-curvature="0" | ||
1510 | 561 | sodipodi:nodetypes="cccc" /> | ||
1511 | 562 | <path | ||
1512 | 563 | style="fill:none;stroke:#ff0000;stroke-width:0.99921260000000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1513 | 564 | d="m 20,704.09448 60,0" | ||
1514 | 565 | id="path7133" | ||
1515 | 566 | inkscape:connector-curvature="0" /> | ||
1516 | 567 | <path | ||
1517 | 568 | style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1518 | 569 | d="m 20,724.09448 60,0" | ||
1519 | 570 | id="path7321" | ||
1520 | 571 | inkscape:connector-curvature="0" /> | ||
1521 | 572 | <text | ||
1522 | 573 | xml:space="preserve" | ||
1523 | 574 | style="font-size:16.0001049px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1524 | 575 | x="89.99939" | ||
1525 | 576 | y="707.01392" | ||
1526 | 577 | id="text7509" | ||
1527 | 578 | sodipodi:linespacing="125%" | ||
1528 | 579 | transform="scale(1.0000065,0.99999346)"><tspan | ||
1529 | 580 | sodipodi:role="line" | ||
1530 | 581 | x="89.99939" | ||
1531 | 582 | y="707.01392" | ||
1532 | 583 | id="tspan7513">is parent class of</tspan></text> | ||
1533 | 584 | <text | ||
1534 | 585 | xml:space="preserve" | ||
1535 | 586 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1536 | 587 | x="90" | ||
1537 | 588 | y="727.00885" | ||
1538 | 589 | id="text7517" | ||
1539 | 590 | sodipodi:linespacing="125%"><tspan | ||
1540 | 591 | sodipodi:role="line" | ||
1541 | 592 | id="tspan7519" | ||
1542 | 593 | x="90" | ||
1543 | 594 | y="727.00885">constructs</tspan></text> | ||
1544 | 595 | <path | ||
1545 | 596 | style="fill:none;stroke:#0000ff;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1546 | 597 | d="m 250,704.09448 60,0" | ||
1547 | 598 | id="path7540" | ||
1548 | 599 | inkscape:connector-curvature="0" /> | ||
1549 | 600 | <path | ||
1550 | 601 | style="fill:none;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1551 | 602 | d="m 250,724.09448 60,0" | ||
1552 | 603 | id="path7728" | ||
1553 | 604 | inkscape:connector-curvature="0" /> | ||
1554 | 605 | <text | ||
1555 | 606 | xml:space="preserve" | ||
1556 | 607 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1557 | 608 | x="320" | ||
1558 | 609 | y="707.00928" | ||
1559 | 610 | id="text8288" | ||
1560 | 611 | sodipodi:linespacing="125%"><tspan | ||
1561 | 612 | sodipodi:role="line" | ||
1562 | 613 | x="320" | ||
1563 | 614 | y="707.00928" | ||
1564 | 615 | id="tspan8292">wraps (tight wrapper)</tspan></text> | ||
1565 | 616 | <text | ||
1566 | 617 | xml:space="preserve" | ||
1567 | 618 | style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1568 | 619 | x="320" | ||
1569 | 620 | y="727.00885" | ||
1570 | 621 | id="text8296" | ||
1571 | 622 | sodipodi:linespacing="125%"><tspan | ||
1572 | 623 | sodipodi:role="line" | ||
1573 | 624 | id="tspan8298" | ||
1574 | 625 | x="320" | ||
1575 | 626 | y="727.00885">includes (part of functionality separated into a class)</tspan></text> | ||
1576 | 627 | <path | ||
1577 | 628 | style="fill:none;stroke:#0000ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1578 | 629 | d="m 320,94.094482 0,49.999998" | ||
1579 | 630 | id="path8319" | ||
1580 | 631 | inkscape:connector-curvature="0" /> | ||
1581 | 632 | <path | ||
1582 | 633 | style="fill:none;stroke:#0000ff;stroke-width:0.99921260000000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1583 | 634 | d="m 920,94.094482 0,49.999998" | ||
1584 | 635 | id="path8507" | ||
1585 | 636 | inkscape:connector-curvature="0" /> | ||
1586 | 637 | <path | ||
1587 | 638 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)" | ||
1588 | 639 | d="m 640,584.09448 190,0 0,30" | ||
1589 | 640 | id="path8695" | ||
1590 | 641 | inkscape:connector-curvature="0" /> | ||
1591 | 642 | <path | ||
1592 | 643 | style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1593 | 644 | d="m 640,484.09448 190,0 0,30" | ||
1594 | 645 | id="path9069" | ||
1595 | 646 | inkscape:connector-curvature="0" /> | ||
1596 | 647 | <path | ||
1597 | 648 | style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1598 | 649 | d="m 420,264.09448 -40,0 0,30" | ||
1599 | 650 | id="path9259" | ||
1600 | 651 | inkscape:connector-curvature="0" /> | ||
1601 | 652 | <path | ||
1602 | 653 | style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)" | ||
1603 | 654 | d="m 630,264.09448 40,0 0,30" | ||
1604 | 655 | id="path9447" | ||
1605 | 656 | inkscape:connector-curvature="0" /> | ||
1606 | 657 | <path | ||
1607 | 658 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1608 | 659 | d="m 440,44.094482 -120,0 0,20" | ||
1609 | 660 | id="path9635" | ||
1610 | 661 | inkscape:connector-curvature="0" /> | ||
1611 | 662 | <path | ||
1612 | 663 | style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1613 | 664 | d="m 600,44.094482 320,0 0,20" | ||
1614 | 665 | id="path9823" | ||
1615 | 666 | inkscape:connector-curvature="0" /> | ||
1616 | 667 | <path | ||
1617 | 668 | style="fill:none;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)" | ||
1618 | 669 | d="m 520,284.09448 0,50" | ||
1619 | 670 | id="path10767" | ||
1620 | 671 | inkscape:connector-curvature="0" /> | ||
1621 | 672 | <path | ||
1622 | 673 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8,1;stroke-dashoffset:0;marker-end:none;marker-mid:none" | ||
1623 | 674 | d="m 0,4.0944824 1050,0" | ||
1624 | 675 | id="path12409" | ||
1625 | 676 | inkscape:connector-curvature="0" /> | ||
1626 | 677 | <path | ||
1627 | 678 | inkscape:connector-curvature="0" | ||
1628 | 679 | id="path12975" | ||
1629 | 680 | d="m 0,184.09448 1050,0" | ||
1630 | 681 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" /> | ||
1631 | 682 | <path | ||
1632 | 683 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" | ||
1633 | 684 | d="m 0,394.09448 1050,0" | ||
1634 | 685 | id="path12977" | ||
1635 | 686 | inkscape:connector-curvature="0" /> | ||
1636 | 687 | <path | ||
1637 | 688 | inkscape:connector-curvature="0" | ||
1638 | 689 | id="path12979" | ||
1639 | 690 | d="m 0,554.09448 1050,0" | ||
1640 | 691 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" /> | ||
1641 | 692 | <path | ||
1642 | 693 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" | ||
1643 | 694 | d="m 0,654.09448 1050,0" | ||
1644 | 695 | id="path12981" | ||
1645 | 696 | inkscape:connector-curvature="0" /> | ||
1646 | 697 | <path | ||
1647 | 698 | inkscape:connector-curvature="0" | ||
1648 | 699 | id="path12983" | ||
1649 | 700 | d="m 0,104.09448 1050,0" | ||
1650 | 701 | style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" /> | ||
1651 | 702 | <g | ||
1652 | 703 | id="g13106" | ||
1653 | 704 | transform="translate(-10,0.0657492)"> | ||
1654 | 705 | <rect | ||
1655 | 706 | y="654.09448" | ||
1656 | 707 | x="10" | ||
1657 | 708 | height="30" | ||
1658 | 709 | width="80" | ||
1659 | 710 | id="rect13005" | ||
1660 | 711 | style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" /> | ||
1661 | 712 | <flowRoot | ||
1662 | 713 | id="flowRoot13007" | ||
1663 | 714 | style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1664 | 715 | xml:space="preserve"><flowRegion | ||
1665 | 716 | id="flowRegion13009"><use | ||
1666 | 717 | id="use13011" | ||
1667 | 718 | xlink:href="#rect13005" | ||
1668 | 719 | y="0" | ||
1669 | 720 | x="0" | ||
1670 | 721 | width="1052.3622" | ||
1671 | 722 | height="744.09448" /></flowRegion><flowPara | ||
1672 | 723 | id="flowPara13013">Legend</flowPara></flowRoot> </g> | ||
1673 | 724 | <g | ||
1674 | 725 | id="g13099" | ||
1675 | 726 | transform="translate(-10,0.0657492)"> | ||
1676 | 727 | <rect | ||
1677 | 728 | y="554.09448" | ||
1678 | 729 | x="10" | ||
1679 | 730 | height="30" | ||
1680 | 731 | width="50" | ||
1681 | 732 | id="rect12997" | ||
1682 | 733 | style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" /> | ||
1683 | 734 | <flowRoot | ||
1684 | 735 | id="flowRoot13015" | ||
1685 | 736 | style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1686 | 737 | xml:space="preserve"><flowRegion | ||
1687 | 738 | id="flowRegion13017"><use | ||
1688 | 739 | id="use13019" | ||
1689 | 740 | xlink:href="#rect12997" | ||
1690 | 741 | y="0" | ||
1691 | 742 | x="0" | ||
1692 | 743 | width="1052.3622" | ||
1693 | 744 | height="744.09448" /></flowRegion><flowPara | ||
1694 | 745 | id="flowPara13021">GL2</flowPara></flowRoot> </g> | ||
1695 | 746 | <g | ||
1696 | 747 | id="g13092" | ||
1697 | 748 | transform="translate(-10,0)"> | ||
1698 | 749 | <rect | ||
1699 | 750 | y="394.09448" | ||
1700 | 751 | x="10" | ||
1701 | 752 | height="30" | ||
1702 | 753 | width="50" | ||
1703 | 754 | id="rect12993" | ||
1704 | 755 | style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" /> | ||
1705 | 756 | <flowRoot | ||
1706 | 757 | id="flowRoot13023" | ||
1707 | 758 | style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1708 | 759 | xml:space="preserve"><flowRegion | ||
1709 | 760 | id="flowRegion13025"><use | ||
1710 | 761 | id="use13027" | ||
1711 | 762 | xlink:href="#rect12993" | ||
1712 | 763 | y="0" | ||
1713 | 764 | x="0" | ||
1714 | 765 | width="1052.3622" | ||
1715 | 766 | height="744.09448" /></flowRegion><flowPara | ||
1716 | 767 | id="flowPara13029">GL1 </flowPara></flowRoot> </g> | ||
1717 | 768 | <g | ||
1718 | 769 | id="g13085" | ||
1719 | 770 | transform="translate(-10,0.0657492)"> | ||
1720 | 771 | <rect | ||
1721 | 772 | y="184.09448" | ||
1722 | 773 | x="10" | ||
1723 | 774 | height="30" | ||
1724 | 775 | width="130" | ||
1725 | 776 | id="rect12999" | ||
1726 | 777 | style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" /> | ||
1727 | 778 | <flowRoot | ||
1728 | 779 | id="flowRoot13031" | ||
1729 | 780 | style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1730 | 781 | xml:space="preserve"><flowRegion | ||
1731 | 782 | id="flowRegion13033"><use | ||
1732 | 783 | id="use13035" | ||
1733 | 784 | xlink:href="#rect12999" | ||
1734 | 785 | y="0" | ||
1735 | 786 | x="0" | ||
1736 | 787 | width="1052.3622" | ||
1737 | 788 | height="744.09448" /></flowRegion><flowPara | ||
1738 | 789 | id="flowPara13037">GL common</flowPara></flowRoot> </g> | ||
1739 | 790 | <g | ||
1740 | 791 | id="g13078" | ||
1741 | 792 | transform="translate(-10,0.0657492)"> | ||
1742 | 793 | <rect | ||
1743 | 794 | y="104.09448" | ||
1744 | 795 | x="10" | ||
1745 | 796 | height="30" | ||
1746 | 797 | width="180" | ||
1747 | 798 | id="rect13001" | ||
1748 | 799 | style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" /> | ||
1749 | 800 | <flowRoot | ||
1750 | 801 | id="flowRoot13039" | ||
1751 | 802 | style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1752 | 803 | xml:space="preserve"><flowRegion | ||
1753 | 804 | id="flowRegion13041"><use | ||
1754 | 805 | id="use13043" | ||
1755 | 806 | xlink:href="#rect13001" | ||
1756 | 807 | y="0" | ||
1757 | 808 | x="0" | ||
1758 | 809 | width="1052.3622" | ||
1759 | 810 | height="744.09448" /></flowRegion><flowPara | ||
1760 | 811 | id="flowPara13045">Abstract backend</flowPara></flowRoot> </g> | ||
1761 | 812 | <g | ||
1762 | 813 | id="g13071" | ||
1763 | 814 | transform="translate(-10,0.0657492)"> | ||
1764 | 815 | <rect | ||
1765 | 816 | y="4.0944824" | ||
1766 | 817 | x="10" | ||
1767 | 818 | height="30" | ||
1768 | 819 | width="40" | ||
1769 | 820 | id="rect13003" | ||
1770 | 821 | style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" /> | ||
1771 | 822 | <flowRoot | ||
1772 | 823 | id="flowRoot13047" | ||
1773 | 824 | style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans" | ||
1774 | 825 | xml:space="preserve"><flowRegion | ||
1775 | 826 | id="flowRegion13049"><use | ||
1776 | 827 | id="use13051" | ||
1777 | 828 | xlink:href="#rect13003" | ||
1778 | 829 | y="0" | ||
1779 | 830 | x="0" | ||
1780 | 831 | width="1052.3622" | ||
1781 | 832 | height="744.09448" /></flowRegion><flowPara | ||
1782 | 833 | id="flowPara13053">API</flowPara></flowRoot> </g> | ||
1783 | 834 | </g> | ||
1784 | 835 | </svg> | ||
1785 | 0 | 836 | ||
1786 | === added file 'doc/renderer.doxygen' | |||
1787 | --- doc/renderer.doxygen 1970-01-01 00:00:00 +0000 | |||
1788 | +++ doc/renderer.doxygen 2012-08-30 16:29:19 +0000 | |||
1789 | @@ -0,0 +1,421 @@ | |||
1790 | 1 | /* | ||
1791 | 2 | * Stellarium | ||
1792 | 3 | * Copyright (c) 2012 Ferdinand Majerech | ||
1793 | 4 | * | ||
1794 | 5 | * This program is free software; you can redistribute it and/or | ||
1795 | 6 | * modify it under the terms of the GNU General Public License | ||
1796 | 7 | * as published by the Free Software Foundation; either version 2 | ||
1797 | 8 | * of the License, or (at your option) any later version. | ||
1798 | 9 | * | ||
1799 | 10 | * This program is distributed in the hope that it will be useful, | ||
1800 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1801 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1802 | 13 | * GNU General Public License for more details. | ||
1803 | 14 | * | ||
1804 | 15 | * You should have received a copy of the GNU General Public License | ||
1805 | 16 | * along with this program; if not, write to the Free Software | ||
1806 | 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
1807 | 18 | */ | ||
1808 | 19 | |||
1809 | 20 | /*! | ||
1810 | 21 | |||
1811 | 22 | @page renderer Renderer | ||
1812 | 23 | |||
1813 | 24 | |||
1814 | 25 | |||
1815 | 26 | @section introduction Introduction | ||
1816 | 27 | |||
1817 | 28 | During Google Summer of Code 2012, graphics code was separated into a subsystem | ||
1818 | 29 | called Renderer (<code>src/core/renderer</code>). | ||
1819 | 30 | |||
1820 | 31 | Renderer is composed of interface classes abstracting away low-level graphics | ||
1821 | 32 | work, and backend classes either derived from or used by the interface classes. | ||
1822 | 33 | |||
1823 | 34 | This allows to change underlying implementation without rewriting drawing code. | ||
1824 | 35 | For example, we now have two sets of backend classes: GL1 and GL2. Which one | ||
1825 | 36 | us used is decided at startup without affecting drawing code. | ||
1826 | 37 | |||
1827 | 38 | |||
1828 | 39 | |||
1829 | 40 | @section outline API outline | ||
1830 | 41 | |||
1831 | 42 | @image html renderer-api-overview.png | ||
1832 | 43 | |||
1833 | 44 | @subsection stelrenderer StelRenderer | ||
1834 | 45 | |||
1835 | 46 | The central class of the Renderer subsystem is StelRenderer. It constructs | ||
1836 | 47 | other graphics classes (textures, vertex and index buffers, etc.) and sets | ||
1837 | 48 | graphics state (global color, depth test mode, etc.). It also handles drawing. | ||
1838 | 49 | There is always only one StelRenderer instance, though it's not a singleton (no | ||
1839 | 50 | global access). While the graphics classes are constructed by StelRenderer, | ||
1840 | 51 | it's the caller's responsibility to delete them. Also, they must be destroyed | ||
1841 | 52 | before StelRenderer (which is destroyed right before the program exits). | ||
1842 | 53 | |||
1843 | 54 | For example, to construct a texture (StelTextureNew), call | ||
1844 | 55 | StelRenderer::createTexture(), to construct a vertex buffer (StelVertexBuffer), | ||
1845 | 56 | call StelRenderer::createVertexBuffer(), and so on. | ||
1846 | 57 | |||
1847 | 58 | Handling construction of graphics classes in StelRenderer allows different | ||
1848 | 59 | backends (e.g. GL1, GL2) to construct their own implementations. | ||
1849 | 60 | |||
1850 | 61 | @subsection stelvertexbuffer StelVertexBuffer | ||
1851 | 62 | |||
1852 | 63 | StelVertexBuffer is a templated array-like container constructed by | ||
1853 | 64 | StelRenderer that stores vertices. A vertex is a struct specified by user | ||
1854 | 65 | through the template argument; it has to fulfill some requirements (see | ||
1855 | 66 | StelVertexBuffer documentation), e.g. it can't have data members that don't | ||
1856 | 67 | make sense in a vertex. Various vertex types are possible; vertex type | ||
1857 | 68 | specifies what attributes to use (position, texcoord, color, normal) as well as | ||
1858 | 69 | their dimensions. | ||
1859 | 70 | |||
1860 | 71 | Before drawing, a vertex buffer must be locked, allowing things like uploading | ||
1861 | 72 | vertices to the GPU. Vertex buffers are drawn using StelRenderer. If possible, | ||
1862 | 73 | they should be filled once, locked, and never unlocked again. Backend might | ||
1863 | 74 | then move the vertex data to the GPU, greatly improving performance even if | ||
1864 | 75 | some extra vertices are drawn. | ||
1865 | 76 | |||
1866 | 77 | @subsection stelindexbuffer StelIndexBuffer | ||
1867 | 78 | |||
1868 | 79 | Index buffers can be used with vertex buffers to specify which vertices to | ||
1869 | 80 | draw. For example, a vertex buffer containing a 2D grid might be used with | ||
1870 | 81 | many index buffers (one draw per index buffer), each specifying a row of the | ||
1871 | 82 | grid as a triangle strip. StelIndexBuffer API is similar to StelVertexBuffer, | ||
1872 | 83 | but it's not templated. There are 2 index types (specified at construction); | ||
1873 | 84 | 16bit and 32bit. 16bit is faster but only usable with with up to 65535 | ||
1874 | 85 | vertices. Again, the buffer must be locked before drawing, and it's best to | ||
1875 | 86 | keep it locked for a long time without modifications. | ||
1876 | 87 | |||
1877 | 88 | @subsection steltexturenew StelTextureNew | ||
1878 | 89 | |||
1879 | 90 | Textures are bound to texture units to be used in following draws. Textures | ||
1880 | 91 | are used only with vertex types that have texture coordinates. By default, only | ||
1881 | 92 | the texture bound to the first texture unit is drawn, interpreted as color. | ||
1882 | 93 | Shaders can also use other texture units and interpret the texture differently | ||
1883 | 94 | (as normals, specularity, etc.). | ||
1884 | 95 | |||
1885 | 96 | StelTextureNew is the interface class for textures. StelRenderer never fails to | ||
1886 | 97 | construct a texture, but the new texture might be in various states. If loading | ||
1887 | 98 | fails, the texture is in "Error" state, and, when bound, a placeholder texture | ||
1888 | 99 | is used instead. Depending on creation parameters, a texture might still be | ||
1889 | 100 | loading in background when constructed. It might even wait to start loading | ||
1890 | 101 | until the first time it's bound. In this case the placeholder is used until | ||
1891 | 102 | loading finishes. | ||
1892 | 103 | |||
1893 | 104 | @subsection stelglslshader StelGLSLShader | ||
1894 | 105 | |||
1895 | 106 | Shaders are programs running on the GPU that can override default graphics | ||
1896 | 107 | functionality. They are usually used for advanced effects such as normal | ||
1897 | 108 | mapping, shadows, and so on. Some backends (GL2) might draw everything with | ||
1898 | 109 | shaders internally, but default graphics functionality is unchanged. Graphics | ||
1899 | 110 | APIs have different shader languages; for OpenGL, GLSL is used. There is no | ||
1900 | 111 | simple way to abstract this behind a backend-independent interface, so instead | ||
1901 | 112 | of a generic "Shader" class, GLSL is used as an optional StelRenderer feature | ||
1902 | 113 | that might not be supported by a backend. If ever needed, support for HLSL | ||
1903 | 114 | (used by Direct3D) might be implemented in a similar way. | ||
1904 | 115 | |||
1905 | 116 | StelGLSLShader is a GLSL shader program class constructed by StelRenderer. The | ||
1906 | 117 | program is composed of vertex and fragment shaders, equivalent to .c files in | ||
1907 | 118 | a C program. There must be at least one vertex and one fragment shader. There | ||
1908 | 119 | might be more, which is useful for more complex shaders. There can only be one | ||
1909 | 120 | main() function for vertex shader and one for fragment shader. Shaders can be | ||
1910 | 121 | named, and enabled or disabled by name, allowing for exchangeable modules. | ||
1911 | 122 | |||
1912 | 123 | Vertex shaders run once per vertex while fragment shaders run at least once per | ||
1913 | 124 | pixel. Keep this in mind; a graphics scene might have 100000 vertices but it | ||
1914 | 125 | will likely have many more pixels, e.g. 1920x1080 is roughly 2000000 pixels. | ||
1915 | 126 | |||
1916 | 127 | Code using GLSL must be optional as the renderer might not support it. The code | ||
1917 | 128 | must first ask StelRenderer if GLSL is supported, if so, use the GLSL-based | ||
1918 | 129 | code, and otherwise use a fallback implemented without shaders. For | ||
1919 | 130 | non-essential effects, like shadows, disabling the effect without a fallback | ||
1920 | 131 | might be enough. | ||
1921 | 132 | |||
1922 | 133 | |||
1923 | 134 | @subsection extensions Renderer extension classes | ||
1924 | 135 | |||
1925 | 136 | Some graphics functionality is commonly used but can be implemented using | ||
1926 | 137 | existing Renderer API. Unless heavy optimizations are needed , this | ||
1927 | 138 | functionality should be built on top of other Renderer classes. I call this | ||
1928 | 139 | "extensions". The advantage of extensions is that they only depend on the | ||
1929 | 140 | public Renderer API, reducing work needed to be done in each backend. | ||
1930 | 141 | |||
1931 | 142 | An example is sphere drawing. While StelRenderer could have a "drawSphere" | ||
1932 | 143 | member function, adding such functions might result in a difficult to implement | ||
1933 | 144 | API. So instead we have a class that builds sphere vertex/index buffers using | ||
1934 | 145 | existing API. | ||
1935 | 146 | |||
1936 | 147 | Current extension classes are StelGeometryBuilder and StelCircleArcRenderer. | ||
1937 | 148 | The former builds vertex buffers with various geometry to be drawn. The latter | ||
1938 | 149 | draws circle arcs, used to display various lines in the sky with correct | ||
1939 | 150 | curvature. | ||
1940 | 151 | |||
1941 | 152 | |||
1942 | 153 | @section api_philosophy API design philosophy | ||
1943 | 154 | |||
1944 | 155 | Renderer is designed with five priorities, in this order: | ||
1945 | 156 | |||
1946 | 157 | <ol> | ||
1947 | 158 | <li> ease of use (code using Renderer) </li> | ||
1948 | 159 | <li> portability (ease of backend implementation) </li> | ||
1949 | 160 | <li> maintainability (avoid bug creep, avoid API breaking) </li> | ||
1950 | 161 | <li> speed (FPS) </li> | ||
1951 | 162 | <li> power (features) </li> | ||
1952 | 163 | </ol> | ||
1953 | 164 | |||
1954 | 165 | This is not absolute. Portability can trump ease of use; otherwise we'd use | ||
1955 | 166 | a plain GL2+ wrapper. Same is true for speed; otherwise we'd have an | ||
1956 | 167 | immediate mode style API. | ||
1957 | 168 | |||
1958 | 169 | Ease of use is rather obvious. Drawing code should be as simple as possible. | ||
1959 | 170 | While some graphics knowledge is required, we should not require mastery of | ||
1960 | 171 | OpenGL. | ||
1961 | 172 | |||
1962 | 173 | Portability matters as Stellarium runs not only on the PC OS's, but also on | ||
1963 | 174 | mobile platforms and maybe even some embedded systems. Getting a basic backend | ||
1964 | 175 | for a new platform to work should be a straightforward, one-week task. | ||
1965 | 176 | Eventually, Stellarium will need backends for OpenGL 4+ and OpenGL ES 3. | ||
1966 | 177 | A backend should not need to implement hundreds of functions. | ||
1967 | 178 | |||
1968 | 179 | Maintainability is close to portability. To be portable, an API should be | ||
1969 | 180 | simple, and a simple API will also be more maintainable. Features should not be | ||
1970 | 181 | added because they are cool; they should be added when needed. They should be | ||
1971 | 182 | well documented, both API and implementation. Documentation should include code | ||
1972 | 183 | examples if possible, and be updated immediately when a feature changes, not | ||
1973 | 184 | "when time allows it". Tests should be added when possible; we still need to | ||
1974 | 185 | improve this. Code should be simple first. Unless it absolutely needs to be | ||
1975 | 186 | powerful and/or optimized, it should be easy to read. 100-line functions are | ||
1976 | 187 | bad. 1000-line files are unacceptable. | ||
1977 | 188 | |||
1978 | 189 | Speed is important as Stellarium is a real-time app. It's not Crysis, so speed | ||
1979 | 190 | isn't the main priority, but it's not Crysis, so it shouldn't require high-end | ||
1980 | 191 | hardware. Old GPUs should work, as should modern integrated GPUs. With | ||
1981 | 192 | Stellarium's graphics it's viable to support mainstream hardware up to 10 years | ||
1982 | 193 | old. That said, speed often conflicts with maintainability. Optimization should | ||
1983 | 194 | only be done based on careful profiling and measurable gains. Adding 1000 | ||
1984 | 195 | lines to get 0.1 FPS will result in bugs and maybe even slowdown as code rots | ||
1985 | 196 | and hardware changes. | ||
1986 | 197 | |||
1987 | 198 | The API must be powerful to draw everything Stellarium needs. However, we | ||
1988 | 199 | don't compete in the demoscene; if not adding a feature Stellarium does not | ||
1989 | 200 | need will make the API simpler or more portable, we shouldn't add it. For | ||
1990 | 201 | example, StelRenderer depth buffer functionality doesn't match OpenGL; it only | ||
1991 | 202 | covers the cases we use (with a mechanism to add more if needed). This | ||
1992 | 203 | disallows creating some effects possible with OpenGL, but it is simpler, and | ||
1993 | 204 | much easier to emulate on a backend that does not support these particular | ||
1994 | 205 | OpenGL features. | ||
1995 | 206 | |||
1996 | 207 | |||
1997 | 208 | @section implementation Implementation | ||
1998 | 209 | |||
1999 | 210 | @subsection impl_overview Overview | ||
2000 | 211 | |||
2001 | 212 | @image html renderer-implementation-overview.png | ||
2002 | 213 | |||
2003 | 214 | Currently there are two Renderer backends: QGL1 and QGL2, based on OpenGL 1.1 | ||
2004 | 215 | and OpenGL 2.1 respectively. They use Qt's QGL classes for things like context | ||
2005 | 216 | management and texture upload. Code common for both versions, like some GL | ||
2006 | 217 | state, textures, viewport and vertex array manipulation, is shared between | ||
2007 | 218 | these, while code such as fixed-function/shaders and drawing is separate. | ||
2008 | 219 | |||
2009 | 220 | The QGL1 backend is designed for compatibility with old hardware; it doesn't | ||
2010 | 221 | usually use new features brought by extensions or later GL 1.x versions. It | ||
2011 | 222 | requires GL 1.1 for vertex array support. After Qt5 removes GL 1.x support this | ||
2012 | 223 | backend should still work as GL 2.x is backwards compatible with GL 1.x; but | ||
2013 | 224 | only on drivers that support GL 2.x . It provides better compatibility/speed | ||
2014 | 225 | for older GPUs and buggy drivers. | ||
2015 | 226 | |||
2016 | 227 | The QGL2 backend should use GL 2.1 to its fullest, and might even have | ||
2017 | 228 | optionally use features from GL 3.x and extensions, but never require them. An | ||
2018 | 229 | example is float texture support, which requires GL 3.0 . It's required for | ||
2019 | 230 | advanced effects such as shadows, and obviously for any GLSL based effects. | ||
2020 | 231 | It's also likely to be slower than the QGL1 backend. | ||
2021 | 232 | |||
2022 | 233 | |||
2023 | 234 | @subsection viewport StelQGLViewport | ||
2024 | 235 | |||
2025 | 236 | Manages the viewport. It handles capturing the screen to a texture, screenshots | ||
2026 | 237 | and so on. If FBOs are supported and not disabled, custom double buffering | ||
2027 | 238 | logic is used allowing to interrupt a frame in progress to increase | ||
2028 | 239 | responsiveness, finishing the drawing later. | ||
2029 | 240 | |||
2030 | 241 | @subsection vertexbufferbackend StelVertexBufferBackend and implementations | ||
2031 | 242 | |||
2032 | 243 | In C++, a templated function can never be virtual; so | ||
2033 | 244 | <strong>createVertexBuffer()</strong> functions of StelRenderer implementations | ||
2034 | 245 | can't construct objects derived from | ||
2035 | 246 | <strong>StelVertexBuffer<SomeVertexType></strong> . To work around this | ||
2036 | 247 | limitation without sacrificing its safe templated API StelVertexBuffer wraps | ||
2037 | 248 | a non-templated class, StelVertexBufferBackend, from which backend vertex | ||
2038 | 249 | buffers are derived. StelRenderer has an internal virtual function that allows | ||
2039 | 250 | its implementations to return a custom vertex buffer backend type. | ||
2040 | 251 | |||
2041 | 252 | StelVertexBufferBackend doesn't know the vertex type directly; it uses metadata | ||
2042 | 253 | from the VERTEX_ATTRIBUTES macro in the vertex type describing its layout and | ||
2043 | 254 | vertex attributes (data members). | ||
2044 | 255 | |||
2045 | 256 | Currently, only one vertex buffer backend exists; | ||
2046 | 257 | StelQGLArrayVertexBufferBackend, based on vertex arrays where each vertex | ||
2047 | 258 | attribute is in a separate array. GL version specific backends | ||
2048 | 259 | StelQGL1ArrayVertexBufferBackend and StelQGL2ArrayVertexBufferBackend, used by | ||
2049 | 260 | StelQGL1Renderer and StelQGL2Renderer respectively, derive from it, specifying | ||
2050 | 261 | drawing logic (fixed function for QGL1 and shaders for QGL2). | ||
2051 | 262 | |||
2052 | 263 | @subsection texturebackend StelTextureBackend and implementations | ||
2053 | 264 | |||
2054 | 265 | Like StelVertexBuffer, StelTextureNew wraps a backend class; | ||
2055 | 266 | StelTextureBackend, from which the each backend derives. The reason is not | ||
2056 | 267 | templating; the API class and backend are separate so the former is owned by | ||
2057 | 268 | user code, while the latter might be owned by the renderer backend. This | ||
2058 | 269 | allows for features like texture caching; deleting the frontend decreases | ||
2059 | 270 | a reference count of the backend in cache. Caching is used internally to avoid | ||
2060 | 271 | loading the same texture twice. If creating a texture from a previously loaded | ||
2061 | 272 | file we can return a cached texture instead, wrapping the same | ||
2062 | 273 | StelTextureBackend in a different StelTextureNew. Caching is not mandatory, so | ||
2063 | 274 | there might be backends that don't use it. | ||
2064 | 275 | |||
2065 | 276 | The only backend right now is StelQGLTextureBackend, used both for GL1 and GL2 | ||
2066 | 277 | (it's managed by StelQGLRenderer). It uses Qt functions to load textures with | ||
2067 | 278 | some exceptions like loading textures from raw data, when plain GL texture | ||
2068 | 279 | functions are used. | ||
2069 | 280 | |||
2070 | 281 | @subsection qglglslshader StelQGLGLSLShader | ||
2071 | 282 | |||
2072 | 283 | This is the shader backend used by StelQGL2Renderer. It uses QGL to manage | ||
2073 | 284 | shaders. All shaders added are stored in compiled form. When | ||
2074 | 285 | <strong>build()</strong> is called, enabled shaders are linked into a shader | ||
2075 | 286 | program, but the program is only bound inside StelQGL2Renderer's draw code. | ||
2076 | 287 | Linked programs are cached so we never link the same program twice. Any | ||
2077 | 288 | uniforms set are stored in temporary storage and only passed when the | ||
2078 | 289 | underlying program is bound. | ||
2079 | 290 | |||
2080 | 291 | @subsection rendererbackend StelQGLRenderer, StelQGL1Renderer, StelQGL2Renderer | ||
2081 | 292 | |||
2082 | 293 | The GL1 and GL2 backends share much code; this code is in the StelQGLRenderer | ||
2083 | 294 | class. This includes text and rectangle drawing, texture management, | ||
2084 | 295 | viewport (StelQGLViewport), and so on. | ||
2085 | 296 | |||
2086 | 297 | StelQGL1Renderer contains GL1 specific code. This is mostly pre-draw setup | ||
2087 | 298 | (drawing is done by StelQGL1ArrayVertexBufferBackend) and various GL1 specific | ||
2088 | 299 | state. | ||
2089 | 300 | |||
2090 | 301 | StelQGL2Renderer is more complicated. Along with functionality equivalent to | ||
2091 | 302 | StelQGL1Renderer, it also manages shaders. Especially important is swapping of | ||
2092 | 303 | default shaders, which emulate a simplified fixed function pipeline with | ||
2093 | 304 | specific vertex formats, and custom shaders specified by the user by binding | ||
2094 | 305 | a StelGLSLShader. | ||
2095 | 306 | |||
2096 | 307 | |||
2097 | 308 | @section implementation_philosophy Implementation philosophy | ||
2098 | 309 | |||
2099 | 310 | Implementation is usually secondary to the API (ease of use); it needs to work | ||
2100 | 311 | within its constraints. It's not acceptable to break the API just to make | ||
2101 | 312 | implementation a bit more convenient. The main priorities of the implementation | ||
2102 | 313 | are maintainability and speed. Portability is not much of a concern - we might | ||
2103 | 314 | e.g. have a Windows-only Direct3D implementation, as long as we have | ||
2104 | 315 | implementations to cover other platforms. Power and ease of use are determined | ||
2105 | 316 | by the API. | ||
2106 | 317 | |||
2107 | 318 | Maintainability is often in direct conflict with speed; highly optimized code | ||
2108 | 319 | is hard to maintain. There is one way we can deal with this; for any part of | ||
2109 | 320 | the subsystem, a simple and readable, not necessarily fast, implementation | ||
2110 | 321 | should exist. This can then be used as a reference when writing other | ||
2111 | 322 | implementations (for different platforms or for speed) and for testing. | ||
2112 | 323 | StelQGLArrayVertexBufferBackend, StelQGLIndexBuffer, StelQGLGLSLShader and | ||
2113 | 324 | StelQGLTextureBackend can be considered such references, but they could | ||
2114 | 325 | probably be simpler if they should serve exclusively this purpose. | ||
2115 | 326 | |||
2116 | 327 | We can also have implementations designed for speed, optimized as much as | ||
2117 | 328 | possible. For example, a vertex buffer implementation could internally switch | ||
2118 | 329 | between vertex arrays and VBOs based on last time the buffer was updated. | ||
2119 | 330 | Complexity is acceptable here as long as it brings speed gains. | ||
2120 | 331 | |||
2121 | 332 | The advantage of this approach is that we always have an implementation that | ||
2122 | 333 | works and is maintainable. Optimized implementations might be thrown out and | ||
2123 | 334 | replaced if maintainability is a problem, but we still have something that | ||
2124 | 335 | works. | ||
2125 | 336 | |||
2126 | 337 | |||
2127 | 338 | @section usage_patterns Why not singleton & Usage patterns | ||
2128 | 339 | |||
2129 | 340 | Unlike other core services, StelRenderer is not directly accessible through | ||
2130 | 341 | StelCore, nor is there any way to access it globally. Only one StelRenderer | ||
2131 | 342 | exists, but it's not a singleton. Drawing code usually gets a StelRenderer | ||
2132 | 343 | through a parameter. This has more to do with maintainability than ease of | ||
2133 | 344 | use; a globally accessible StelRenderer might be easier to use, removing need | ||
2134 | 345 | for lazy initialization. | ||
2135 | 346 | |||
2136 | 347 | Initialization and destruction of StelRenderer backend happens at well defined | ||
2137 | 348 | times and when a StelRenderer pointer is passed to drawing code, it's | ||
2138 | 349 | guaranteed to be initialized. Graphics accessing a StelRenderer globally might | ||
2139 | 350 | end up using an uninitialized StelRenderer, or, if it was a lazily initialized | ||
2140 | 351 | singleton, trigger premature initialization. | ||
2141 | 352 | |||
2142 | 353 | In future Renderer could be enhanced to allow switching backends | ||
2143 | 354 | post-initialization, even for single frames (e.g. export to document formats). | ||
2144 | 355 | This would be more complicated with a global renderer, although the main | ||
2145 | 356 | problem here is different - allowing API objects constructed by one renderer to | ||
2146 | 357 | work with another. | ||
2147 | 358 | |||
2148 | 359 | Finally, the main reason why StelRenderer is not globally accessible is making | ||
2149 | 360 | any future (however distant) major rewrites less complicated. Refactoring | ||
2150 | 361 | previous drawing code was made difficult by circular dependencies of various | ||
2151 | 362 | parts of code; not in the "include" sense, but in "classes using each other" | ||
2152 | 363 | sense. There was no clear point to start - many things had to be refactored | ||
2153 | 364 | simultaneously. Removing global accessibility makes dependencies more similar | ||
2154 | 365 | to a directed acyclic graph and there are clear points to start changes. | ||
2155 | 366 | |||
2156 | 367 | The disadvantage of a non-global StelRenderer is that we can't access it when | ||
2157 | 368 | initializing drawing code (unless it's explicitly passed). I.e. we can't load | ||
2158 | 369 | our textures when a class using StelRenderer is constructed. However, we don't | ||
2159 | 370 | need to initialize at construction; we only need the drawing objects to be | ||
2160 | 371 | ready before drawing. We can initialize them lazily. One way to do this is | ||
2161 | 372 | initializing drawing data in a function called during the first draw,setting an | ||
2162 | 373 | "initialized" flag, and only letting destructor destroy this data if this flag | ||
2163 | 374 | is set. This is less convenient, but it might actually improve performance as | ||
2164 | 375 | we only initialize drawing data once we need it. | ||
2165 | 376 | |||
2166 | 377 | |||
2167 | 378 | @section future Future development | ||
2168 | 379 | |||
2169 | 380 | |||
2170 | 381 | The Renderer API is quite complete and should be sufficient for some time; | ||
2171 | 382 | especially the shader support can be used for various new graphics features. | ||
2172 | 383 | However, backend performance, especially the GL2 backend, leaves something to | ||
2173 | 384 | be desired. Also, now that all drawing is separated, new debugging and | ||
2174 | 385 | profiling features are possible. | ||
2175 | 386 | |||
2176 | 387 | One near-term goal is collection of statistics about the backend's operation. | ||
2177 | 388 | We should be able to collect data about things such as the number of calls of | ||
2178 | 389 | specific functions per frame, triangles/vertices/indices per frame, underlying | ||
2179 | 390 | OpenGL draw calls, state changes, etc. . In combination with profiling data | ||
2180 | 391 | this should make finding bottlenecks easier. More importantly, it should help | ||
2181 | 392 | find inefficiencies in user code, such as plugins, and help plugin authors | ||
2182 | 393 | improve performance of their code. | ||
2183 | 394 | |||
2184 | 395 | Currently, Renderer backend classes are implemented in a mostly straightforward | ||
2185 | 396 | way. We should be able to improve performance by optimizing or adding | ||
2186 | 397 | alternative high-performance backends. | ||
2187 | 398 | |||
2188 | 399 | A major optimization would be a VBO (vertex buffer object) vertex buffer | ||
2189 | 400 | backend. With VBOs, vertex data is in GPU memory, freeing the bus. This can | ||
2190 | 401 | result in massive performance increase, even an order of magnitude. As the data | ||
2191 | 402 | must be stored on the GPU instead of being permanently re-uploaded, this is | ||
2192 | 403 | only useful if we have a lot of graphics data that never changes. Otherwise | ||
2193 | 404 | performance is likely to drop instead of increasing. Right now VBOs could help | ||
2194 | 405 | with things like planets and models, but the majority of drawing is done by | ||
2195 | 406 | StelSkyDrawer (point sources, mostly stars), where vertex data is regenerated | ||
2196 | 407 | every frame. Rewriting some StelSkyDrawer users, especially | ||
2197 | 408 | BigStarCatalogExtension::ZoneArray, to use static vertex buffers initialized | ||
2198 | 409 | once and never modified, would result in more vertices per frame, but it might | ||
2199 | 410 | make VBOs viable which would likely bring massive performance boost. Other | ||
2200 | 411 | work currently done on the CPU, such as vertex projection, would also have to | ||
2201 | 412 | be done on GPU (this is already done for stereographic projection). | ||
2202 | 413 | |||
2203 | 414 | A non-essential, but useful future addition would be the ability to switch | ||
2204 | 415 | backends at any time. This would require all StelRenderer constructed classes | ||
2205 | 416 | to have separate frontend and backend objects, as StelVertexBuffer and | ||
2206 | 417 | StelTextureNew already have, and the frontends would need to store all data | ||
2207 | 418 | needed to reconstruct the backends - probably duplicating a lot of data. If | ||
2208 | 419 | a StelRenderer backend would be passed an object constructed by a different | ||
2209 | 420 | backend, it would delete the object's backend and replace it with its own. | ||
2210 | 421 | */ | ||
2211 | 0 | 422 | ||
2212 | === modified file 'doc/scripting.doxygen' | |||
2213 | --- doc/scripting.doxygen 2012-03-16 22:11:30 +0000 | |||
2214 | +++ doc/scripting.doxygen 2012-08-30 16:29:19 +0000 | |||
2215 | @@ -29,7 +29,7 @@ | |||
2216 | 29 | This makes it possible to write small programs within Stellarium to produce | 29 | This makes it possible to write small programs within Stellarium to produce |
2217 | 30 | presentations, set up custom configurations, and to automate repetitive | 30 | presentations, set up custom configurations, and to automate repetitive |
2218 | 31 | tasks. Prior to version 0.10.0, Stellarium used a different scripting engine | 31 | tasks. Prior to version 0.10.0, Stellarium used a different scripting engine |
2220 | 32 | called @ref StratoScript. | 32 | called @ref stratoscript. |
2221 | 33 | 33 | ||
2222 | 34 | The core scripting language is | 34 | The core scripting language is |
2223 | 35 | <a href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a>, giving users | 35 | <a href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a>, giving users |
2224 | @@ -38,7 +38,7 @@ | |||
2225 | 38 | is done via a collection of objects which represent components of Stellarium | 38 | is done via a collection of objects which represent components of Stellarium |
2226 | 39 | itself. See @ref scripting_api for more details. | 39 | itself. See @ref scripting_api for more details. |
2227 | 40 | 40 | ||
2229 | 41 | @section scratoscript StratoScript | 41 | @section stratoscript StratoScript |
2230 | 42 | 42 | ||
2231 | 43 | Prior to version 0.10.0, Stellarium had a simple scripting engine, known as | 43 | Prior to version 0.10.0, Stellarium had a simple scripting engine, known as |
2232 | 44 | \e StratoScript. Using \e StratoScript it was possible to record and play back | 44 | \e StratoScript. Using \e StratoScript it was possible to record and play back |
2233 | 45 | 45 | ||
2234 | === modified file 'doc/stellarium-architecture.svg' | |||
2235 | --- doc/stellarium-architecture.svg 2010-04-18 21:16:11 +0000 | |||
2236 | +++ doc/stellarium-architecture.svg 2012-08-30 16:29:19 +0000 | |||
2237 | @@ -13,7 +13,7 @@ | |||
2238 | 13 | height="744.09448" | 13 | height="744.09448" |
2239 | 14 | id="svg2" | 14 | id="svg2" |
2240 | 15 | sodipodi:version="0.32" | 15 | sodipodi:version="0.32" |
2242 | 16 | inkscape:version="0.47pre4 r22446" | 16 | inkscape:version="0.48.3.1 r9886" |
2243 | 17 | version="1.0" | 17 | version="1.0" |
2244 | 18 | sodipodi:docname="stellarium-architecture.svg" | 18 | sodipodi:docname="stellarium-architecture.svg" |
2245 | 19 | inkscape:output_extension="org.inkscape.output.svg.inkscape" | 19 | inkscape:output_extension="org.inkscape.output.svg.inkscape" |
2246 | @@ -135,12 +135,12 @@ | |||
2247 | 135 | inkscape:current-layer="layer1" | 135 | inkscape:current-layer="layer1" |
2248 | 136 | width="1052.3622px" | 136 | width="1052.3622px" |
2249 | 137 | height="744.09448px" | 137 | height="744.09448px" |
2254 | 138 | inkscape:window-width="1274" | 138 | inkscape:window-width="2560" |
2255 | 139 | inkscape:window-height="751" | 139 | inkscape:window-height="1385" |
2256 | 140 | inkscape:window-x="0" | 140 | inkscape:window-x="-2" |
2257 | 141 | inkscape:window-y="0" | 141 | inkscape:window-y="-3" |
2258 | 142 | showgrid="false" | 142 | showgrid="false" |
2260 | 143 | inkscape:window-maximized="0" /> | 143 | inkscape:window-maximized="1" /> |
2261 | 144 | <metadata | 144 | <metadata |
2262 | 145 | id="metadata7"> | 145 | id="metadata7"> |
2263 | 146 | <rdf:RDF> | 146 | <rdf:RDF> |
2264 | @@ -149,7 +149,7 @@ | |||
2265 | 149 | <dc:format>image/svg+xml</dc:format> | 149 | <dc:format>image/svg+xml</dc:format> |
2266 | 150 | <dc:type | 150 | <dc:type |
2267 | 151 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | 151 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
2269 | 152 | <dc:title></dc:title> | 152 | <dc:title /> |
2270 | 153 | </cc:Work> | 153 | </cc:Work> |
2271 | 154 | </rdf:RDF> | 154 | </rdf:RDF> |
2272 | 155 | </metadata> | 155 | </metadata> |
2273 | @@ -189,66 +189,61 @@ | |||
2274 | 189 | sodipodi:role="line" | 189 | sodipodi:role="line" |
2275 | 190 | x="77.209961" | 190 | x="77.209961" |
2276 | 191 | y="454.34995" | 191 | y="454.34995" |
2279 | 192 | id="tspan3142" | 192 | id="tspan3144" |
2280 | 193 | style="font-size:16px">StelTextureMgr</tspan><tspan | 193 | style="font-size:16px">StelRenderer</tspan><tspan |
2281 | 194 | sodipodi:role="line" | 194 | sodipodi:role="line" |
2282 | 195 | x="77.209961" | 195 | x="77.209961" |
2283 | 196 | y="474.34995" | 196 | y="474.34995" |
2284 | 197 | id="tspan3144" | ||
2285 | 198 | style="font-size:16px">StelFontMgr</tspan><tspan | ||
2286 | 199 | sodipodi:role="line" | ||
2287 | 200 | x="77.209961" | ||
2288 | 201 | y="494.34995" | ||
2289 | 202 | id="tspan3146" | 197 | id="tspan3146" |
2290 | 203 | style="font-size:16px">StelFileMgr</tspan><tspan | 198 | style="font-size:16px">StelFileMgr</tspan><tspan |
2291 | 204 | sodipodi:role="line" | 199 | sodipodi:role="line" |
2292 | 205 | x="77.209961" | 200 | x="77.209961" |
2294 | 206 | y="514.34998" | 201 | y="494.34995" |
2295 | 207 | id="tspan3148" | 202 | id="tspan3148" |
2296 | 208 | style="font-size:16px">StelLocaleMgr</tspan><tspan | 203 | style="font-size:16px">StelLocaleMgr</tspan><tspan |
2297 | 209 | sodipodi:role="line" | 204 | sodipodi:role="line" |
2298 | 210 | x="77.209961" | 205 | x="77.209961" |
2299 | 206 | y="514.34998" | ||
2300 | 207 | style="font-size:16px" | ||
2301 | 208 | id="tspan10494">StelAudioMgr</tspan><tspan | ||
2302 | 209 | sodipodi:role="line" | ||
2303 | 210 | x="77.209961" | ||
2304 | 211 | y="534.34998" | 211 | y="534.34998" |
2305 | 212 | style="font-size:16px" | 212 | style="font-size:16px" |
2307 | 213 | id="tspan10494">StelAudioMgr</tspan><tspan | 213 | id="tspan10498">StelSkyLayerMgr</tspan><tspan |
2308 | 214 | sodipodi:role="line" | 214 | sodipodi:role="line" |
2309 | 215 | x="77.209961" | 215 | x="77.209961" |
2310 | 216 | y="554.34998" | 216 | y="554.34998" |
2311 | 217 | style="font-size:16px" | 217 | style="font-size:16px" |
2313 | 218 | id="tspan10498">StelSkyImageMgr</tspan><tspan | 218 | id="tspan10486">StelModuleMgr</tspan><tspan |
2314 | 219 | sodipodi:role="line" | 219 | sodipodi:role="line" |
2315 | 220 | x="77.209961" | 220 | x="77.209961" |
2316 | 221 | y="574.34998" | 221 | y="574.34998" |
2317 | 222 | style="font-size:16px" | ||
2318 | 223 | id="tspan10486">StelModuleMgr</tspan><tspan | ||
2319 | 224 | sodipodi:role="line" | ||
2320 | 225 | x="77.209961" | ||
2321 | 226 | y="594.34998" | ||
2322 | 227 | id="tspan3152" | 222 | id="tspan3152" |
2323 | 228 | style="font-size:16px">StelSkyCultureMgr</tspan><tspan | 223 | style="font-size:16px">StelSkyCultureMgr</tspan><tspan |
2324 | 229 | sodipodi:role="line" | 224 | sodipodi:role="line" |
2325 | 230 | x="77.209961" | 225 | x="77.209961" |
2326 | 226 | y="594.34998" | ||
2327 | 227 | style="font-size:16px" | ||
2328 | 228 | id="tspan11513">StelObjectMgr</tspan><tspan | ||
2329 | 229 | sodipodi:role="line" | ||
2330 | 230 | x="77.209961" | ||
2331 | 231 | y="614.34998" | 231 | y="614.34998" |
2332 | 232 | style="font-size:16px" | 232 | style="font-size:16px" |
2334 | 233 | id="tspan11513">StelObjectMgr</tspan><tspan | 233 | id="tspan2609">StelDownloadMgr</tspan><tspan |
2335 | 234 | sodipodi:role="line" | 234 | sodipodi:role="line" |
2336 | 235 | x="77.209961" | 235 | x="77.209961" |
2337 | 236 | y="634.34998" | 236 | y="634.34998" |
2338 | 237 | style="font-size:16px" | 237 | style="font-size:16px" |
2340 | 238 | id="tspan2609">StelDownloadMgr</tspan><tspan | 238 | id="tspan2611">StelLocationMgr</tspan><tspan |
2341 | 239 | sodipodi:role="line" | 239 | sodipodi:role="line" |
2342 | 240 | x="77.209961" | 240 | x="77.209961" |
2343 | 241 | y="654.34998" | 241 | y="654.34998" |
2344 | 242 | style="font-size:16px" | 242 | style="font-size:16px" |
2346 | 243 | id="tspan2611">StelLocationMgr</tspan><tspan | 243 | id="tspan2613">...</tspan><tspan |
2347 | 244 | sodipodi:role="line" | 244 | sodipodi:role="line" |
2348 | 245 | x="77.209961" | 245 | x="77.209961" |
2349 | 246 | y="674.34998" | 246 | y="674.34998" |
2350 | 247 | style="font-size:16px" | ||
2351 | 248 | id="tspan2613">...</tspan><tspan | ||
2352 | 249 | sodipodi:role="line" | ||
2353 | 250 | x="77.209961" | ||
2354 | 251 | y="694.34998" | ||
2355 | 252 | style="font-size:18px" | 247 | style="font-size:18px" |
2356 | 253 | id="tspan6340" /></text> | 248 | id="tspan6340" /></text> |
2357 | 254 | <rect | 249 | <rect |
2358 | 255 | 250 | ||
2359 | === modified file 'plugins/AngleMeasure/src/AngleMeasure.cpp' | |||
2360 | --- plugins/AngleMeasure/src/AngleMeasure.cpp 2012-08-08 09:44:23 +0000 | |||
2361 | +++ plugins/AngleMeasure/src/AngleMeasure.cpp 2012-08-30 16:29:19 +0000 | |||
2362 | @@ -17,7 +17,6 @@ | |||
2363 | 17 | */ | 17 | */ |
2364 | 18 | 18 | ||
2365 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
2366 | 20 | #include "StelPainter.hpp" | ||
2367 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
2368 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
2369 | 23 | #include "StelFileMgr.hpp" | 22 | #include "StelFileMgr.hpp" |
2370 | @@ -26,10 +25,10 @@ | |||
2371 | 26 | #include "StelGui.hpp" | 25 | #include "StelGui.hpp" |
2372 | 27 | #include "StelGuiItems.hpp" | 26 | #include "StelGuiItems.hpp" |
2373 | 28 | #include "StelIniParser.hpp" | 27 | #include "StelIniParser.hpp" |
2374 | 29 | #include "StelVertexArray.hpp" | ||
2375 | 30 | #include "AngleMeasure.hpp" | 28 | #include "AngleMeasure.hpp" |
2376 | 29 | #include "renderer/StelCircleArcRenderer.hpp" | ||
2377 | 30 | #include "renderer/StelRenderer.hpp" | ||
2378 | 31 | 31 | ||
2379 | 32 | #include <QtOpenGL> | ||
2380 | 33 | #include <QDebug> | 32 | #include <QDebug> |
2381 | 34 | #include <QTimer> | 33 | #include <QTimer> |
2382 | 35 | #include <QAction> | 34 | #include <QAction> |
2383 | @@ -152,63 +151,55 @@ | |||
2384 | 152 | } | 151 | } |
2385 | 153 | 152 | ||
2386 | 154 | //! Draw any parts on the screen which are for our module | 153 | //! Draw any parts on the screen which are for our module |
2388 | 155 | void AngleMeasure::draw(StelCore* core) | 154 | void AngleMeasure::draw(StelCore* core, StelRenderer* renderer) |
2389 | 156 | { | 155 | { |
2390 | 157 | if (lineVisible.getInterstate() < 0.000001f && messageFader.getInterstate() < 0.000001f) | 156 | if (lineVisible.getInterstate() < 0.000001f && messageFader.getInterstate() < 0.000001f) |
2391 | 158 | return; | 157 | return; |
2392 | 159 | 158 | ||
2393 | 160 | const StelProjectorP prj = core->getProjection(StelCore::FrameEquinoxEqu); | 159 | const StelProjectorP prj = core->getProjection(StelCore::FrameEquinoxEqu); |
2407 | 161 | StelPainter painter(prj); | 160 | |
2408 | 162 | painter.setFont(font); | 161 | renderer->setFont(font); |
2409 | 163 | Vec3f tColor, lColor; | 162 | |
2410 | 164 | if (StelApp::getInstance().getVisionModeNight()) | 163 | const bool night = StelApp::getInstance().getVisionModeNight(); |
2411 | 165 | { | 164 | const Vec3f tColor = night ? StelUtils::getNightColor(textColor) : lineColor; |
2412 | 166 | tColor = StelUtils::getNightColor(textColor); | 165 | const Vec3f lColor = night ? StelUtils::getNightColor(lineColor) : lineColor; |
2400 | 167 | lColor = StelUtils::getNightColor(lineColor); | ||
2401 | 168 | } | ||
2402 | 169 | else | ||
2403 | 170 | { | ||
2404 | 171 | tColor = textColor; | ||
2405 | 172 | lColor = lineColor; | ||
2406 | 173 | } | ||
2413 | 174 | 166 | ||
2414 | 175 | if (lineVisible.getInterstate() > 0.000001f) | 167 | if (lineVisible.getInterstate() > 0.000001f) |
2415 | 176 | { | 168 | { |
2419 | 177 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 169 | renderer->setBlendMode(BlendMode_Alpha); |
2417 | 178 | glEnable(GL_BLEND); | ||
2418 | 179 | glEnable(GL_TEXTURE_2D); | ||
2420 | 180 | 170 | ||
2421 | 181 | Vec3d xy; | 171 | Vec3d xy; |
2422 | 182 | if (prj->project(perp1EndPoint,xy)) | 172 | if (prj->project(perp1EndPoint,xy)) |
2423 | 183 | { | 173 | { |
2426 | 184 | painter.setColor(tColor[0], tColor[1], tColor[2], lineVisible.getInterstate()); | 174 | renderer->setGlobalColor(tColor[0], tColor[1], tColor[2], |
2427 | 185 | painter.drawText(xy[0], xy[1], angleText, 0, 15, 15); | 175 | lineVisible.getInterstate()); |
2428 | 176 | renderer->drawText(TextParams(xy[0], xy[1], angleText).shift(15, 15)); | ||
2429 | 186 | } | 177 | } |
2430 | 187 | 178 | ||
2438 | 188 | glDisable(GL_TEXTURE_2D); | 179 | renderer->setGlobalColor(lColor[0], lColor[1], lColor[2], |
2439 | 189 | glEnable(GL_LINE_SMOOTH); | 180 | lineVisible.getInterstate()); |
2440 | 190 | glEnable(GL_BLEND); | 181 | |
2441 | 191 | 182 | // main line is a great circle | |
2442 | 192 | // main line is a great circle | 183 | StelCircleArcRenderer circleArcRenderer(renderer, prj); |
2443 | 193 | painter.setColor(lColor[0], lColor[1], lColor[2], lineVisible.getInterstate()); | 184 | circleArcRenderer.drawGreatCircleArc(startPoint, endPoint); |
2437 | 194 | painter.drawGreatCircleArc(startPoint, endPoint, NULL); | ||
2444 | 195 | 185 | ||
2445 | 196 | // End lines | 186 | // End lines |
2448 | 197 | painter.drawGreatCircleArc(perp1StartPoint, perp1EndPoint, NULL); | 187 | circleArcRenderer.drawGreatCircleArc(perp1StartPoint, perp1EndPoint); |
2449 | 198 | painter.drawGreatCircleArc(perp2StartPoint, perp2EndPoint, NULL); | 188 | circleArcRenderer.drawGreatCircleArc(perp2StartPoint, perp2EndPoint); |
2450 | 199 | } | 189 | } |
2451 | 200 | 190 | ||
2452 | 201 | if (messageFader.getInterstate() > 0.000001f) | 191 | if (messageFader.getInterstate() > 0.000001f) |
2453 | 202 | { | 192 | { |
2455 | 203 | painter.setColor(tColor[0], tColor[1], tColor[2], messageFader.getInterstate()); | 193 | renderer->setGlobalColor(tColor[0], tColor[1], tColor[2], |
2456 | 194 | messageFader.getInterstate()); | ||
2457 | 204 | int x = 83; | 195 | int x = 83; |
2458 | 205 | int y = 120; | 196 | int y = 120; |
2465 | 206 | int ls = painter.getFontMetrics().lineSpacing(); | 197 | const int ls = QFontMetrics(font).lineSpacing(); |
2466 | 207 | painter.drawText(x, y, messageEnabled); | 198 | renderer->drawText(TextParams(x, y, messageEnabled)); |
2467 | 208 | y -= ls; | 199 | y -= ls; |
2468 | 209 | painter.drawText(x, y, messageLeftButton); | 200 | renderer->drawText(TextParams(x, y, messageLeftButton)); |
2469 | 210 | y -= ls; | 201 | y -= ls; |
2470 | 211 | painter.drawText(x, y, messageRightButton); | 202 | renderer->drawText(TextParams(x, y, messageRightButton)); |
2471 | 212 | } | 203 | } |
2472 | 213 | } | 204 | } |
2473 | 214 | 205 | ||
2474 | 215 | 206 | ||
2475 | === modified file 'plugins/AngleMeasure/src/AngleMeasure.hpp' | |||
2476 | --- plugins/AngleMeasure/src/AngleMeasure.hpp 2012-01-11 10:50:37 +0000 | |||
2477 | +++ plugins/AngleMeasure/src/AngleMeasure.hpp 2012-08-30 16:29:19 +0000 | |||
2478 | @@ -40,7 +40,7 @@ | |||
2479 | 40 | // Methods defined in the StelModule class | 40 | // Methods defined in the StelModule class |
2480 | 41 | virtual void init(); | 41 | virtual void init(); |
2481 | 42 | virtual void update(double deltaTime); | 42 | virtual void update(double deltaTime); |
2483 | 43 | virtual void draw(StelCore* core); | 43 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
2484 | 44 | virtual double getCallOrder(StelModuleActionName actionName) const; | 44 | virtual double getCallOrder(StelModuleActionName actionName) const; |
2485 | 45 | virtual void handleKeys(class QKeyEvent* event); | 45 | virtual void handleKeys(class QKeyEvent* event); |
2486 | 46 | virtual void handleMouseClicks(class QMouseEvent* event); | 46 | virtual void handleMouseClicks(class QMouseEvent* event); |
2487 | 47 | 47 | ||
2488 | === modified file 'plugins/CompassMarks/src/CompassMarks.cpp' | |||
2489 | --- plugins/CompassMarks/src/CompassMarks.cpp 2012-08-26 16:11:26 +0000 | |||
2490 | +++ plugins/CompassMarks/src/CompassMarks.cpp 2012-08-30 16:29:19 +0000 | |||
2491 | @@ -18,7 +18,6 @@ | |||
2492 | 18 | 18 | ||
2493 | 19 | #include "VecMath.hpp" | 19 | #include "VecMath.hpp" |
2494 | 20 | #include "StelProjector.hpp" | 20 | #include "StelProjector.hpp" |
2495 | 21 | #include "StelPainter.hpp" | ||
2496 | 22 | #include "StelApp.hpp" | 21 | #include "StelApp.hpp" |
2497 | 23 | #include "StelCore.hpp" | 22 | #include "StelCore.hpp" |
2498 | 24 | #include "StelLocaleMgr.hpp" | 23 | #include "StelLocaleMgr.hpp" |
2499 | @@ -30,8 +29,9 @@ | |||
2500 | 30 | #include "StelGui.hpp" | 29 | #include "StelGui.hpp" |
2501 | 31 | #include "StelGuiItems.hpp" | 30 | #include "StelGuiItems.hpp" |
2502 | 32 | #include "StelIniParser.hpp" | 31 | #include "StelIniParser.hpp" |
2503 | 32 | #include "renderer/StelCircleArcRenderer.hpp" | ||
2504 | 33 | #include "renderer/StelRenderer.hpp" | ||
2505 | 33 | 34 | ||
2506 | 34 | #include <QtOpenGL> | ||
2507 | 35 | #include <QAction> | 35 | #include <QAction> |
2508 | 36 | #include <QDebug> | 36 | #include <QDebug> |
2509 | 37 | #include <QPixmap> | 37 | #include <QPixmap> |
2510 | @@ -146,27 +146,23 @@ | |||
2511 | 146 | } | 146 | } |
2512 | 147 | 147 | ||
2513 | 148 | //! Draw any parts on the screen which are for our module | 148 | //! Draw any parts on the screen which are for our module |
2515 | 149 | void CompassMarks::draw(StelCore* core) | 149 | void CompassMarks::draw(StelCore* core, StelRenderer* renderer) |
2516 | 150 | { | 150 | { |
2517 | 151 | if (markFader.getInterstate() <= 0.0) { return; } | 151 | if (markFader.getInterstate() <= 0.0) { return; } |
2518 | 152 | 152 | ||
2519 | 153 | Vec3d pos; | 153 | Vec3d pos; |
2536 | 154 | StelProjectorP prj = core->getProjection(StelCore::FrameAltAz, StelCore::RefractionOff); // Maybe conflict with Scenery3d branch. AW20120214 No. GZ20120826. | 154 | StelProjectorP prj = core->getProjection(StelCore::FrameAltAz, StelCore::RefractionOff); // Maybe conflict with Scenery3d branch. AW20120214 No. GZ20120826.yy |
2537 | 155 | StelPainter painter(prj); | 155 | |
2538 | 156 | painter.setFont(font); | 156 | renderer->setFont(font); |
2539 | 157 | 157 | const Vec3f mColor = StelApp::getInstance().getVisionModeNight() | |
2540 | 158 | Vec3f mColor; | 158 | ? StelUtils::getNightColor(markColor) : markColor; |
2541 | 159 | if (StelApp::getInstance().getVisionModeNight()) | 159 | |
2542 | 160 | mColor = StelUtils::getNightColor(markColor); | 160 | renderer->setGlobalColor(mColor[0], mColor[1], mColor[2], markFader.getInterstate()); |
2543 | 161 | else | 161 | renderer->setBlendMode(BlendMode_Alpha); |
2544 | 162 | mColor = markColor; | 162 | |
2545 | 163 | 163 | StelCircleArcRenderer circleArcRenderer(renderer, prj); | |
2546 | 164 | glColor4f(mColor[0], mColor[1], mColor[2], markFader.getInterstate()); | 164 | const QFontMetrics fontMetrics(font); |
2547 | 165 | glDisable(GL_TEXTURE_2D); | 165 | |
2532 | 166 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||
2533 | 167 | glEnable(GL_BLEND); | ||
2534 | 168 | glEnable(GL_LINE_SMOOTH); | ||
2535 | 169 | |||
2548 | 170 | for(int i=0; i<360; i++) | 166 | for(int i=0; i<360; i++) |
2549 | 171 | { | 167 | { |
2550 | 172 | float a = i*M_PI/180; | 168 | float a = i*M_PI/180; |
2551 | @@ -177,24 +173,17 @@ | |||
2552 | 177 | h = -0.02; // the size of the mark every 15 degrees | 173 | h = -0.02; // the size of the mark every 15 degrees |
2553 | 178 | 174 | ||
2554 | 179 | QString s = QString("%1").arg((i+90)%360); | 175 | QString s = QString("%1").arg((i+90)%360); |
2559 | 180 | 176 | const float shiftx = fontMetrics.width(s) / 2.; | |
2560 | 181 | float shiftx = painter.getFontMetrics().width(s) / 2.; | 177 | const float shifty = fontMetrics.height() / 2.; |
2561 | 182 | float shifty = painter.getFontMetrics().height() / 2.; | 178 | renderer->drawText(TextParams(pos, prj, s).shift(-shiftx, shifty)); |
2558 | 183 | painter.drawText(pos, s, 0, -shiftx, shifty); | ||
2562 | 184 | } | 179 | } |
2563 | 185 | else if (i % 5 == 0) | 180 | else if (i % 5 == 0) |
2564 | 186 | { | 181 | { |
2565 | 187 | h = -0.01; // the size of the mark every 5 degrees | 182 | h = -0.01; // the size of the mark every 5 degrees |
2566 | 188 | } | 183 | } |
2567 | 189 | 184 | ||
2571 | 190 | glDisable(GL_TEXTURE_2D); | 185 | circleArcRenderer.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1], h)); |
2569 | 191 | painter.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1], h), NULL); | ||
2570 | 192 | glEnable(GL_TEXTURE_2D); | ||
2572 | 193 | } | 186 | } |
2573 | 194 | glDisable(GL_LINE_SMOOTH); | ||
2574 | 195 | glDisable(GL_BLEND); | ||
2575 | 196 | glEnable(GL_TEXTURE_2D); | ||
2576 | 197 | |||
2577 | 198 | } | 187 | } |
2578 | 199 | 188 | ||
2579 | 200 | void CompassMarks::update(double deltaTime) | 189 | void CompassMarks::update(double deltaTime) |
2580 | 201 | 190 | ||
2581 | === modified file 'plugins/CompassMarks/src/CompassMarks.hpp' | |||
2582 | --- plugins/CompassMarks/src/CompassMarks.hpp 2012-01-11 10:50:37 +0000 | |||
2583 | +++ plugins/CompassMarks/src/CompassMarks.hpp 2012-08-30 16:29:19 +0000 | |||
2584 | @@ -39,7 +39,7 @@ | |||
2585 | 39 | // Methods defined in the StelModule class | 39 | // Methods defined in the StelModule class |
2586 | 40 | virtual void init(); | 40 | virtual void init(); |
2587 | 41 | virtual void update(double deltaTime); | 41 | virtual void update(double deltaTime); |
2589 | 42 | virtual void draw(StelCore* core); | 42 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
2590 | 43 | virtual double getCallOrder(StelModuleActionName actionName) const; | 43 | virtual double getCallOrder(StelModuleActionName actionName) const; |
2591 | 44 | 44 | ||
2592 | 45 | public slots: | 45 | public slots: |
2593 | 46 | 46 | ||
2594 | === modified file 'plugins/Exoplanets/src/Exoplanet.cpp' | |||
2595 | --- plugins/Exoplanets/src/Exoplanet.cpp 2012-08-08 10:11:01 +0000 | |||
2596 | +++ plugins/Exoplanets/src/Exoplanet.cpp 2012-08-30 16:29:19 +0000 | |||
2597 | @@ -18,25 +18,22 @@ | |||
2598 | 18 | 18 | ||
2599 | 19 | #include "Exoplanet.hpp" | 19 | #include "Exoplanet.hpp" |
2600 | 20 | #include "StelObject.hpp" | 20 | #include "StelObject.hpp" |
2601 | 21 | #include "StelPainter.hpp" | ||
2602 | 22 | #include "StelApp.hpp" | 21 | #include "StelApp.hpp" |
2603 | 23 | #include "StelCore.hpp" | 22 | #include "StelCore.hpp" |
2604 | 24 | #include "StelTexture.hpp" | ||
2605 | 25 | #include "StelUtils.hpp" | 23 | #include "StelUtils.hpp" |
2606 | 26 | #include "StelTranslator.hpp" | 24 | #include "StelTranslator.hpp" |
2607 | 27 | #include "StelModuleMgr.hpp" | 25 | #include "StelModuleMgr.hpp" |
2608 | 28 | #include "StelSkyDrawer.hpp" | 26 | #include "StelSkyDrawer.hpp" |
2609 | 27 | #include "renderer/StelRenderer.hpp" | ||
2610 | 28 | #include "renderer/StelTextureNew.hpp" | ||
2611 | 29 | 29 | ||
2612 | 30 | #include <QTextStream> | 30 | #include <QTextStream> |
2613 | 31 | #include <QDebug> | 31 | #include <QDebug> |
2614 | 32 | #include <QVariant> | 32 | #include <QVariant> |
2615 | 33 | #include <QtOpenGL> | ||
2616 | 34 | #include <QVariantMap> | 33 | #include <QVariantMap> |
2617 | 35 | #include <QVariant> | 34 | #include <QVariant> |
2618 | 36 | #include <QList> | 35 | #include <QList> |
2619 | 37 | 36 | ||
2620 | 38 | StelTextureSP Exoplanet::markerTexture; | ||
2621 | 39 | |||
2622 | 40 | Exoplanet::Exoplanet(const QVariantMap& map) | 37 | Exoplanet::Exoplanet(const QVariantMap& map) |
2623 | 41 | : initialized(false) | 38 | : initialized(false) |
2624 | 42 | { | 39 | { |
2625 | @@ -355,31 +352,33 @@ | |||
2626 | 355 | labelsFader.update((int)(deltaTime*1000)); | 352 | labelsFader.update((int)(deltaTime*1000)); |
2627 | 356 | } | 353 | } |
2628 | 357 | 354 | ||
2630 | 358 | void Exoplanet::draw(StelCore* core, StelPainter& painter) | 355 | void Exoplanet::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector, |
2631 | 356 | StelTextureNew* markerTexture) | ||
2632 | 359 | { | 357 | { |
2633 | 360 | StelSkyDrawer* sd = core->getSkyDrawer(); | 358 | StelSkyDrawer* sd = core->getSkyDrawer(); |
2634 | 361 | 359 | ||
2635 | 362 | Vec3f color = Vec3f(0.4f,1.2f,0.5f); | 360 | Vec3f color = Vec3f(0.4f,1.2f,0.5f); |
2636 | 363 | if (StelApp::getInstance().getVisionModeNight()) | 361 | if (StelApp::getInstance().getVisionModeNight()) |
2637 | 364 | color = StelUtils::getNightColor(color); | 362 | color = StelUtils::getNightColor(color); |
2640 | 365 | 363 | const double mag = getVMagnitude(core, true); | |
2639 | 366 | double mag = getVMagnitude(core, true); | ||
2641 | 367 | 364 | ||
2642 | 368 | StelUtils::spheToRect(RA, DE, XYZ); | 365 | StelUtils::spheToRect(RA, DE, XYZ); |
2646 | 369 | glEnable(GL_BLEND); | 366 | renderer->setBlendMode(BlendMode_Add); |
2647 | 370 | glBlendFunc(GL_ONE, GL_ONE); | 367 | renderer->setGlobalColor(color[0], color[1], color[2]); |
2645 | 371 | painter.setColor(color[0], color[1], color[2], 1); | ||
2648 | 372 | 368 | ||
2649 | 373 | if (mag <= sd->getLimitMagnitude()) | 369 | if (mag <= sd->getLimitMagnitude()) |
2650 | 374 | { | 370 | { |
2655 | 375 | 371 | markerTexture->bind(); | |
2656 | 376 | Exoplanet::markerTexture->bind(); | 372 | const float size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter(); |
2657 | 377 | float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter(); | 373 | const float shift = 5.f + size/1.6f; |
2654 | 378 | float shift = 5.f + size/1.6f; | ||
2658 | 379 | if (labelsFader.getInterstate()<=0.f) | 374 | if (labelsFader.getInterstate()<=0.f) |
2659 | 380 | { | 375 | { |
2662 | 381 | painter.drawSprite2dMode(XYZ, 5); | 376 | Vec3d win; |
2663 | 382 | painter.drawText(XYZ, designation, 0, shift, shift, false); | 377 | if(projector->project(XYZ, win)) |
2664 | 378 | { | ||
2665 | 379 | renderer->drawTexturedRect(win[0] - 5, win[1] - 5, 10, 10); | ||
2666 | 380 | renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity()); | ||
2667 | 381 | } | ||
2668 | 383 | } | 382 | } |
2669 | 384 | } | 383 | } |
2670 | 385 | } | 384 | } |
2671 | 386 | 385 | ||
2672 | === modified file 'plugins/Exoplanets/src/Exoplanet.hpp' | |||
2673 | --- plugins/Exoplanets/src/Exoplanet.hpp 2012-08-05 12:24:40 +0000 | |||
2674 | +++ plugins/Exoplanets/src/Exoplanet.hpp 2012-08-30 16:29:19 +0000 | |||
2675 | @@ -27,8 +27,7 @@ | |||
2676 | 27 | #include <QDateTime> | 27 | #include <QDateTime> |
2677 | 28 | 28 | ||
2678 | 29 | #include "StelObject.hpp" | 29 | #include "StelObject.hpp" |
2681 | 30 | #include "StelTextureTypes.hpp" | 30 | #include "StelProjectorType.hpp" |
2680 | 31 | #include "StelPainter.hpp" | ||
2682 | 32 | #include "StelFader.hpp" | 31 | #include "StelFader.hpp" |
2683 | 33 | 32 | ||
2684 | 34 | typedef struct | 33 | typedef struct |
2685 | @@ -44,7 +43,6 @@ | |||
2686 | 44 | int discovered; //! Exoplanet discovered year | 43 | int discovered; //! Exoplanet discovered year |
2687 | 45 | } exoplanetData; | 44 | } exoplanetData; |
2688 | 46 | 45 | ||
2689 | 47 | class StelPainter; | ||
2690 | 48 | 46 | ||
2691 | 49 | //! @class Exoplanet | 47 | //! @class Exoplanet |
2692 | 50 | //! A exoplanet object represents one pulsar on the sky. | 48 | //! A exoplanet object represents one pulsar on the sky. |
2693 | @@ -101,10 +99,8 @@ | |||
2694 | 101 | 99 | ||
2695 | 102 | Vec3d XYZ; // holds J2000 position | 100 | Vec3d XYZ; // holds J2000 position |
2696 | 103 | 101 | ||
2701 | 104 | static StelTextureSP hintTexture; | 102 | void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector, |
2702 | 105 | static StelTextureSP markerTexture; | 103 | class StelTextureNew* markerTexture); |
2699 | 106 | |||
2700 | 107 | void draw(StelCore* core, StelPainter& painter); | ||
2703 | 108 | 104 | ||
2704 | 109 | //! Variables for description of properties of exoplanets | 105 | //! Variables for description of properties of exoplanets |
2705 | 110 | QString designation; //! The designation of the host star | 106 | QString designation; //! The designation of the host star |
2706 | 111 | 107 | ||
2707 | === modified file 'plugins/Exoplanets/src/Exoplanets.cpp' | |||
2708 | --- plugins/Exoplanets/src/Exoplanets.cpp 2012-08-05 12:35:06 +0000 | |||
2709 | +++ plugins/Exoplanets/src/Exoplanets.cpp 2012-08-30 16:29:19 +0000 | |||
2710 | @@ -17,7 +17,6 @@ | |||
2711 | 17 | */ | 17 | */ |
2712 | 18 | 18 | ||
2713 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
2714 | 20 | #include "StelPainter.hpp" | ||
2715 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
2716 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
2717 | 23 | #include "StelGui.hpp" | 22 | #include "StelGui.hpp" |
2718 | @@ -25,11 +24,12 @@ | |||
2719 | 25 | #include "StelLocaleMgr.hpp" | 24 | #include "StelLocaleMgr.hpp" |
2720 | 26 | #include "StelModuleMgr.hpp" | 25 | #include "StelModuleMgr.hpp" |
2721 | 27 | #include "StelObjectMgr.hpp" | 26 | #include "StelObjectMgr.hpp" |
2722 | 28 | #include "StelTextureMgr.hpp" | ||
2723 | 29 | #include "StelJsonParser.hpp" | 27 | #include "StelJsonParser.hpp" |
2724 | 30 | #include "StelFileMgr.hpp" | 28 | #include "StelFileMgr.hpp" |
2725 | 31 | #include "StelUtils.hpp" | 29 | #include "StelUtils.hpp" |
2726 | 32 | #include "StelTranslator.hpp" | 30 | #include "StelTranslator.hpp" |
2727 | 31 | #include "renderer/StelRenderer.hpp" | ||
2728 | 32 | #include "renderer/StelTextureNew.hpp" | ||
2729 | 33 | #include "LabelMgr.hpp" | 33 | #include "LabelMgr.hpp" |
2730 | 34 | #include "Exoplanets.hpp" | 34 | #include "Exoplanets.hpp" |
2731 | 35 | #include "Exoplanet.hpp" | 35 | #include "Exoplanet.hpp" |
2732 | @@ -47,6 +47,7 @@ | |||
2733 | 47 | #include <QVariantMap> | 47 | #include <QVariantMap> |
2734 | 48 | #include <QVariant> | 48 | #include <QVariant> |
2735 | 49 | #include <QList> | 49 | #include <QList> |
2736 | 50 | #include <QSettings> | ||
2737 | 50 | #include <QSharedPointer> | 51 | #include <QSharedPointer> |
2738 | 51 | #include <QStringList> | 52 | #include <QStringList> |
2739 | 52 | #include <QPixmap> | 53 | #include <QPixmap> |
2740 | @@ -82,7 +83,14 @@ | |||
2741 | 82 | Constructor | 83 | Constructor |
2742 | 83 | */ | 84 | */ |
2743 | 84 | Exoplanets::Exoplanets() | 85 | Exoplanets::Exoplanets() |
2745 | 85 | : flagShowExoplanets(false), OnIcon(NULL), OffIcon(NULL), GlowIcon(NULL), toolbarButton(NULL), progressBar(NULL) | 86 | : texPointer(NULL) |
2746 | 87 | , markerTexture(NULL) | ||
2747 | 88 | , flagShowExoplanets(false) | ||
2748 | 89 | , OnIcon(NULL) | ||
2749 | 90 | , OffIcon(NULL) | ||
2750 | 91 | , GlowIcon(NULL) | ||
2751 | 92 | , toolbarButton(NULL) | ||
2752 | 93 | , progressBar(NULL) | ||
2753 | 86 | { | 94 | { |
2754 | 87 | setObjectName("Exoplanets"); | 95 | setObjectName("Exoplanets"); |
2755 | 88 | exoplanetsConfigDialog = new ExoplanetsDialog(); | 96 | exoplanetsConfigDialog = new ExoplanetsDialog(); |
2756 | @@ -108,8 +116,9 @@ | |||
2757 | 108 | void Exoplanets::deinit() | 116 | void Exoplanets::deinit() |
2758 | 109 | { | 117 | { |
2759 | 110 | ep.clear(); | 118 | ep.clear(); |
2762 | 111 | Exoplanet::markerTexture.clear(); | 119 | if(NULL != texPointer) {delete texPointer;} |
2763 | 112 | texPointer.clear(); | 120 | if(NULL != markerTexture) {delete markerTexture;} |
2764 | 121 | texPointer = markerTexture = NULL; | ||
2765 | 113 | } | 122 | } |
2766 | 114 | 123 | ||
2767 | 115 | void Exoplanets::update(double) //deltaTime | 124 | void Exoplanets::update(double) //deltaTime |
2768 | @@ -149,9 +158,6 @@ | |||
2769 | 149 | 158 | ||
2770 | 150 | jsonCatalogPath = StelFileMgr::findFile("modules/Exoplanets", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/exoplanets.json"; | 159 | jsonCatalogPath = StelFileMgr::findFile("modules/Exoplanets", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/exoplanets.json"; |
2771 | 151 | 160 | ||
2772 | 152 | texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png"); | ||
2773 | 153 | Exoplanet::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Exoplanets/exoplanet.png"); | ||
2774 | 154 | |||
2775 | 155 | // key bindings and other actions | 161 | // key bindings and other actions |
2776 | 156 | // TRANSLATORS: Title of a group of key bindings in the Help window | 162 | // TRANSLATORS: Title of a group of key bindings in the Help window |
2777 | 157 | QString groupName = N_("Plugin Key Bindings"); | 163 | QString groupName = N_("Plugin Key Bindings"); |
2778 | @@ -218,27 +224,33 @@ | |||
2779 | 218 | /* | 224 | /* |
2780 | 219 | Draw our module. This should print name of first PSR in the main window | 225 | Draw our module. This should print name of first PSR in the main window |
2781 | 220 | */ | 226 | */ |
2783 | 221 | void Exoplanets::draw(StelCore* core) | 227 | void Exoplanets::draw(StelCore* core, StelRenderer* renderer) |
2784 | 222 | { | 228 | { |
2785 | 223 | if (!flagShowExoplanets) | 229 | if (!flagShowExoplanets) |
2786 | 224 | return; | 230 | return; |
2787 | 225 | 231 | ||
2788 | 226 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 232 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
2791 | 227 | StelPainter painter(prj); | 233 | renderer->setFont(font); |
2792 | 228 | painter.setFont(font); | 234 | |
2793 | 235 | if(NULL == texPointer) | ||
2794 | 236 | { | ||
2795 | 237 | Q_ASSERT_X(NULL == markerTexture, Q_FUNC_INFO, "Textures need to be created simultaneously"); | ||
2796 | 238 | texPointer = renderer->createTexture("textures/pointeur2.png"); | ||
2797 | 239 | markerTexture = renderer->createTexture(":/Exoplanets/exoplanet.png"); | ||
2798 | 240 | } | ||
2799 | 229 | 241 | ||
2800 | 230 | foreach (const ExoplanetP& eps, ep) | 242 | foreach (const ExoplanetP& eps, ep) |
2801 | 231 | { | 243 | { |
2802 | 232 | if (eps && eps->initialized) | 244 | if (eps && eps->initialized) |
2804 | 233 | eps->draw(core, painter); | 245 | eps->draw(core, renderer, prj, markerTexture); |
2805 | 234 | } | 246 | } |
2806 | 235 | 247 | ||
2807 | 236 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) | 248 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) |
2809 | 237 | drawPointer(core, painter); | 249 | drawPointer(core, renderer, prj); |
2810 | 238 | 250 | ||
2811 | 239 | } | 251 | } |
2812 | 240 | 252 | ||
2814 | 241 | void Exoplanets::drawPointer(StelCore* core, StelPainter& painter) | 253 | void Exoplanets::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector) |
2815 | 242 | { | 254 | { |
2816 | 243 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 255 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
2817 | 244 | 256 | ||
2818 | @@ -250,16 +262,15 @@ | |||
2819 | 250 | 262 | ||
2820 | 251 | Vec3d screenpos; | 263 | Vec3d screenpos; |
2821 | 252 | // Compute 2D pos and return if outside screen | 264 | // Compute 2D pos and return if outside screen |
2823 | 253 | if (!painter.getProjector()->project(pos, screenpos)) | 265 | if (!projector->project(pos, screenpos)) |
2824 | 254 | return; | 266 | return; |
2825 | 255 | 267 | ||
2826 | 256 | const Vec3f& c(obj->getInfoColor()); | 268 | const Vec3f& c(obj->getInfoColor()); |
2828 | 257 | painter.setColor(c[0],c[1],c[2]); | 269 | renderer->setGlobalColor(c[0],c[1],c[2]); |
2829 | 258 | texPointer->bind(); | 270 | texPointer->bind(); |
2834 | 259 | painter.enableTexture2d(true); | 271 | renderer->setBlendMode(BlendMode_Alpha); |
2835 | 260 | glEnable(GL_BLEND); | 272 | renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, |
2836 | 261 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode | 273 | 26.0f, StelApp::getInstance().getTotalRunTime() * 40.0f); |
2833 | 262 | painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.); | ||
2837 | 263 | } | 274 | } |
2838 | 264 | } | 275 | } |
2839 | 265 | 276 | ||
2840 | 266 | 277 | ||
2841 | === modified file 'plugins/Exoplanets/src/Exoplanets.hpp' | |||
2842 | --- plugins/Exoplanets/src/Exoplanets.hpp 2012-06-21 16:40:28 +0000 | |||
2843 | +++ plugins/Exoplanets/src/Exoplanets.hpp 2012-08-30 16:29:19 +0000 | |||
2844 | @@ -22,8 +22,6 @@ | |||
2845 | 22 | #include "StelObjectModule.hpp" | 22 | #include "StelObjectModule.hpp" |
2846 | 23 | #include "StelObject.hpp" | 23 | #include "StelObject.hpp" |
2847 | 24 | #include "StelFader.hpp" | 24 | #include "StelFader.hpp" |
2848 | 25 | #include "StelTextureTypes.hpp" | ||
2849 | 26 | #include "StelPainter.hpp" | ||
2850 | 27 | #include "Exoplanet.hpp" | 25 | #include "Exoplanet.hpp" |
2851 | 28 | #include <QFont> | 26 | #include <QFont> |
2852 | 29 | #include <QVariantMap> | 27 | #include <QVariantMap> |
2853 | @@ -37,7 +35,6 @@ | |||
2854 | 37 | class QSettings; | 35 | class QSettings; |
2855 | 38 | class QTimer; | 36 | class QTimer; |
2856 | 39 | class ExoplanetsDialog; | 37 | class ExoplanetsDialog; |
2857 | 40 | class StelPainter; | ||
2858 | 41 | class QPixmap; | 38 | class QPixmap; |
2859 | 42 | class StelButton; | 39 | class StelButton; |
2860 | 43 | 40 | ||
2861 | @@ -66,8 +63,9 @@ | |||
2862 | 66 | virtual void init(); | 63 | virtual void init(); |
2863 | 67 | virtual void deinit(); | 64 | virtual void deinit(); |
2864 | 68 | virtual void update(double deltaTime); | 65 | virtual void update(double deltaTime); |
2867 | 69 | virtual void draw(StelCore* core); | 66 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
2868 | 70 | virtual void drawPointer(StelCore* core, StelPainter& painter); | 67 | virtual void drawPointer(StelCore* core, class StelRenderer* renderer, |
2869 | 68 | StelProjectorP projector); | ||
2870 | 71 | virtual double getCallOrder(StelModuleActionName actionName) const; | 69 | virtual double getCallOrder(StelModuleActionName actionName) const; |
2871 | 72 | 70 | ||
2872 | 73 | /////////////////////////////////////////////////////////////////////////// | 71 | /////////////////////////////////////////////////////////////////////////// |
2873 | @@ -181,7 +179,8 @@ | |||
2874 | 181 | 179 | ||
2875 | 182 | QString jsonCatalogPath; | 180 | QString jsonCatalogPath; |
2876 | 183 | 181 | ||
2878 | 184 | StelTextureSP texPointer; | 182 | StelTextureNew* texPointer; |
2879 | 183 | StelTextureNew* markerTexture; | ||
2880 | 185 | QList<ExoplanetP> ep; | 184 | QList<ExoplanetP> ep; |
2881 | 186 | 185 | ||
2882 | 187 | // variables and functions for the updater | 186 | // variables and functions for the updater |
2883 | 188 | 187 | ||
2884 | === modified file 'plugins/HelloStelModule/src/HelloStelModule.cpp' | |||
2885 | --- plugins/HelloStelModule/src/HelloStelModule.cpp 2010-01-13 11:26:18 +0000 | |||
2886 | +++ plugins/HelloStelModule/src/HelloStelModule.cpp 2012-08-30 16:29:19 +0000 | |||
2887 | @@ -17,12 +17,12 @@ | |||
2888 | 17 | */ | 17 | */ |
2889 | 18 | 18 | ||
2890 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
2891 | 20 | #include "StelPainter.hpp" | ||
2892 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
2893 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
2894 | 23 | #include "StelLocaleMgr.hpp" | 22 | #include "StelLocaleMgr.hpp" |
2895 | 24 | #include "StelModuleMgr.hpp" | 23 | #include "StelModuleMgr.hpp" |
2896 | 25 | #include "HelloStelModule.hpp" | 24 | #include "HelloStelModule.hpp" |
2897 | 25 | #include "renderer/StelRenderer.hpp" | ||
2898 | 26 | 26 | ||
2899 | 27 | #include <QDebug> | 27 | #include <QDebug> |
2900 | 28 | 28 | ||
2901 | @@ -87,11 +87,10 @@ | |||
2902 | 87 | /************************************************************************* | 87 | /************************************************************************* |
2903 | 88 | Draw our module. This should print "Hello world!" in the main window | 88 | Draw our module. This should print "Hello world!" in the main window |
2904 | 89 | *************************************************************************/ | 89 | *************************************************************************/ |
2906 | 90 | void HelloStelModule::draw(StelCore* core) | 90 | void HelloStelModule::draw(StelCore* core, StelRenderer* renderer) |
2907 | 91 | { | 91 | { |
2912 | 92 | StelPainter painter(core->getProjection2d()); | 92 | renderer->setColor(1, 1, 1, 1); |
2913 | 93 | painter.setColor(1,1,1,1); | 93 | renderer->setFont(font); |
2914 | 94 | painter.setFont(font); | 94 | renderer->drawText(300, 300, "Hello World!") |
2911 | 95 | painter.drawText(300, 300, "Hello World!"); | ||
2915 | 96 | } | 95 | } |
2916 | 97 | 96 | ||
2917 | 98 | 97 | ||
2918 | === modified file 'plugins/HelloStelModule/src/HelloStelModule.hpp' | |||
2919 | --- plugins/HelloStelModule/src/HelloStelModule.hpp 2010-05-09 20:49:19 +0000 | |||
2920 | +++ plugins/HelloStelModule/src/HelloStelModule.hpp 2012-08-30 16:29:19 +0000 | |||
2921 | @@ -33,7 +33,7 @@ | |||
2922 | 33 | // Methods defined in the StelModule class | 33 | // Methods defined in the StelModule class |
2923 | 34 | virtual void init(); | 34 | virtual void init(); |
2924 | 35 | virtual void update(double) {;} | 35 | virtual void update(double) {;} |
2926 | 36 | virtual void draw(StelCore* core); | 36 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
2927 | 37 | virtual double getCallOrder(StelModuleActionName actionName) const; | 37 | virtual double getCallOrder(StelModuleActionName actionName) const; |
2928 | 38 | private: | 38 | private: |
2929 | 39 | // Font used for displaying our text | 39 | // Font used for displaying our text |
2930 | 40 | 40 | ||
2931 | === modified file 'plugins/LogBook/src/LogBook.cpp' | |||
2932 | --- plugins/LogBook/src/LogBook.cpp 2010-06-08 18:21:56 +0000 | |||
2933 | +++ plugins/LogBook/src/LogBook.cpp 2012-08-30 16:29:19 +0000 | |||
2934 | @@ -34,7 +34,6 @@ | |||
2935 | 34 | #include "StelObjectMgr.hpp" | 34 | #include "StelObjectMgr.hpp" |
2936 | 35 | #include "StelObjectType.hpp" | 35 | #include "StelObjectType.hpp" |
2937 | 36 | #include "StelProjector.hpp" | 36 | #include "StelProjector.hpp" |
2938 | 37 | #include "StelPainter.hpp" | ||
2939 | 38 | #include "StelStyle.hpp" | 37 | #include "StelStyle.hpp" |
2940 | 39 | #include "StelTranslator.hpp" | 38 | #include "StelTranslator.hpp" |
2941 | 40 | 39 | ||
2942 | @@ -51,13 +50,6 @@ | |||
2943 | 51 | #include <QSqlRelationalTableModel> | 50 | #include <QSqlRelationalTableModel> |
2944 | 52 | #include <QSqlTableModel> | 51 | #include <QSqlTableModel> |
2945 | 53 | 52 | ||
2946 | 54 | #if defined(__APPLE__) && defined(__MACH__) | ||
2947 | 55 | #include <OpenGL/glu.h> /* Header File For The GLU Library */ | ||
2948 | 56 | #else | ||
2949 | 57 | #include <GL/glu.h> /* Header File For The GLU Library */ | ||
2950 | 58 | #endif | ||
2951 | 59 | |||
2952 | 60 | |||
2953 | 61 | /* ********************************************************************* */ | 53 | /* ********************************************************************* */ |
2954 | 62 | #if 0 | 54 | #if 0 |
2955 | 63 | #pragma mark - | 55 | #pragma mark - |
2956 | @@ -119,9 +111,8 @@ | |||
2957 | 119 | return true; | 111 | return true; |
2958 | 120 | } | 112 | } |
2959 | 121 | 113 | ||
2961 | 122 | void LogBook::draw(StelCore* core) | 114 | void LogBook::draw(StelCore* core, class StelRenderer* renderer) |
2962 | 123 | { | 115 | { |
2963 | 124 | StelPainter painter(core->getProjection2d()); | ||
2964 | 125 | } | 116 | } |
2965 | 126 | 117 | ||
2966 | 127 | double LogBook::getCallOrder(StelModuleActionName actionName) const | 118 | double LogBook::getCallOrder(StelModuleActionName actionName) const |
2967 | 128 | 119 | ||
2968 | === modified file 'plugins/LogBook/src/LogBook.hpp' | |||
2969 | --- plugins/LogBook/src/LogBook.hpp 2010-06-08 18:21:56 +0000 | |||
2970 | +++ plugins/LogBook/src/LogBook.hpp 2012-08-30 16:29:19 +0000 | |||
2971 | @@ -48,7 +48,7 @@ | |||
2972 | 48 | /////////////////////////////////////////////////////////////////////////// | 48 | /////////////////////////////////////////////////////////////////////////// |
2973 | 49 | // Methods defined in the StelModule class | 49 | // Methods defined in the StelModule class |
2974 | 50 | virtual bool configureGui(bool show=true); | 50 | virtual bool configureGui(bool show=true); |
2976 | 51 | virtual void draw(StelCore* core); | 51 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
2977 | 52 | virtual double getCallOrder(StelModuleActionName actionName) const; | 52 | virtual double getCallOrder(StelModuleActionName actionName) const; |
2978 | 53 | //! Returns the module-specific style sheet. | 53 | //! Returns the module-specific style sheet. |
2979 | 54 | //! The main StelStyle instance should be passed. | 54 | //! The main StelStyle instance should be passed. |
2980 | 55 | 55 | ||
2981 | === modified file 'plugins/Observability/src/Observability.cpp' | |||
2982 | --- plugins/Observability/src/Observability.cpp 2012-08-27 13:29:14 +0000 | |||
2983 | +++ plugins/Observability/src/Observability.cpp 2012-08-30 16:29:19 +0000 | |||
2984 | @@ -19,7 +19,6 @@ | |||
2985 | 19 | #include <QSettings> | 19 | #include <QSettings> |
2986 | 20 | #include <QPixmap> | 20 | #include <QPixmap> |
2987 | 21 | #include <QTimer> | 21 | #include <QTimer> |
2988 | 22 | #include <QtOpenGL> | ||
2989 | 23 | #include <QString> | 22 | #include <QString> |
2990 | 24 | #include <QDebug> | 23 | #include <QDebug> |
2991 | 25 | #include <QAction> | 24 | #include <QAction> |
2992 | @@ -28,6 +27,7 @@ | |||
2993 | 28 | #include <QKeyEvent> | 27 | #include <QKeyEvent> |
2994 | 29 | #include <QMouseEvent> | 28 | #include <QMouseEvent> |
2995 | 30 | 29 | ||
2996 | 30 | #include "renderer/StelRenderer.hpp" | ||
2997 | 31 | #include "StelIniParser.hpp" | 31 | #include "StelIniParser.hpp" |
2998 | 32 | #include "StelProjector.hpp" | 32 | #include "StelProjector.hpp" |
2999 | 33 | #include "StarMgr.hpp" | 33 | #include "StarMgr.hpp" |
3000 | @@ -42,9 +42,7 @@ | |||
3001 | 42 | #include "StelGuiItems.hpp" | 42 | #include "StelGuiItems.hpp" |
3002 | 43 | #include "StelMovementMgr.hpp" | 43 | #include "StelMovementMgr.hpp" |
3003 | 44 | #include "StelFileMgr.hpp" | 44 | #include "StelFileMgr.hpp" |
3004 | 45 | #include "StelVertexArray.hpp" | ||
3005 | 46 | #include "StelCore.hpp" | 45 | #include "StelCore.hpp" |
3006 | 47 | #include "StelPainter.hpp" | ||
3007 | 48 | #include "ZoneArray.hpp" | 46 | #include "ZoneArray.hpp" |
3008 | 49 | #include "StelSkyDrawer.hpp" | 47 | #include "StelSkyDrawer.hpp" |
3009 | 50 | #include "Observability.hpp" | 48 | #include "Observability.hpp" |
3010 | @@ -239,7 +237,7 @@ | |||
3011 | 239 | 237 | ||
3012 | 240 | ///////////////////////////////////////////// | 238 | ///////////////////////////////////////////// |
3013 | 241 | // MAIN CODE: | 239 | // MAIN CODE: |
3015 | 242 | void Observability::draw(StelCore* core) | 240 | void Observability::draw(StelCore* core, StelRenderer* renderer) |
3016 | 243 | { | 241 | { |
3017 | 244 | 242 | ||
3018 | 245 | if (!flagShowObservability) return; // Button is off. | 243 | if (!flagShowObservability) return; // Button is off. |
3019 | @@ -255,10 +253,10 @@ | |||
3020 | 255 | if (core->getCurrentLocation().planetName != "Earth") {return;}; | 253 | if (core->getCurrentLocation().planetName != "Earth") {return;}; |
3021 | 256 | 254 | ||
3022 | 257 | // Set the painter: | 255 | // Set the painter: |
3025 | 258 | StelPainter paintresult(core->getProjection2d()); | 256 | StelProjectorP projector = core->getProjection2d(); |
3026 | 259 | paintresult.setColor(fontColor[0],fontColor[1],fontColor[2],1); | 257 | renderer->setGlobalColor(fontColor[0],fontColor[1],fontColor[2],1); |
3027 | 260 | font.setPixelSize(fontSize); | 258 | font.setPixelSize(fontSize); |
3029 | 261 | paintresult.setFont(font); | 259 | renderer->setFont(font); |
3030 | 262 | 260 | ||
3031 | 263 | 261 | ||
3032 | 264 | // Get current date, location, and check if there is something selected. | 262 | // Get current date, location, and check if there is something selected. |
3033 | @@ -675,30 +673,30 @@ | |||
3034 | 675 | 673 | ||
3035 | 676 | if (show_Today) | 674 | if (show_Today) |
3036 | 677 | { | 675 | { |
3041 | 678 | paintresult.drawText(xLine, yLine,q_("TODAY:")); | 676 | renderer->drawText(TextParams(xLine, yLine,q_(" TODAY:"))); |
3042 | 679 | paintresult.drawText(xLine+fontSize, yLine-spacing, RS2); | 677 | renderer->drawText(TextParams(xLine+fontSize, yLine-spacing, RS2)); |
3043 | 680 | paintresult.drawText(xLine+fontSize, yLine-spacing*2, RS1); | 678 | renderer->drawText(TextParams(xLine+fontSize, yLine-spacing*2, RS1)); |
3044 | 681 | paintresult.drawText(xLine+fontSize, yLine-spacing*3, Cul); | 679 | renderer->drawText(TextParams(xLine+fontSize, yLine-spacing*3, Cul)); |
3045 | 682 | yLine -= spacing2; | 680 | yLine -= spacing2; |
3046 | 683 | }; | 681 | }; |
3047 | 684 | 682 | ||
3048 | 685 | if ((isMoon && show_FullMoon) || (!isSun && !isMoon && show_Year)) | 683 | if ((isMoon && show_FullMoon) || (!isSun && !isMoon && show_Year)) |
3049 | 686 | { | 684 | { |
3051 | 687 | paintresult.drawText(xLine,yLine,q_("THIS YEAR:")); | 685 | renderer->drawText(TextParams(xLine,yLine," THIS YEAR:")); |
3052 | 688 | if (show_Best_Night || show_FullMoon) | 686 | if (show_Best_Night || show_FullMoon) |
3053 | 689 | { | 687 | { |
3054 | 690 | yLine -= spacing; | 688 | yLine -= spacing; |
3056 | 691 | paintresult.drawText(xLine+fontSize, yLine, bestNight); | 689 | renderer->drawText(TextParams(xLine+fontSize, yLine, bestNight)); |
3057 | 692 | }; | 690 | }; |
3058 | 693 | if (show_Good_Nights) | 691 | if (show_Good_Nights) |
3059 | 694 | { | 692 | { |
3060 | 695 | yLine -= spacing; | 693 | yLine -= spacing; |
3062 | 696 | paintresult.drawText(xLine+fontSize, yLine, ObsRange); | 694 | renderer->drawText(TextParams(xLine+fontSize, yLine, ObsRange)); |
3063 | 697 | }; | 695 | }; |
3064 | 698 | if (show_AcroCos) | 696 | if (show_AcroCos) |
3065 | 699 | { | 697 | { |
3066 | 700 | yLine -= spacing; | 698 | yLine -= spacing; |
3068 | 701 | paintresult.drawText(xLine+fontSize, yLine, AcroCos); | 699 | renderer->drawText(TextParams(xLine+fontSize, yLine, AcroCos)); |
3069 | 702 | }; | 700 | }; |
3070 | 703 | 701 | ||
3071 | 704 | }; | 702 | }; |
3072 | 705 | 703 | ||
3073 | === modified file 'plugins/Observability/src/Observability.hpp' | |||
3074 | --- plugins/Observability/src/Observability.hpp 2012-08-23 09:21:20 +0000 | |||
3075 | +++ plugins/Observability/src/Observability.hpp 2012-08-30 16:29:19 +0000 | |||
3076 | @@ -38,7 +38,7 @@ | |||
3077 | 38 | virtual ~Observability(); | 38 | virtual ~Observability(); |
3078 | 39 | virtual void init(); | 39 | virtual void init(); |
3079 | 40 | virtual void update(double) {;} | 40 | virtual void update(double) {;} |
3081 | 41 | virtual void draw(StelCore* core); | 41 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
3082 | 42 | virtual double getCallOrder(StelModuleActionName actionName) const; | 42 | virtual double getCallOrder(StelModuleActionName actionName) const; |
3083 | 43 | 43 | ||
3084 | 44 | 44 | ||
3085 | 45 | 45 | ||
3086 | === modified file 'plugins/Oculars/src/Oculars.cpp' | |||
3087 | --- plugins/Oculars/src/Oculars.cpp 2012-07-06 17:00:39 +0000 | |||
3088 | +++ plugins/Oculars/src/Oculars.cpp 2012-08-30 16:29:19 +0000 | |||
3089 | @@ -29,13 +29,15 @@ | |||
3090 | 29 | #include "StelMovementMgr.hpp" | 29 | #include "StelMovementMgr.hpp" |
3091 | 30 | #include "StelObjectMgr.hpp" | 30 | #include "StelObjectMgr.hpp" |
3092 | 31 | #include "StelLocaleMgr.hpp" | 31 | #include "StelLocaleMgr.hpp" |
3093 | 32 | #include "StelPainter.hpp" | ||
3094 | 33 | #include "StelProjector.hpp" | 32 | #include "StelProjector.hpp" |
3095 | 34 | #include "StelGui.hpp" | 33 | #include "StelGui.hpp" |
3096 | 35 | #include "StelGuiItems.hpp" | 34 | #include "StelGuiItems.hpp" |
3097 | 36 | #include "StelMainWindow.hpp" | 35 | #include "StelMainWindow.hpp" |
3098 | 37 | #include "StelTranslator.hpp" | 36 | #include "StelTranslator.hpp" |
3099 | 38 | #include "SkyGui.hpp" | 37 | #include "SkyGui.hpp" |
3100 | 38 | #include "renderer/GenericVertexTypes.hpp" | ||
3101 | 39 | #include "renderer/StelGeometryBuilder.hpp" | ||
3102 | 40 | #include "renderer/StelRenderer.hpp" | ||
3103 | 39 | 41 | ||
3104 | 40 | #include <QAction> | 42 | #include <QAction> |
3105 | 41 | #include <QGraphicsWidget> | 43 | #include <QGraphicsWidget> |
3106 | @@ -49,12 +51,6 @@ | |||
3107 | 49 | 51 | ||
3108 | 50 | #include <cmath> | 52 | #include <cmath> |
3109 | 51 | 53 | ||
3110 | 52 | #if defined(__APPLE__) && defined(__MACH__) | ||
3111 | 53 | #include <OpenGL/glu.h> /* Header File For The GLU Library */ | ||
3112 | 54 | #else | ||
3113 | 55 | #include <GL/glu.h> /* Header File For The GLU Library */ | ||
3114 | 56 | #endif | ||
3115 | 57 | |||
3116 | 58 | #ifdef Q_WS_MAC | 54 | #ifdef Q_WS_MAC |
3117 | 59 | extern void qt_set_sequence_auto_mnemonic(bool b); | 55 | extern void qt_set_sequence_auto_mnemonic(bool b); |
3118 | 60 | #endif | 56 | #endif |
3119 | @@ -228,10 +224,10 @@ | |||
3120 | 228 | } | 224 | } |
3121 | 229 | 225 | ||
3122 | 230 | //! Draw any parts on the screen which are for our module | 226 | //! Draw any parts on the screen which are for our module |
3124 | 231 | void Oculars::draw(StelCore* core) | 227 | void Oculars::draw(StelCore* core, StelRenderer* renderer) |
3125 | 232 | { | 228 | { |
3126 | 233 | if (flagShowTelrad) { | 229 | if (flagShowTelrad) { |
3128 | 234 | paintTelrad(); | 230 | paintTelrad(renderer); |
3129 | 235 | } else if (flagShowOculars){ | 231 | } else if (flagShowOculars){ |
3130 | 236 | // Ensure there is a selected ocular & telescope | 232 | // Ensure there is a selected ocular & telescope |
3131 | 237 | if (selectedCCDIndex > ccds.count()) { | 233 | if (selectedCCDIndex > ccds.count()) { |
3132 | @@ -255,37 +251,33 @@ | |||
3133 | 255 | 251 | ||
3134 | 256 | if (ready) { | 252 | if (ready) { |
3135 | 257 | if (selectedOcularIndex > -1) { | 253 | if (selectedOcularIndex > -1) { |
3137 | 258 | paintOcularMask(); | 254 | paintOcularMask(renderer); |
3138 | 259 | if (flagShowCrosshairs) { | 255 | if (flagShowCrosshairs) { |
3140 | 260 | paintCrosshairs(); | 256 | paintCrosshairs(renderer); |
3141 | 261 | } | 257 | } |
3142 | 262 | } | 258 | } |
3143 | 263 | if (guiPanelEnabled) | 259 | if (guiPanelEnabled) |
3144 | 264 | { | 260 | { |
3145 | 265 | // Reset the state to allow the panel to be painted normally | 261 | // Reset the state to allow the panel to be painted normally |
3149 | 266 | glDisable(GL_TEXTURE_2D); | 262 | renderer->setBlendMode(BlendMode_Alpha); |
3147 | 267 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||
3148 | 268 | glEnable(GL_BLEND); | ||
3150 | 269 | } | 263 | } |
3151 | 270 | else | 264 | else |
3152 | 271 | { | 265 | { |
3153 | 272 | // Paint the information in the upper-right hand corner | 266 | // Paint the information in the upper-right hand corner |
3155 | 273 | paintText(core); | 267 | paintText(core, renderer); |
3156 | 274 | } | 268 | } |
3157 | 275 | } | 269 | } |
3158 | 276 | } else if (flagShowCCD) { | 270 | } else if (flagShowCCD) { |
3160 | 277 | paintCCDBounds(); | 271 | paintCCDBounds(renderer); |
3161 | 278 | if (guiPanelEnabled) | 272 | if (guiPanelEnabled) |
3162 | 279 | { | 273 | { |
3163 | 280 | // Reset the state to allow the panel to be painted normally | 274 | // Reset the state to allow the panel to be painted normally |
3167 | 281 | glDisable(GL_TEXTURE_2D); | 275 | renderer->setBlendMode(BlendMode_Alpha); |
3165 | 282 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||
3166 | 283 | glEnable(GL_BLEND); | ||
3168 | 284 | } | 276 | } |
3169 | 285 | else | 277 | else |
3170 | 286 | { | 278 | { |
3171 | 287 | // Paint the information in the upper-right hand corner | 279 | // Paint the information in the upper-right hand corner |
3173 | 288 | paintText(core); | 280 | paintText(core, renderer); |
3174 | 289 | } | 281 | } |
3175 | 290 | } | 282 | } |
3176 | 291 | } | 283 | } |
3177 | @@ -1293,73 +1285,96 @@ | |||
3178 | 1293 | return binocularFound; | 1285 | return binocularFound; |
3179 | 1294 | } | 1286 | } |
3180 | 1295 | 1287 | ||
3182 | 1296 | void Oculars::paintCCDBounds() | 1288 | void Oculars::paintCCDBounds(StelRenderer* renderer) |
3183 | 1297 | { | 1289 | { |
3184 | 1298 | StelCore *core = StelApp::getInstance().getCore(); | 1290 | StelCore *core = StelApp::getInstance().getCore(); |
3185 | 1299 | StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); | 1291 | StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); |
3186 | 1300 | 1292 | ||
3193 | 1301 | glDisable(GL_BLEND); | 1293 | renderer->setBlendMode(BlendMode_None); |
3194 | 1302 | glColor3f(0.f,0.f,0.f); | 1294 | |
3195 | 1303 | glPushMatrix(); | 1295 | StelVertexBuffer<VertexP2>* vertices = |
3196 | 1304 | glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0); | 1296 | renderer->createVertexBuffer<VertexP2>(PrimitiveType_LineStrip); |
3197 | 1305 | glRotated(ccdRotationAngle, 0.0, 0.0, 1.0); | 1297 | |
3198 | 1306 | GLdouble screenFOV = params.fov; | 1298 | double screenFOV = params.fov; |
3199 | 1299 | const Vec2f offset = Vec2f(params.viewportCenter[0], params.viewportCenter[1]); | ||
3200 | 1307 | 1300 | ||
3201 | 1308 | // draw sensor rectangle | 1301 | // draw sensor rectangle |
3202 | 1309 | if(selectedCCDIndex != -1) { | 1302 | if(selectedCCDIndex != -1) { |
3203 | 1310 | CCD *ccd = ccds[selectedCCDIndex]; | 1303 | CCD *ccd = ccds[selectedCCDIndex]; |
3204 | 1311 | if (ccd) { | 1304 | if (ccd) { |
3206 | 1312 | glColor4f(0.77, 0.14, 0.16, 0.5); | 1305 | renderer->setGlobalColor(0.77f, 0.14f, 0.16f, 0.5f); |
3207 | 1313 | Telescope *telescope = telescopes[selectedTelescopeIndex]; | 1306 | Telescope *telescope = telescopes[selectedTelescopeIndex]; |
3210 | 1314 | double ccdXRatio = ccd->getActualFOVx(telescope) / screenFOV; | 1307 | const double ccdXRatio = ccd->getActualFOVx(telescope) / screenFOV; |
3211 | 1315 | double ccdYRatio = ccd->getActualFOVy(telescope) / screenFOV; | 1308 | const double ccdYRatio = ccd->getActualFOVy(telescope) / screenFOV; |
3212 | 1316 | // As the FOV is based on the narrow aspect of the screen, we need to calculate | 1309 | // As the FOV is based on the narrow aspect of the screen, we need to calculate |
3213 | 1317 | // height & width based soley off of that dimension. | 1310 | // height & width based soley off of that dimension. |
3214 | 1318 | int aspectIndex = 2; | 1311 | int aspectIndex = 2; |
3215 | 1319 | if (params.viewportXywh[2] > params.viewportXywh[3]) { | 1312 | if (params.viewportXywh[2] > params.viewportXywh[3]) { |
3216 | 1320 | aspectIndex = 3; | 1313 | aspectIndex = 3; |
3217 | 1321 | } | 1314 | } |
3228 | 1322 | float width = params.viewportXywh[aspectIndex] * ccdYRatio; | 1315 | const float halfWidth = 0.5f * (params.viewportXywh[aspectIndex] * ccdYRatio); |
3229 | 1323 | float height = params.viewportXywh[aspectIndex] * ccdXRatio; | 1316 | const float halfHeight = 0.5f * (params.viewportXywh[aspectIndex] * ccdXRatio); |
3230 | 1324 | 1317 | ||
3231 | 1325 | if (width > 0.0 && height > 0.0) { | 1318 | if (halfWidth > 0.0 && halfHeight > 0.0) |
3232 | 1326 | glBegin(GL_LINE_LOOP); | 1319 | { |
3233 | 1327 | glVertex2f(-width / 2.0, height / 2.0); | 1320 | const float s = sin(-ccdRotationAngle * M_PI / 180.0f); |
3234 | 1328 | glVertex2f(width / 2.0, height / 2.0); | 1321 | const float c = cos(-ccdRotationAngle * M_PI / 180.0f); |
3235 | 1329 | glVertex2f(width / 2.0, -height / 2.0); | 1322 | const float cosHalfWidth = c * halfWidth; |
3236 | 1330 | glVertex2f(-width / 2.0, -height / 2.0); | 1323 | const float sinHalfWidth = s * halfWidth; |
3237 | 1331 | glEnd(); | 1324 | const float cosHalfHeight = c * halfHeight; |
3238 | 1325 | const float sinHalfHeight = s * halfHeight; | ||
3239 | 1326 | const Vec2f v1 = Vec2f(-cosHalfWidth - sinHalfHeight, -sinHalfWidth + cosHalfHeight); | ||
3240 | 1327 | const Vec2f v2 = Vec2f(cosHalfWidth - sinHalfHeight, sinHalfWidth + cosHalfHeight); | ||
3241 | 1328 | const Vec2f v3 = Vec2f(cosHalfWidth + sinHalfHeight, sinHalfWidth - cosHalfHeight); | ||
3242 | 1329 | const Vec2f v4 = Vec2f(-cosHalfWidth + sinHalfHeight, -sinHalfWidth - cosHalfHeight); | ||
3243 | 1330 | vertices->addVertex(VertexP2(offset + v1)); | ||
3244 | 1331 | vertices->addVertex(VertexP2(offset + v2)); | ||
3245 | 1332 | vertices->addVertex(VertexP2(offset + v3)); | ||
3246 | 1333 | vertices->addVertex(VertexP2(offset + v4)); | ||
3247 | 1334 | vertices->addVertex(VertexP2(offset + v1)); | ||
3248 | 1335 | vertices->lock(); | ||
3249 | 1336 | |||
3250 | 1337 | renderer->drawVertexBuffer(vertices); | ||
3251 | 1332 | } | 1338 | } |
3252 | 1333 | } | 1339 | } |
3253 | 1334 | } | 1340 | } |
3256 | 1335 | 1341 | delete vertices; | |
3255 | 1336 | glPopMatrix(); | ||
3257 | 1337 | } | 1342 | } |
3258 | 1338 | 1343 | ||
3260 | 1339 | void Oculars::paintCrosshairs() | 1344 | void Oculars::paintCrosshairs(StelRenderer* renderer) |
3261 | 1340 | { | 1345 | { |
3262 | 1341 | const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu); | 1346 | const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu); |
3263 | 1342 | StelCore *core = StelApp::getInstance().getCore(); | 1347 | StelCore *core = StelApp::getInstance().getCore(); |
3264 | 1343 | StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); | 1348 | StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); |
3265 | 1344 | // Center of screen | 1349 | // Center of screen |
3266 | 1345 | Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2, | 1350 | Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2, |
3269 | 1346 | projector->getViewportPosY()+projector->getViewportHeight()/2); | 1351 | projector->getViewportPosY()+projector->getViewportHeight()/2); |
3270 | 1347 | GLdouble length = 0.5 * params.viewportFovDiameter; | 1352 | double length = 0.5 * params.viewportFovDiameter; |
3271 | 1348 | // See if we need to scale the length | 1353 | // See if we need to scale the length |
3272 | 1349 | if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0) { | 1354 | if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0) { |
3273 | 1350 | length = oculars[selectedOcularIndex]->appearentFOV() * length / maxEyepieceAngle; | 1355 | length = oculars[selectedOcularIndex]->appearentFOV() * length / maxEyepieceAngle; |
3274 | 1351 | } | 1356 | } |
3275 | 1352 | 1357 | ||
3276 | 1353 | // Draw the lines | 1358 | // Draw the lines |
3283 | 1354 | StelPainter painter(projector); | 1359 | renderer->setGlobalColor(0.77f, 0.14f, 0.16f); |
3284 | 1355 | painter.setColor(0.77, 0.14, 0.16, 1); | 1360 | StelVertexBuffer<VertexP2>* vertices = |
3285 | 1356 | painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0], centerScreen[1] + length); | 1361 | renderer->createVertexBuffer<VertexP2>(PrimitiveType_Lines); |
3286 | 1357 | painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0], centerScreen[1] - length); | 1362 | const VertexP2 center(centerScreen[0], centerScreen[1]); |
3287 | 1358 | painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0] + length, centerScreen[1]); | 1363 | vertices->addVertex(center); |
3288 | 1359 | painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0] - length, centerScreen[1]); | 1364 | vertices->addVertex(VertexP2(centerScreen[0], centerScreen[1] + length)); |
3289 | 1365 | vertices->addVertex(center); | ||
3290 | 1366 | vertices->addVertex(VertexP2(centerScreen[0], centerScreen[1] - length)); | ||
3291 | 1367 | vertices->addVertex(center); | ||
3292 | 1368 | vertices->addVertex(VertexP2(centerScreen[0] + length, centerScreen[1])); | ||
3293 | 1369 | vertices->addVertex(center); | ||
3294 | 1370 | vertices->addVertex(VertexP2(centerScreen[0] - length, centerScreen[1])); | ||
3295 | 1371 | vertices->lock(); | ||
3296 | 1372 | |||
3297 | 1373 | renderer->drawVertexBuffer(vertices); | ||
3298 | 1374 | delete vertices; | ||
3299 | 1360 | } | 1375 | } |
3300 | 1361 | 1376 | ||
3302 | 1362 | void Oculars::paintTelrad() | 1377 | void Oculars::paintTelrad(StelRenderer* renderer) |
3303 | 1363 | { | 1378 | { |
3304 | 1364 | if (!flagShowOculars) { | 1379 | if (!flagShowOculars) { |
3305 | 1365 | const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu); | 1380 | const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu); |
3306 | @@ -1367,50 +1382,61 @@ | |||
3307 | 1367 | // StelCore *core = StelApp::getInstance().getCore(); | 1382 | // StelCore *core = StelApp::getInstance().getCore(); |
3308 | 1368 | // StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); | 1383 | // StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); |
3309 | 1369 | 1384 | ||
3313 | 1370 | // StelPainter drawing | 1385 | renderer->setGlobalColor(0.77f, 0.14f, 0.16f); |
3311 | 1371 | StelPainter painter(projector); | ||
3312 | 1372 | painter.setColor(0.77, 0.14, 0.16, 1.0); | ||
3314 | 1373 | Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2, | 1386 | Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2, |
3320 | 1374 | projector->getViewportPosY()+projector->getViewportHeight()/2); | 1387 | projector->getViewportPosY()+projector->getViewportHeight()/2); |
3321 | 1375 | painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (0.5)); | 1388 | |
3322 | 1376 | painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (2.0)); | 1389 | // Generate and draw the circles. |
3323 | 1377 | painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (4.0)); | 1390 | StelVertexBuffer<VertexP2>* circle = |
3324 | 1378 | 1391 | renderer->createVertexBuffer<VertexP2>(PrimitiveType_LineStrip); | |
3325 | 1392 | const float baseRadius = 0.5f * projector->getPixelPerRadAtCenter() * (M_PI / 180.0f); | ||
3326 | 1393 | StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 0.5f); | ||
3327 | 1394 | renderer->drawVertexBuffer(circle); | ||
3328 | 1395 | |||
3329 | 1396 | circle->unlock(); | ||
3330 | 1397 | circle->clear(); | ||
3331 | 1398 | StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 2.0f); | ||
3332 | 1399 | renderer->drawVertexBuffer(circle); | ||
3333 | 1400 | |||
3334 | 1401 | circle->unlock(); | ||
3335 | 1402 | circle->clear(); | ||
3336 | 1403 | StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 4.0f); | ||
3337 | 1404 | renderer->drawVertexBuffer(circle); | ||
3338 | 1405 | |||
3339 | 1406 | delete circle; | ||
3340 | 1379 | } | 1407 | } |
3341 | 1380 | } | 1408 | } |
3342 | 1381 | 1409 | ||
3344 | 1382 | void Oculars::paintOcularMask() | 1410 | |
3345 | 1411 | void Oculars::paintOcularMask(StelRenderer* renderer) | ||
3346 | 1383 | { | 1412 | { |
3347 | 1384 | StelCore *core = StelApp::getInstance().getCore(); | 1413 | StelCore *core = StelApp::getInstance().getCore(); |
3348 | 1385 | StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); | 1414 | StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams(); |
3349 | 1386 | 1415 | ||
3358 | 1387 | glDisable(GL_BLEND); | 1416 | renderer->setBlendMode(BlendMode_None); |
3359 | 1388 | glColor3f(0.f,0.f,0.f); | 1417 | renderer->setGlobalColor(0.0f, 0.0f, 0.0f); |
3360 | 1389 | glPushMatrix(); | 1418 | |
3361 | 1390 | glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0); | 1419 | float inner = 0.5f * params.viewportFovDiameter; |
3354 | 1391 | GLUquadricObj *quadric = gluNewQuadric(); | ||
3355 | 1392 | |||
3356 | 1393 | GLdouble inner = 0.5 * params.viewportFovDiameter; | ||
3357 | 1394 | |||
3362 | 1395 | // See if we need to scale the mask | 1420 | // See if we need to scale the mask |
3363 | 1396 | if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0 && !oculars[selectedOcularIndex]->isBinoculars()) { | 1421 | if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0 && !oculars[selectedOcularIndex]->isBinoculars()) { |
3364 | 1397 | inner = oculars[selectedOcularIndex]->appearentFOV() * inner / maxEyepieceAngle; | 1422 | inner = oculars[selectedOcularIndex]->appearentFOV() * inner / maxEyepieceAngle; |
3365 | 1398 | } | 1423 | } |
3366 | 1424 | const float outer = params.viewportXywh[2] + params.viewportXywh[3]; | ||
3367 | 1425 | const Vec2f offset(params.viewportCenter[0], params.viewportCenter[1]); | ||
3368 | 1399 | 1426 | ||
3372 | 1400 | GLdouble outer = params.viewportXywh[2] + params.viewportXywh[3]; | 1427 | StelGeometryRing* disc = |
3373 | 1401 | // Draw the mask | 1428 | StelGeometryBuilder().buildRing2D(RingParams(inner, outer).resolution(128, 1), offset); |
3374 | 1402 | gluDisk(quadric, inner, outer, 256, 1); | 1429 | disc->draw(renderer); |
3375 | 1403 | // the gray circle | 1430 | // the gray circle |
3380 | 1404 | glColor3f(0.15f,0.15f,0.15f); | 1431 | renderer->setGlobalColor(0.15f, 0.15f, 0.15f); |
3381 | 1405 | gluDisk(quadric, inner - 1.0, inner, 256, 1); | 1432 | disc->setInnerOuterRadius(inner - 1.0f, inner); |
3382 | 1406 | gluDeleteQuadric(quadric); | 1433 | disc->draw(renderer); |
3383 | 1407 | glPopMatrix(); | 1434 | delete disc; |
3384 | 1408 | } | 1435 | } |
3385 | 1409 | 1436 | ||
3387 | 1410 | void Oculars::paintText(const StelCore* core) | 1437 | void Oculars::paintText(const StelCore* core, StelRenderer* renderer) |
3388 | 1411 | { | 1438 | { |
3389 | 1412 | const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz); | 1439 | const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz); |
3390 | 1413 | StelPainter painter(prj); | ||
3391 | 1414 | 1440 | ||
3392 | 1415 | // Get the current instruments | 1441 | // Get the current instruments |
3393 | 1416 | CCD *ccd = NULL; | 1442 | CCD *ccd = NULL; |
3394 | @@ -1420,22 +1446,20 @@ | |||
3395 | 1420 | Ocular *ocular = oculars[selectedOcularIndex]; | 1446 | Ocular *ocular = oculars[selectedOcularIndex]; |
3396 | 1421 | Telescope *telescope = telescopes[selectedTelescopeIndex]; | 1447 | Telescope *telescope = telescopes[selectedTelescopeIndex]; |
3397 | 1422 | 1448 | ||
3403 | 1423 | // set up the color and the GL state | 1449 | // set up drawing |
3404 | 1424 | painter.setColor(0.8, 0.48, 0.0, 1); | 1450 | renderer->setGlobalColor(0.8f, 0.48f, 0.0f); |
3405 | 1425 | glDisable(GL_TEXTURE_2D); | 1451 | renderer->setBlendMode(BlendMode_Alpha); |
3401 | 1426 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||
3402 | 1427 | glEnable(GL_BLEND); | ||
3406 | 1428 | 1452 | ||
3407 | 1429 | // Get the X & Y positions, and the line height | 1453 | // Get the X & Y positions, and the line height |
3409 | 1430 | painter.setFont(font); | 1454 | renderer->setFont(font); |
3410 | 1431 | QString widthString = "MMMMMMMMMMMMMMMMMMM"; | 1455 | QString widthString = "MMMMMMMMMMMMMMMMMMM"; |
3412 | 1432 | float insetFromRHS = painter.getFontMetrics().width(widthString); | 1456 | const float insetFromRHS = QFontMetrics(font).width(widthString); |
3413 | 1433 | StelProjector::StelProjectorParams projectorParams = core->getCurrentStelProjectorParams(); | 1457 | StelProjector::StelProjectorParams projectorParams = core->getCurrentStelProjectorParams(); |
3414 | 1434 | int xPosition = projectorParams.viewportXywh[2]; | 1458 | int xPosition = projectorParams.viewportXywh[2]; |
3415 | 1435 | xPosition -= insetFromRHS; | 1459 | xPosition -= insetFromRHS; |
3416 | 1436 | int yPosition = projectorParams.viewportXywh[3]; | 1460 | int yPosition = projectorParams.viewportXywh[3]; |
3417 | 1437 | yPosition -= 40; | 1461 | yPosition -= 40; |
3419 | 1438 | const int lineHeight = painter.getFontMetrics().height(); | 1462 | const int lineHeight = QFontMetrics(font).height(); |
3420 | 1439 | 1463 | ||
3421 | 1440 | 1464 | ||
3422 | 1441 | // The Ocular | 1465 | // The Ocular |
3423 | @@ -1457,22 +1481,22 @@ | |||
3424 | 1457 | if (name.length() > widthString.length()) { | 1481 | if (name.length() > widthString.length()) { |
3425 | 1458 | xPosition -= (insetFromRHS / 2.0); | 1482 | xPosition -= (insetFromRHS / 2.0); |
3426 | 1459 | } | 1483 | } |
3428 | 1460 | painter.drawText(xPosition, yPosition, ocularNumberLabel); | 1484 | renderer->drawText(TextParams(xPosition, yPosition, ocularNumberLabel)); |
3429 | 1461 | yPosition-=lineHeight; | 1485 | yPosition-=lineHeight; |
3430 | 1462 | 1486 | ||
3431 | 1463 | if (!ocular->isBinoculars()) { | 1487 | if (!ocular->isBinoculars()) { |
3432 | 1464 | QString eFocalLength = QVariant(ocular->effectiveFocalLength()).toString(); | 1488 | QString eFocalLength = QVariant(ocular->effectiveFocalLength()).toString(); |
3433 | 1465 | // TRANSLATORS: FL = Focal length | 1489 | // TRANSLATORS: FL = Focal length |
3434 | 1466 | QString eFocalLengthLabel = QString(q_("Ocular FL: %1 mm")).arg(eFocalLength); | 1490 | QString eFocalLengthLabel = QString(q_("Ocular FL: %1 mm")).arg(eFocalLength); |
3436 | 1467 | painter.drawText(xPosition, yPosition, eFocalLengthLabel); | 1491 | renderer->drawText(TextParams(xPosition, yPosition, eFocalLengthLabel)); |
3437 | 1468 | yPosition-=lineHeight; | 1492 | yPosition-=lineHeight; |
3438 | 1469 | 1493 | ||
3439 | 1470 | QString ocularFov = QString::number(ocular->appearentFOV()); | 1494 | QString ocularFov = QString::number(ocular->appearentFOV()); |
3440 | 1471 | ocularFov.append(QChar(0x00B0));//Degree sign | 1495 | ocularFov.append(QChar(0x00B0));//Degree sign |
3441 | 1472 | // TRANSLATORS: aFOV = apparent field of view | 1496 | // TRANSLATORS: aFOV = apparent field of view |
3442 | 1473 | QString ocularFOVLabel = QString(q_("Ocular aFOV: %1")) | 1497 | QString ocularFOVLabel = QString(q_("Ocular aFOV: %1")) |
3445 | 1474 | .arg(ocularFov); | 1498 | .arg(ocularFov); |
3446 | 1475 | painter.drawText(xPosition, yPosition, ocularFOVLabel); | 1499 | renderer->drawText(TextParams(xPosition, yPosition, ocularFOVLabel)); |
3447 | 1476 | yPosition-=lineHeight; | 1500 | yPosition-=lineHeight; |
3448 | 1477 | 1501 | ||
3449 | 1478 | // The telescope | 1502 | // The telescope |
3450 | @@ -1489,7 +1513,7 @@ | |||
3451 | 1489 | .arg(selectedTelescopeIndex) | 1513 | .arg(selectedTelescopeIndex) |
3452 | 1490 | .arg(telescopeName); | 1514 | .arg(telescopeName); |
3453 | 1491 | } | 1515 | } |
3455 | 1492 | painter.drawText(xPosition, yPosition, telescopeNumberLabel); | 1516 | renderer->drawText(TextParams(xPosition, yPosition, telescopeNumberLabel)); |
3456 | 1493 | yPosition-=lineHeight; | 1517 | yPosition-=lineHeight; |
3457 | 1494 | 1518 | ||
3458 | 1495 | // General info | 1519 | // General info |
3459 | @@ -1498,14 +1522,14 @@ | |||
3460 | 1498 | magString.append(QChar(0x00D7));//Multiplication sign | 1522 | magString.append(QChar(0x00D7));//Multiplication sign |
3461 | 1499 | QString magnificationLabel = QString(q_("Magnification: %1")) | 1523 | QString magnificationLabel = QString(q_("Magnification: %1")) |
3462 | 1500 | .arg(magString); | 1524 | .arg(magString); |
3464 | 1501 | painter.drawText(xPosition, yPosition, magnificationLabel); | 1525 | renderer->drawText(TextParams(xPosition, yPosition, magnificationLabel)); |
3465 | 1502 | yPosition-=lineHeight; | 1526 | yPosition-=lineHeight; |
3466 | 1503 | 1527 | ||
3467 | 1504 | double fov = ((int)(ocular->actualFOV(telescope) * 10000.00)) / 10000.0; | 1528 | double fov = ((int)(ocular->actualFOV(telescope) * 10000.00)) / 10000.0; |
3468 | 1505 | QString fovString = QString::number(fov); | 1529 | QString fovString = QString::number(fov); |
3469 | 1506 | fovString.append(QChar(0x00B0));//Degree sign | 1530 | fovString.append(QChar(0x00B0));//Degree sign |
3470 | 1507 | QString fovLabel = QString(q_("FOV: %1")).arg(fovString); | 1531 | QString fovLabel = QString(q_("FOV: %1")).arg(fovString); |
3472 | 1508 | painter.drawText(xPosition, yPosition, fovLabel); | 1532 | renderer->drawText(TextParams(xPosition, yPosition, fovLabel)); |
3473 | 1509 | } | 1533 | } |
3474 | 1510 | } | 1534 | } |
3475 | 1511 | 1535 | ||
3476 | @@ -1527,9 +1551,9 @@ | |||
3477 | 1527 | .arg(selectedCCDIndex) | 1551 | .arg(selectedCCDIndex) |
3478 | 1528 | .arg(name); | 1552 | .arg(name); |
3479 | 1529 | } | 1553 | } |
3481 | 1530 | painter.drawText(xPosition, yPosition, ccdSensorLabel); | 1554 | renderer->drawText(TextParams(xPosition, yPosition, ccdSensorLabel)); |
3482 | 1531 | yPosition-=lineHeight; | 1555 | yPosition-=lineHeight; |
3484 | 1532 | painter.drawText(xPosition, yPosition, ccdInfoLabel); | 1556 | renderer->drawText(TextParams(xPosition, yPosition, ccdInfoLabel)); |
3485 | 1533 | yPosition-=lineHeight; | 1557 | yPosition-=lineHeight; |
3486 | 1534 | 1558 | ||
3487 | 1535 | // The telescope | 1559 | // The telescope |
3488 | @@ -1546,7 +1570,7 @@ | |||
3489 | 1546 | .arg(selectedTelescopeIndex) | 1570 | .arg(selectedTelescopeIndex) |
3490 | 1547 | .arg(telescopeName); | 1571 | .arg(telescopeName); |
3491 | 1548 | } | 1572 | } |
3493 | 1549 | painter.drawText(xPosition, yPosition, telescopeNumberLabel); | 1573 | renderer->drawText(TextParams(xPosition, yPosition, telescopeNumberLabel)); |
3494 | 1550 | } | 1574 | } |
3495 | 1551 | 1575 | ||
3496 | 1552 | } | 1576 | } |
3497 | 1553 | 1577 | ||
3498 | === modified file 'plugins/Oculars/src/Oculars.hpp' | |||
3499 | --- plugins/Oculars/src/Oculars.hpp 2012-07-06 17:00:39 +0000 | |||
3500 | +++ plugins/Oculars/src/Oculars.hpp 2012-08-30 16:29:19 +0000 | |||
3501 | @@ -62,7 +62,7 @@ | |||
3502 | 62 | virtual void init(); | 62 | virtual void init(); |
3503 | 63 | virtual void deinit(); | 63 | virtual void deinit(); |
3504 | 64 | virtual bool configureGui(bool show=true); | 64 | virtual bool configureGui(bool show=true); |
3506 | 65 | virtual void draw(StelCore* core); | 65 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
3507 | 66 | virtual double getCallOrder(StelModuleActionName actionName) const; | 66 | virtual double getCallOrder(StelModuleActionName actionName) const; |
3508 | 67 | //! Returns the module-specific style sheet. | 67 | //! Returns the module-specific style sheet. |
3509 | 68 | //! The main StelStyle instance should be passed. | 68 | //! The main StelStyle instance should be passed. |
3510 | @@ -134,18 +134,18 @@ | |||
3511 | 134 | bool isBinocularDefined(); | 134 | bool isBinocularDefined(); |
3512 | 135 | 135 | ||
3513 | 136 | //! Reneders the CCD bounding box on-screen. A telescope must be selected, or this call does nothing. | 136 | //! Reneders the CCD bounding box on-screen. A telescope must be selected, or this call does nothing. |
3515 | 137 | void paintCCDBounds(); | 137 | void paintCCDBounds(class StelRenderer* renderer); |
3516 | 138 | //! Renders crosshairs into the viewport. | 138 | //! Renders crosshairs into the viewport. |
3518 | 139 | void paintCrosshairs(); | 139 | void paintCrosshairs(class StelRenderer* renderer); |
3519 | 140 | //! Paint the mask into the viewport. | 140 | //! Paint the mask into the viewport. |
3521 | 141 | void paintOcularMask(); | 141 | void paintOcularMask(class StelRenderer* renderer); |
3522 | 142 | //! Renders the three Telrad circles, but only if not in ocular mode. | 142 | //! Renders the three Telrad circles, but only if not in ocular mode. |
3524 | 143 | void paintTelrad(); | 143 | void paintTelrad(class StelRenderer* renderer); |
3525 | 144 | 144 | ||
3526 | 145 | 145 | ||
3527 | 146 | //! Paints the text about the current object selections to the upper right hand of the screen. | 146 | //! Paints the text about the current object selections to the upper right hand of the screen. |
3528 | 147 | //! Should only be called from a 'ready' state; currently from the draw() method. | 147 | //! Should only be called from a 'ready' state; currently from the draw() method. |
3530 | 148 | void paintText(const StelCore* core); | 148 | void paintText(const StelCore* core, StelRenderer* renderer); |
3531 | 149 | 149 | ||
3532 | 150 | //! This method is called by the zoom() method, when this plugin is toggled off; it resets to the default view. | 150 | //! This method is called by the zoom() method, when this plugin is toggled off; it resets to the default view. |
3533 | 151 | void unzoomOcular(); | 151 | void unzoomOcular(); |
3534 | 152 | 152 | ||
3535 | === modified file 'plugins/Pulsars/src/Pulsar.cpp' | |||
3536 | --- plugins/Pulsars/src/Pulsar.cpp 2012-08-08 10:11:01 +0000 | |||
3537 | +++ plugins/Pulsars/src/Pulsar.cpp 2012-08-30 16:29:19 +0000 | |||
3538 | @@ -19,27 +19,23 @@ | |||
3539 | 19 | #include "Pulsar.hpp" | 19 | #include "Pulsar.hpp" |
3540 | 20 | #include "Pulsars.hpp" | 20 | #include "Pulsars.hpp" |
3541 | 21 | #include "StelObject.hpp" | 21 | #include "StelObject.hpp" |
3542 | 22 | #include "StelPainter.hpp" | ||
3543 | 23 | #include "StelApp.hpp" | 22 | #include "StelApp.hpp" |
3544 | 24 | #include "StelCore.hpp" | 23 | #include "StelCore.hpp" |
3545 | 25 | #include "StelTexture.hpp" | ||
3546 | 26 | #include "StelUtils.hpp" | 24 | #include "StelUtils.hpp" |
3547 | 27 | #include "StelTranslator.hpp" | 25 | #include "StelTranslator.hpp" |
3548 | 28 | #include "StelModuleMgr.hpp" | 26 | #include "StelModuleMgr.hpp" |
3549 | 29 | #include "StelSkyDrawer.hpp" | 27 | #include "StelSkyDrawer.hpp" |
3550 | 28 | #include "renderer/StelRenderer.hpp" | ||
3551 | 30 | 29 | ||
3552 | 31 | #include <QTextStream> | 30 | #include <QTextStream> |
3553 | 32 | #include <QDebug> | 31 | #include <QDebug> |
3554 | 33 | #include <QVariant> | 32 | #include <QVariant> |
3555 | 34 | #include <QtOpenGL> | ||
3556 | 35 | #include <QVariantMap> | 33 | #include <QVariantMap> |
3557 | 36 | #include <QVariant> | 34 | #include <QVariant> |
3558 | 37 | #include <QList> | 35 | #include <QList> |
3559 | 38 | 36 | ||
3560 | 39 | #define PSR_INERTIA 1.0e45 /* Typical moment of inertia for a pulsar */ | 37 | #define PSR_INERTIA 1.0e45 /* Typical moment of inertia for a pulsar */ |
3561 | 40 | 38 | ||
3562 | 41 | StelTextureSP Pulsar::markerTexture; | ||
3563 | 42 | |||
3564 | 43 | Pulsar::Pulsar(const QVariantMap& map) | 39 | Pulsar::Pulsar(const QVariantMap& map) |
3565 | 44 | : initialized(false) | 40 | : initialized(false) |
3566 | 45 | { | 41 | { |
3567 | @@ -334,7 +330,8 @@ | |||
3568 | 334 | labelsFader.update((int)(deltaTime*1000)); | 330 | labelsFader.update((int)(deltaTime*1000)); |
3569 | 335 | } | 331 | } |
3570 | 336 | 332 | ||
3572 | 337 | void Pulsar::draw(StelCore* core, StelPainter& painter) | 333 | void Pulsar::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector, |
3573 | 334 | StelTextureNew* markerTexture) | ||
3574 | 338 | { | 335 | { |
3575 | 339 | StelSkyDrawer* sd = core->getSkyDrawer(); | 336 | StelSkyDrawer* sd = core->getSkyDrawer(); |
3576 | 340 | 337 | ||
3577 | @@ -345,27 +342,26 @@ | |||
3578 | 345 | double mag = getVMagnitude(core, true); | 342 | double mag = getVMagnitude(core, true); |
3579 | 346 | 343 | ||
3580 | 347 | StelUtils::spheToRect(RA, DE, XYZ); | 344 | StelUtils::spheToRect(RA, DE, XYZ); |
3584 | 348 | glEnable(GL_BLEND); | 345 | renderer->setBlendMode(BlendMode_Add); |
3585 | 349 | glBlendFunc(GL_ONE, GL_ONE); | 346 | renderer->setGlobalColor(color[0], color[1], color[2]); |
3583 | 350 | painter.setColor(color[0], color[1], color[2], 1); | ||
3586 | 351 | 347 | ||
3587 | 352 | if (mag <= sd->getLimitMagnitude()) | 348 | if (mag <= sd->getLimitMagnitude()) |
3588 | 353 | { | 349 | { |
3593 | 354 | 350 | markerTexture->bind(); | |
3594 | 355 | Pulsar::markerTexture->bind(); | 351 | const float size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter(); |
3595 | 356 | float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter(); | 352 | const float shift = 5.f + size/1.6f; |
3592 | 357 | float shift = 5.f + size/1.6f; | ||
3596 | 358 | if (labelsFader.getInterstate()<=0.f) | 353 | if (labelsFader.getInterstate()<=0.f) |
3597 | 359 | { | 354 | { |
3598 | 355 | Vec3d win; | ||
3599 | 356 | if(!projector->project(XYZ, win)){return;} | ||
3600 | 360 | if (GETSTELMODULE(Pulsars)->getDisplayMode()) | 357 | if (GETSTELMODULE(Pulsars)->getDisplayMode()) |
3601 | 361 | { | 358 | { |
3604 | 362 | painter.drawSprite2dMode(XYZ, 4); | 359 | renderer->drawTexturedRect(win[0] - 4, win[1] - 4, 8, 8); |
3603 | 363 | painter.drawText(XYZ, " ", 0, shift, shift, false); | ||
3605 | 364 | } | 360 | } |
3606 | 365 | else | 361 | else |
3607 | 366 | { | 362 | { |
3610 | 367 | painter.drawSprite2dMode(XYZ, 5); | 363 | renderer->drawTexturedRect(win[0] - 5, win[1] - 5, 10, 10); |
3611 | 368 | painter.drawText(XYZ, designation, 0, shift, shift, false); | 364 | renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity()); |
3612 | 369 | } | 365 | } |
3613 | 370 | } | 366 | } |
3614 | 371 | } | 367 | } |
3615 | 372 | 368 | ||
3616 | === modified file 'plugins/Pulsars/src/Pulsar.hpp' | |||
3617 | --- plugins/Pulsars/src/Pulsar.hpp 2012-05-20 11:10:52 +0000 | |||
3618 | +++ plugins/Pulsars/src/Pulsar.hpp 2012-08-30 16:29:19 +0000 | |||
3619 | @@ -27,11 +27,10 @@ | |||
3620 | 27 | #include <QDateTime> | 27 | #include <QDateTime> |
3621 | 28 | 28 | ||
3622 | 29 | #include "StelObject.hpp" | 29 | #include "StelObject.hpp" |
3625 | 30 | #include "StelTextureTypes.hpp" | 30 | #include "StelProjectorType.hpp" |
3626 | 31 | #include "StelPainter.hpp" | 31 | |
3627 | 32 | #include "StelFader.hpp" | 32 | #include "StelFader.hpp" |
3628 | 33 | 33 | ||
3629 | 34 | class StelPainter; | ||
3630 | 35 | 34 | ||
3631 | 36 | //! @class Pulsar | 35 | //! @class Pulsar |
3632 | 37 | //! A Pulsar object represents one pulsar on the sky. | 36 | //! A Pulsar object represents one pulsar on the sky. |
3633 | @@ -88,10 +87,8 @@ | |||
3634 | 88 | 87 | ||
3635 | 89 | Vec3d XYZ; // holds J2000 position | 88 | Vec3d XYZ; // holds J2000 position |
3636 | 90 | 89 | ||
3641 | 91 | static StelTextureSP hintTexture; | 90 | void draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector, |
3642 | 92 | static StelTextureSP markerTexture; | 91 | class StelTextureNew* markerTexture); |
3639 | 93 | |||
3640 | 94 | void draw(StelCore* core, StelPainter& painter); | ||
3643 | 95 | 92 | ||
3644 | 96 | //! Variables for description of properties of pulsars | 93 | //! Variables for description of properties of pulsars |
3645 | 97 | QString designation; //! The designation of the pulsar (J2000 pulsar name) | 94 | QString designation; //! The designation of the pulsar (J2000 pulsar name) |
3646 | 98 | 95 | ||
3647 | === modified file 'plugins/Pulsars/src/Pulsars.cpp' | |||
3648 | --- plugins/Pulsars/src/Pulsars.cpp 2012-06-17 08:17:55 +0000 | |||
3649 | +++ plugins/Pulsars/src/Pulsars.cpp 2012-08-30 16:29:19 +0000 | |||
3650 | @@ -17,7 +17,6 @@ | |||
3651 | 17 | */ | 17 | */ |
3652 | 18 | 18 | ||
3653 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
3654 | 20 | #include "StelPainter.hpp" | ||
3655 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
3656 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
3657 | 23 | #include "StelGui.hpp" | 22 | #include "StelGui.hpp" |
3658 | @@ -25,7 +24,6 @@ | |||
3659 | 25 | #include "StelLocaleMgr.hpp" | 24 | #include "StelLocaleMgr.hpp" |
3660 | 26 | #include "StelModuleMgr.hpp" | 25 | #include "StelModuleMgr.hpp" |
3661 | 27 | #include "StelObjectMgr.hpp" | 26 | #include "StelObjectMgr.hpp" |
3662 | 28 | #include "StelTextureMgr.hpp" | ||
3663 | 29 | #include "StelJsonParser.hpp" | 27 | #include "StelJsonParser.hpp" |
3664 | 30 | #include "StelFileMgr.hpp" | 28 | #include "StelFileMgr.hpp" |
3665 | 31 | #include "StelUtils.hpp" | 29 | #include "StelUtils.hpp" |
3666 | @@ -34,6 +32,7 @@ | |||
3667 | 34 | #include "Pulsar.hpp" | 32 | #include "Pulsar.hpp" |
3668 | 35 | #include "Pulsars.hpp" | 33 | #include "Pulsars.hpp" |
3669 | 36 | #include "PulsarsDialog.hpp" | 34 | #include "PulsarsDialog.hpp" |
3670 | 35 | #include "renderer/StelRenderer.hpp" | ||
3671 | 37 | 36 | ||
3672 | 38 | #include <QNetworkAccessManager> | 37 | #include <QNetworkAccessManager> |
3673 | 39 | #include <QNetworkReply> | 38 | #include <QNetworkReply> |
3674 | @@ -47,6 +46,7 @@ | |||
3675 | 47 | #include <QVariantMap> | 46 | #include <QVariantMap> |
3676 | 48 | #include <QVariant> | 47 | #include <QVariant> |
3677 | 49 | #include <QList> | 48 | #include <QList> |
3678 | 49 | #include <QSettings> | ||
3679 | 50 | #include <QSharedPointer> | 50 | #include <QSharedPointer> |
3680 | 51 | #include <QStringList> | 51 | #include <QStringList> |
3681 | 52 | 52 | ||
3682 | @@ -81,7 +81,9 @@ | |||
3683 | 81 | Constructor | 81 | Constructor |
3684 | 82 | */ | 82 | */ |
3685 | 83 | Pulsars::Pulsars() | 83 | Pulsars::Pulsars() |
3687 | 84 | : progressBar(NULL) | 84 | : texPointer(NULL) |
3688 | 85 | , markerTexture(NULL) | ||
3689 | 86 | , progressBar(NULL) | ||
3690 | 85 | { | 87 | { |
3691 | 86 | setObjectName("Pulsars"); | 88 | setObjectName("Pulsars"); |
3692 | 87 | configDialog = new PulsarsDialog(); | 89 | configDialog = new PulsarsDialog(); |
3693 | @@ -100,8 +102,14 @@ | |||
3694 | 100 | void Pulsars::deinit() | 102 | void Pulsars::deinit() |
3695 | 101 | { | 103 | { |
3696 | 102 | psr.clear(); | 104 | psr.clear(); |
3699 | 103 | Pulsar::markerTexture.clear(); | 105 | if(NULL != markerTexture) |
3700 | 104 | texPointer.clear(); | 106 | { |
3701 | 107 | delete markerTexture; | ||
3702 | 108 | } | ||
3703 | 109 | if(NULL != texPointer) | ||
3704 | 110 | { | ||
3705 | 111 | delete texPointer; | ||
3706 | 112 | } | ||
3707 | 105 | } | 113 | } |
3708 | 106 | 114 | ||
3709 | 107 | /* | 115 | /* |
3710 | @@ -136,9 +144,6 @@ | |||
3711 | 136 | 144 | ||
3712 | 137 | jsonCatalogPath = StelFileMgr::findFile("modules/Pulsars", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/pulsars.json"; | 145 | jsonCatalogPath = StelFileMgr::findFile("modules/Pulsars", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/pulsars.json"; |
3713 | 138 | 146 | ||
3714 | 139 | texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png"); | ||
3715 | 140 | Pulsar::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Pulsars/pulsar.png"); | ||
3716 | 141 | |||
3717 | 142 | // key bindings and other actions | 147 | // key bindings and other actions |
3718 | 143 | // TRANSLATORS: Title of a group of key bindings in the Help window | 148 | // TRANSLATORS: Title of a group of key bindings in the Help window |
3719 | 144 | QString groupName = N_("Plugin Key Bindings"); | 149 | QString groupName = N_("Plugin Key Bindings"); |
3720 | @@ -195,27 +200,31 @@ | |||
3721 | 195 | /* | 200 | /* |
3722 | 196 | Draw our module. This should print name of first PSR in the main window | 201 | Draw our module. This should print name of first PSR in the main window |
3723 | 197 | */ | 202 | */ |
3725 | 198 | void Pulsars::draw(StelCore* core) | 203 | void Pulsars::draw(StelCore* core, StelRenderer* renderer) |
3726 | 199 | { | 204 | { |
3727 | 200 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 205 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
3730 | 201 | StelPainter painter(prj); | 206 | renderer->setFont(font); |
3729 | 202 | painter.setFont(font); | ||
3731 | 203 | 207 | ||
3732 | 204 | foreach (const PulsarP& pulsar, psr) | 208 | foreach (const PulsarP& pulsar, psr) |
3733 | 205 | { | 209 | { |
3734 | 206 | if (pulsar && pulsar->initialized) | 210 | if (pulsar && pulsar->initialized) |
3736 | 207 | pulsar->draw(core, painter); | 211 | { |
3737 | 212 | if(NULL == markerTexture) | ||
3738 | 213 | { | ||
3739 | 214 | markerTexture = renderer->createTexture(":/Pulsars/pulsar.png"); | ||
3740 | 215 | } | ||
3741 | 216 | pulsar->draw(core, renderer, prj, markerTexture); | ||
3742 | 217 | } | ||
3743 | 208 | } | 218 | } |
3744 | 209 | 219 | ||
3745 | 210 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) | 220 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) |
3748 | 211 | drawPointer(core, painter); | 221 | { |
3749 | 212 | 222 | drawPointer(core, renderer, prj); | |
3750 | 223 | } | ||
3751 | 213 | } | 224 | } |
3752 | 214 | 225 | ||
3754 | 215 | void Pulsars::drawPointer(StelCore* core, StelPainter& painter) | 226 | void Pulsars::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector) |
3755 | 216 | { | 227 | { |
3756 | 217 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | ||
3757 | 218 | |||
3758 | 219 | const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Pulsar"); | 228 | const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Pulsar"); |
3759 | 220 | if (!newSelected.empty()) | 229 | if (!newSelected.empty()) |
3760 | 221 | { | 230 | { |
3761 | @@ -224,16 +233,21 @@ | |||
3762 | 224 | 233 | ||
3763 | 225 | Vec3d screenpos; | 234 | Vec3d screenpos; |
3764 | 226 | // Compute 2D pos and return if outside screen | 235 | // Compute 2D pos and return if outside screen |
3767 | 227 | if (!painter.getProjector()->project(pos, screenpos)) | 236 | if (!projector->project(pos, screenpos)) |
3768 | 228 | return; | 237 | { |
3769 | 238 | return; | ||
3770 | 239 | } | ||
3771 | 229 | 240 | ||
3772 | 230 | const Vec3f& c(obj->getInfoColor()); | 241 | const Vec3f& c(obj->getInfoColor()); |
3774 | 231 | painter.setColor(c[0],c[1],c[2]); | 242 | renderer->setGlobalColor(c[0], c[1], c[2]); |
3775 | 243 | if(NULL == texPointer) | ||
3776 | 244 | { | ||
3777 | 245 | texPointer = renderer->createTexture("textures/pointeur2.png"); | ||
3778 | 246 | } | ||
3779 | 232 | texPointer->bind(); | 247 | texPointer->bind(); |
3784 | 233 | painter.enableTexture2d(true); | 248 | renderer->setBlendMode(BlendMode_Alpha); |
3785 | 234 | glEnable(GL_BLEND); | 249 | renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, 26.0f, |
3786 | 235 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode | 250 | StelApp::getInstance().getTotalRunTime() * 40.0f); |
3783 | 236 | painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.); | ||
3787 | 237 | } | 251 | } |
3788 | 238 | } | 252 | } |
3789 | 239 | 253 | ||
3790 | 240 | 254 | ||
3791 | === modified file 'plugins/Pulsars/src/Pulsars.hpp' | |||
3792 | --- plugins/Pulsars/src/Pulsars.hpp 2012-06-17 08:17:55 +0000 | |||
3793 | +++ plugins/Pulsars/src/Pulsars.hpp 2012-08-30 16:29:19 +0000 | |||
3794 | @@ -22,8 +22,6 @@ | |||
3795 | 22 | #include "StelObjectModule.hpp" | 22 | #include "StelObjectModule.hpp" |
3796 | 23 | #include "StelObject.hpp" | 23 | #include "StelObject.hpp" |
3797 | 24 | #include "StelFader.hpp" | 24 | #include "StelFader.hpp" |
3798 | 25 | #include "StelTextureTypes.hpp" | ||
3799 | 26 | #include "StelPainter.hpp" | ||
3800 | 27 | #include "Pulsar.hpp" | 25 | #include "Pulsar.hpp" |
3801 | 28 | #include <QFont> | 26 | #include <QFont> |
3802 | 29 | #include <QVariantMap> | 27 | #include <QVariantMap> |
3803 | @@ -38,7 +36,6 @@ | |||
3804 | 38 | class QTimer; | 36 | class QTimer; |
3805 | 39 | class PulsarsDialog; | 37 | class PulsarsDialog; |
3806 | 40 | 38 | ||
3807 | 41 | class StelPainter; | ||
3808 | 42 | 39 | ||
3809 | 43 | typedef QSharedPointer<Pulsar> PulsarP; | 40 | typedef QSharedPointer<Pulsar> PulsarP; |
3810 | 44 | 41 | ||
3811 | @@ -65,8 +62,8 @@ | |||
3812 | 65 | virtual void init(); | 62 | virtual void init(); |
3813 | 66 | virtual void deinit(); | 63 | virtual void deinit(); |
3814 | 67 | virtual void update(double) {;} | 64 | virtual void update(double) {;} |
3817 | 68 | virtual void draw(StelCore* core); | 65 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
3818 | 69 | virtual void drawPointer(StelCore* core, StelPainter& painter); | 66 | virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector); |
3819 | 70 | virtual double getCallOrder(StelModuleActionName actionName) const; | 67 | virtual double getCallOrder(StelModuleActionName actionName) const; |
3820 | 71 | 68 | ||
3821 | 72 | /////////////////////////////////////////////////////////////////////////// | 69 | /////////////////////////////////////////////////////////////////////////// |
3822 | @@ -180,7 +177,8 @@ | |||
3823 | 180 | 177 | ||
3824 | 181 | QString jsonCatalogPath; | 178 | QString jsonCatalogPath; |
3825 | 182 | 179 | ||
3827 | 183 | StelTextureSP texPointer; | 180 | class StelTextureNew* texPointer; |
3828 | 181 | class StelTextureNew* markerTexture; | ||
3829 | 184 | QList<PulsarP> psr; | 182 | QList<PulsarP> psr; |
3830 | 185 | 183 | ||
3831 | 186 | // variables and functions for the updater | 184 | // variables and functions for the updater |
3832 | 187 | 185 | ||
3833 | === modified file 'plugins/Quasars/src/Quasar.cpp' | |||
3834 | --- plugins/Quasars/src/Quasar.cpp 2012-08-08 10:11:01 +0000 | |||
3835 | +++ plugins/Quasars/src/Quasar.cpp 2012-08-30 16:29:19 +0000 | |||
3836 | @@ -19,24 +19,21 @@ | |||
3837 | 19 | #include "Quasar.hpp" | 19 | #include "Quasar.hpp" |
3838 | 20 | #include "Quasars.hpp" | 20 | #include "Quasars.hpp" |
3839 | 21 | #include "StelObject.hpp" | 21 | #include "StelObject.hpp" |
3840 | 22 | #include "StelPainter.hpp" | ||
3841 | 23 | #include "StelApp.hpp" | 22 | #include "StelApp.hpp" |
3842 | 24 | #include "StelCore.hpp" | 23 | #include "StelCore.hpp" |
3843 | 25 | #include "StelTexture.hpp" | ||
3844 | 26 | #include "StelUtils.hpp" | 24 | #include "StelUtils.hpp" |
3845 | 27 | #include "StelTranslator.hpp" | 25 | #include "StelTranslator.hpp" |
3846 | 28 | #include "StelModuleMgr.hpp" | 26 | #include "StelModuleMgr.hpp" |
3847 | 29 | #include "StelSkyDrawer.hpp" | 27 | #include "StelSkyDrawer.hpp" |
3848 | 28 | #include "renderer/StelRenderer.hpp" | ||
3849 | 30 | 29 | ||
3850 | 31 | #include <QTextStream> | 30 | #include <QTextStream> |
3851 | 32 | #include <QDebug> | 31 | #include <QDebug> |
3852 | 33 | #include <QVariant> | 32 | #include <QVariant> |
3853 | 34 | #include <QtOpenGL> | ||
3854 | 35 | #include <QVariantMap> | 33 | #include <QVariantMap> |
3855 | 36 | #include <QVariant> | 34 | #include <QVariant> |
3856 | 37 | #include <QList> | 35 | #include <QList> |
3857 | 38 | 36 | ||
3858 | 39 | StelTextureSP Quasar::markerTexture; | ||
3859 | 40 | 37 | ||
3860 | 41 | Quasar::Quasar(const QVariantMap& map) | 38 | Quasar::Quasar(const QVariantMap& map) |
3861 | 42 | : initialized(false) | 39 | : initialized(false) |
3862 | @@ -170,11 +167,11 @@ | |||
3863 | 170 | labelsFader.update((int)(deltaTime*1000)); | 167 | labelsFader.update((int)(deltaTime*1000)); |
3864 | 171 | } | 168 | } |
3865 | 172 | 169 | ||
3867 | 173 | void Quasar::draw(StelCore* core, StelPainter& painter) | 170 | void Quasar::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector, StelTextureNew* markerTexture) |
3868 | 174 | { | 171 | { |
3869 | 175 | StelSkyDrawer* sd = core->getSkyDrawer(); | 172 | StelSkyDrawer* sd = core->getSkyDrawer(); |
3870 | 176 | 173 | ||
3872 | 177 | Vec3f color = sd->indexToColor(BvToColorIndex(bV))*0.75f; | 174 | const Vec3f color = sd->indexToColor(BvToColorIndex(bV))*0.75f; |
3873 | 178 | Vec3f dcolor = Vec3f(1.2f,0.5f,0.4f); | 175 | Vec3f dcolor = Vec3f(1.2f,0.5f,0.4f); |
3874 | 179 | if (StelApp::getInstance().getVisionModeNight()) | 176 | if (StelApp::getInstance().getVisionModeNight()) |
3875 | 180 | dcolor = StelUtils::getNightColor(dcolor); | 177 | dcolor = StelUtils::getNightColor(dcolor); |
3876 | @@ -183,42 +180,42 @@ | |||
3877 | 183 | double mag; | 180 | double mag; |
3878 | 184 | 181 | ||
3879 | 185 | StelUtils::spheToRect(qRA, qDE, XYZ); | 182 | StelUtils::spheToRect(qRA, qDE, XYZ); |
3881 | 186 | mag = getVMagnitude(core, true); | 183 | mag = getVMagnitude(core, true); |
3882 | 187 | 184 | ||
3883 | 188 | if (GETSTELMODULE(Quasars)->getDisplayMode()) | 185 | if (GETSTELMODULE(Quasars)->getDisplayMode()) |
3884 | 189 | { | 186 | { |
3891 | 190 | glEnable(GL_BLEND); | 187 | renderer->setBlendMode(BlendMode_Add); |
3892 | 191 | glBlendFunc(GL_ONE, GL_ONE); | 188 | renderer->setGlobalColor(dcolor[0], dcolor[1], dcolor[2], 1); |
3893 | 192 | painter.setColor(dcolor[0], dcolor[1], dcolor[2], 1); | 189 | size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter(); |
3888 | 193 | |||
3889 | 194 | Quasar::markerTexture->bind(); | ||
3890 | 195 | size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter(); | ||
3894 | 196 | shift = 5.f + size/1.6f; | 190 | shift = 5.f + size/1.6f; |
3895 | 191 | markerTexture->bind(); | ||
3896 | 197 | if (labelsFader.getInterstate()<=0.f) | 192 | if (labelsFader.getInterstate()<=0.f) |
3897 | 198 | { | 193 | { |
3900 | 199 | painter.drawSprite2dMode(XYZ, 4); | 194 | Vec3d win; |
3901 | 200 | painter.drawText(XYZ, " ", 0, shift, shift, false); | 195 | if(projector->project(XYZ, win)) |
3902 | 196 | { | ||
3903 | 197 | renderer->drawTexturedRect(win[0] - 4, win[1] - 4, 8, 8); | ||
3904 | 198 | } | ||
3905 | 201 | } | 199 | } |
3906 | 202 | } | 200 | } |
3907 | 203 | else | 201 | else |
3908 | 204 | { | 202 | { |
3910 | 205 | sd->preDrawPointSource(&painter); | 203 | sd->preDrawPointSource(); |
3911 | 206 | 204 | ||
3912 | 207 | if (mag <= sd->getLimitMagnitude()) | 205 | if (mag <= sd->getLimitMagnitude()) |
3913 | 208 | { | 206 | { |
3914 | 209 | sd->computeRCMag(mag, rcMag); | 207 | sd->computeRCMag(mag, rcMag); |
3919 | 210 | //sd->drawPointSource(&painter, Vec3f(XYZ[0], XYZ[1], XYZ[2]), rcMag, sd->indexToColor(BvToColorIndex(bV)), false); | 208 | sd->drawPointSource(projector, XYZ, rcMag, sd->indexToColor(BvToColorIndex(bV)), false); |
3920 | 211 | sd->drawPointSource(&painter, XYZ, rcMag, sd->indexToColor(BvToColorIndex(bV)), false); | 209 | renderer->setGlobalColor(color[0], color[1], color[2], 1.0f); |
3921 | 212 | painter.setColor(color[0], color[1], color[2], 1); | 210 | size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter(); |
3918 | 213 | size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter(); | ||
3922 | 214 | shift = 6.f + size/1.8f; | 211 | shift = 6.f + size/1.8f; |
3923 | 215 | if (labelsFader.getInterstate()<=0.f) | 212 | if (labelsFader.getInterstate()<=0.f) |
3924 | 216 | { | 213 | { |
3926 | 217 | painter.drawText(XYZ, designation, 0, shift, shift, false); | 214 | renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity()); |
3927 | 218 | } | 215 | } |
3928 | 219 | } | 216 | } |
3929 | 220 | 217 | ||
3931 | 221 | sd->postDrawPointSource(&painter); | 218 | sd->postDrawPointSource(projector); |
3932 | 222 | } | 219 | } |
3933 | 223 | } | 220 | } |
3934 | 224 | 221 | ||
3935 | 225 | 222 | ||
3936 | === modified file 'plugins/Quasars/src/Quasar.hpp' | |||
3937 | --- plugins/Quasars/src/Quasar.hpp 2012-06-17 08:33:36 +0000 | |||
3938 | +++ plugins/Quasars/src/Quasar.hpp 2012-08-30 16:29:19 +0000 | |||
3939 | @@ -27,11 +27,9 @@ | |||
3940 | 27 | #include <QDateTime> | 27 | #include <QDateTime> |
3941 | 28 | 28 | ||
3942 | 29 | #include "StelObject.hpp" | 29 | #include "StelObject.hpp" |
3943 | 30 | #include "StelTextureTypes.hpp" | ||
3944 | 31 | #include "StelPainter.hpp" | ||
3945 | 32 | #include "StelFader.hpp" | 30 | #include "StelFader.hpp" |
3946 | 31 | #include "StelProjectorType.hpp" | ||
3947 | 33 | 32 | ||
3948 | 34 | class StelPainter; | ||
3949 | 35 | 33 | ||
3950 | 36 | //! @class Quasar | 34 | //! @class Quasar |
3951 | 37 | //! A Quasar object represents one Quasar on the sky. | 35 | //! A Quasar object represents one Quasar on the sky. |
3952 | @@ -83,10 +81,9 @@ | |||
3953 | 83 | 81 | ||
3954 | 84 | Vec3d XYZ; // holds J2000 position | 82 | Vec3d XYZ; // holds J2000 position |
3955 | 85 | 83 | ||
3958 | 86 | static StelTextureSP hintTexture; | 84 | void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector, |
3959 | 87 | static StelTextureSP markerTexture; | 85 | class StelTextureNew* markerTexture); |
3960 | 88 | 86 | ||
3961 | 89 | void draw(StelCore* core, StelPainter& painter); | ||
3962 | 90 | //! Calculate a color of quasar | 87 | //! Calculate a color of quasar |
3963 | 91 | //! @param b_v value of B-V color index | 88 | //! @param b_v value of B-V color index |
3964 | 92 | unsigned char BvToColorIndex(float b_v); | 89 | unsigned char BvToColorIndex(float b_v); |
3965 | 93 | 90 | ||
3966 | === modified file 'plugins/Quasars/src/Quasars.cpp' | |||
3967 | --- plugins/Quasars/src/Quasars.cpp 2012-06-17 08:33:36 +0000 | |||
3968 | +++ plugins/Quasars/src/Quasars.cpp 2012-08-30 16:29:19 +0000 | |||
3969 | @@ -17,7 +17,6 @@ | |||
3970 | 17 | */ | 17 | */ |
3971 | 18 | 18 | ||
3972 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
3973 | 20 | #include "StelPainter.hpp" | ||
3974 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
3975 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
3976 | 23 | #include "StelGui.hpp" | 22 | #include "StelGui.hpp" |
3977 | @@ -25,7 +24,6 @@ | |||
3978 | 25 | #include "StelLocaleMgr.hpp" | 24 | #include "StelLocaleMgr.hpp" |
3979 | 26 | #include "StelModuleMgr.hpp" | 25 | #include "StelModuleMgr.hpp" |
3980 | 27 | #include "StelObjectMgr.hpp" | 26 | #include "StelObjectMgr.hpp" |
3981 | 28 | #include "StelTextureMgr.hpp" | ||
3982 | 29 | #include "StelJsonParser.hpp" | 27 | #include "StelJsonParser.hpp" |
3983 | 30 | #include "StelFileMgr.hpp" | 28 | #include "StelFileMgr.hpp" |
3984 | 31 | #include "StelUtils.hpp" | 29 | #include "StelUtils.hpp" |
3985 | @@ -33,6 +31,7 @@ | |||
3986 | 33 | #include "LabelMgr.hpp" | 31 | #include "LabelMgr.hpp" |
3987 | 34 | #include "Quasar.hpp" | 32 | #include "Quasar.hpp" |
3988 | 35 | #include "Quasars.hpp" | 33 | #include "Quasars.hpp" |
3989 | 34 | #include "renderer/StelRenderer.hpp" | ||
3990 | 36 | #include "QuasarsDialog.hpp" | 35 | #include "QuasarsDialog.hpp" |
3991 | 37 | 36 | ||
3992 | 38 | #include <QNetworkAccessManager> | 37 | #include <QNetworkAccessManager> |
3993 | @@ -41,14 +40,15 @@ | |||
3994 | 41 | #include <QAction> | 40 | #include <QAction> |
3995 | 42 | #include <QProgressBar> | 41 | #include <QProgressBar> |
3996 | 43 | #include <QDebug> | 42 | #include <QDebug> |
3997 | 43 | #include <QFile> | ||
3998 | 44 | #include <QFileInfo> | 44 | #include <QFileInfo> |
3999 | 45 | #include <QFile> | ||
4000 | 46 | #include <QTimer> | 45 | #include <QTimer> |
4001 | 47 | #include <QVariantMap> | ||
4002 | 48 | #include <QVariant> | ||
4003 | 49 | #include <QList> | 46 | #include <QList> |
4004 | 47 | #include <QSettings> | ||
4005 | 50 | #include <QSharedPointer> | 48 | #include <QSharedPointer> |
4006 | 51 | #include <QStringList> | 49 | #include <QStringList> |
4007 | 50 | #include <QVariant> | ||
4008 | 51 | #include <QVariantMap> | ||
4009 | 52 | 52 | ||
4010 | 53 | #define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */ | 53 | #define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */ |
4011 | 54 | 54 | ||
4012 | @@ -81,7 +81,9 @@ | |||
4013 | 81 | Constructor | 81 | Constructor |
4014 | 82 | */ | 82 | */ |
4015 | 83 | Quasars::Quasars() | 83 | Quasars::Quasars() |
4017 | 84 | : progressBar(NULL) | 84 | : texPointer(NULL) |
4018 | 85 | , markerTexture(NULL) | ||
4019 | 86 | , progressBar(NULL) | ||
4020 | 85 | { | 87 | { |
4021 | 86 | setObjectName("Quasars"); | 88 | setObjectName("Quasars"); |
4022 | 87 | configDialog = new QuasarsDialog(); | 89 | configDialog = new QuasarsDialog(); |
4023 | @@ -99,9 +101,10 @@ | |||
4024 | 99 | 101 | ||
4025 | 100 | void Quasars::deinit() | 102 | void Quasars::deinit() |
4026 | 101 | { | 103 | { |
4027 | 104 | if(NULL != texPointer) {delete texPointer;} | ||
4028 | 105 | if(NULL != markerTexture) {delete markerTexture;} | ||
4029 | 106 | texPointer = markerTexture = NULL; | ||
4030 | 102 | QSO.clear(); | 107 | QSO.clear(); |
4031 | 103 | Quasar::markerTexture.clear(); | ||
4032 | 104 | texPointer.clear(); | ||
4033 | 105 | } | 108 | } |
4034 | 106 | 109 | ||
4035 | 107 | /* | 110 | /* |
4036 | @@ -136,9 +139,6 @@ | |||
4037 | 136 | 139 | ||
4038 | 137 | catalogJsonPath = StelFileMgr::findFile("modules/Quasars", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/quasars.json"; | 140 | catalogJsonPath = StelFileMgr::findFile("modules/Quasars", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/quasars.json"; |
4039 | 138 | 141 | ||
4040 | 139 | texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png"); | ||
4041 | 140 | Quasar::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Quasars/quasar.png"); | ||
4042 | 141 | |||
4043 | 142 | // key bindings and other actions | 142 | // key bindings and other actions |
4044 | 143 | // TRANSLATORS: Title of a group of key bindings in the Help window | 143 | // TRANSLATORS: Title of a group of key bindings in the Help window |
4045 | 144 | QString groupName = N_("Plugin Key Bindings"); | 144 | QString groupName = N_("Plugin Key Bindings"); |
4046 | @@ -195,45 +195,55 @@ | |||
4047 | 195 | /* | 195 | /* |
4048 | 196 | Draw our module. This should print name of first QSO in the main window | 196 | Draw our module. This should print name of first QSO in the main window |
4049 | 197 | */ | 197 | */ |
4051 | 198 | void Quasars::draw(StelCore* core) | 198 | void Quasars::draw(StelCore* core, class StelRenderer* renderer) |
4052 | 199 | { | 199 | { |
4053 | 200 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 200 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
4056 | 201 | StelPainter painter(prj); | 201 | renderer->setFont(font); |
4057 | 202 | painter.setFont(font); | 202 | |
4058 | 203 | if(NULL == markerTexture) | ||
4059 | 204 | { | ||
4060 | 205 | markerTexture = renderer->createTexture(":/Quasars/quasar.png"); | ||
4061 | 206 | } | ||
4062 | 203 | 207 | ||
4063 | 204 | foreach (const QuasarP& quasar, QSO) | 208 | foreach (const QuasarP& quasar, QSO) |
4064 | 205 | { | 209 | { |
4065 | 206 | if (quasar && quasar->initialized) | 210 | if (quasar && quasar->initialized) |
4067 | 207 | quasar->draw(core, painter); | 211 | { |
4068 | 212 | quasar->draw(core, renderer, prj, markerTexture); | ||
4069 | 213 | } | ||
4070 | 208 | } | 214 | } |
4071 | 209 | 215 | ||
4072 | 210 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) | 216 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) |
4075 | 211 | drawPointer(core, painter); | 217 | { |
4076 | 212 | 218 | drawPointer(core, renderer, prj); | |
4077 | 219 | } | ||
4078 | 213 | } | 220 | } |
4079 | 214 | 221 | ||
4081 | 215 | void Quasars::drawPointer(StelCore* core, StelPainter& painter) | 222 | void Quasars::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector) |
4082 | 216 | { | 223 | { |
4083 | 217 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | ||
4084 | 218 | |||
4085 | 219 | const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Quasar"); | 224 | const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Quasar"); |
4086 | 220 | if (!newSelected.empty()) | 225 | if (!newSelected.empty()) |
4087 | 221 | { | 226 | { |
4088 | 222 | const StelObjectP obj = newSelected[0]; | 227 | const StelObjectP obj = newSelected[0]; |
4089 | 223 | Vec3d pos=obj->getJ2000EquatorialPos(core); | 228 | Vec3d pos=obj->getJ2000EquatorialPos(core); |
4090 | 224 | 229 | ||
4092 | 225 | Vec3d screenpos; | 230 | Vec3d screenPos; |
4093 | 226 | // Compute 2D pos and return if outside screen | 231 | // Compute 2D pos and return if outside screen |
4095 | 227 | if (!painter.getProjector()->project(pos, screenpos)) | 232 | if (!projector->project(pos, screenPos)) |
4096 | 233 | { | ||
4097 | 228 | return; | 234 | return; |
4098 | 235 | } | ||
4099 | 236 | if(NULL == texPointer) | ||
4100 | 237 | { | ||
4101 | 238 | texPointer = renderer->createTexture("textures/pointeur2.png"); | ||
4102 | 239 | } | ||
4103 | 229 | 240 | ||
4104 | 230 | const Vec3f& c(obj->getInfoColor()); | 241 | const Vec3f& c(obj->getInfoColor()); |
4106 | 231 | painter.setColor(c[0],c[1],c[2]); | 242 | renderer->setGlobalColor(c[0], c[1], c[2]); |
4107 | 232 | texPointer->bind(); | 243 | texPointer->bind(); |
4112 | 233 | painter.enableTexture2d(true); | 244 | renderer->setBlendMode(BlendMode_Alpha); |
4113 | 234 | glEnable(GL_BLEND); | 245 | renderer->drawTexturedRect(screenPos[0] - 13.0f, screenPos[1] - 13.0f, 26.0f, 26.0f, |
4114 | 235 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode | 246 | StelApp::getInstance().getTotalRunTime() * 40.0f); |
4111 | 236 | painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.); | ||
4115 | 237 | } | 247 | } |
4116 | 238 | } | 248 | } |
4117 | 239 | 249 | ||
4118 | 240 | 250 | ||
4119 | === modified file 'plugins/Quasars/src/Quasars.hpp' | |||
4120 | --- plugins/Quasars/src/Quasars.hpp 2012-06-17 08:33:36 +0000 | |||
4121 | +++ plugins/Quasars/src/Quasars.hpp 2012-08-30 16:29:19 +0000 | |||
4122 | @@ -21,8 +21,6 @@ | |||
4123 | 21 | 21 | ||
4124 | 22 | #include "StelObjectModule.hpp" | 22 | #include "StelObjectModule.hpp" |
4125 | 23 | #include "StelObject.hpp" | 23 | #include "StelObject.hpp" |
4126 | 24 | #include "StelTextureTypes.hpp" | ||
4127 | 25 | #include "StelPainter.hpp" | ||
4128 | 26 | #include "Quasar.hpp" | 24 | #include "Quasar.hpp" |
4129 | 27 | #include <QFont> | 25 | #include <QFont> |
4130 | 28 | #include <QVariantMap> | 26 | #include <QVariantMap> |
4131 | @@ -30,7 +28,6 @@ | |||
4132 | 30 | #include <QList> | 28 | #include <QList> |
4133 | 31 | #include <QSharedPointer> | 29 | #include <QSharedPointer> |
4134 | 32 | 30 | ||
4135 | 33 | class StelPainter; | ||
4136 | 34 | 31 | ||
4137 | 35 | class QNetworkAccessManager; | 32 | class QNetworkAccessManager; |
4138 | 36 | class QNetworkReply; | 33 | class QNetworkReply; |
4139 | @@ -64,8 +61,8 @@ | |||
4140 | 64 | virtual void init(); | 61 | virtual void init(); |
4141 | 65 | virtual void deinit(); | 62 | virtual void deinit(); |
4142 | 66 | virtual void update(double) {;} | 63 | virtual void update(double) {;} |
4145 | 67 | virtual void draw(StelCore* core); | 64 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
4146 | 68 | virtual void drawPointer(StelCore* core, StelPainter& painter); | 65 | virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector); |
4147 | 69 | virtual double getCallOrder(StelModuleActionName actionName) const; | 66 | virtual double getCallOrder(StelModuleActionName actionName) const; |
4148 | 70 | 67 | ||
4149 | 71 | /////////////////////////////////////////////////////////////////////////// | 68 | /////////////////////////////////////////////////////////////////////////// |
4150 | @@ -179,7 +176,8 @@ | |||
4151 | 179 | 176 | ||
4152 | 180 | QString catalogJsonPath; | 177 | QString catalogJsonPath; |
4153 | 181 | 178 | ||
4155 | 182 | StelTextureSP texPointer; | 179 | class StelTextureNew* texPointer; |
4156 | 180 | class StelTextureNew* markerTexture; | ||
4157 | 183 | QList<QuasarP> QSO; | 181 | QList<QuasarP> QSO; |
4158 | 184 | 182 | ||
4159 | 185 | // variables and functions for the updater | 183 | // variables and functions for the updater |
4160 | 186 | 184 | ||
4161 | === modified file 'plugins/Satellites/src/Satellite.cpp' | |||
4162 | --- plugins/Satellites/src/Satellite.cpp 2012-08-25 10:58:23 +0000 | |||
4163 | +++ plugins/Satellites/src/Satellite.cpp 2012-08-30 16:29:19 +0000 | |||
4164 | @@ -19,20 +19,21 @@ | |||
4165 | 19 | 19 | ||
4166 | 20 | #include "Satellite.hpp" | 20 | #include "Satellite.hpp" |
4167 | 21 | #include "StelObject.hpp" | 21 | #include "StelObject.hpp" |
4168 | 22 | #include "StelPainter.hpp" | ||
4169 | 23 | #include "StelApp.hpp" | 22 | #include "StelApp.hpp" |
4170 | 24 | #include "StelLocation.hpp" | 23 | #include "StelLocation.hpp" |
4171 | 25 | #include "StelCore.hpp" | 24 | #include "StelCore.hpp" |
4172 | 26 | #include "StelTexture.hpp" | ||
4173 | 27 | #include "VecMath.hpp" | 25 | #include "VecMath.hpp" |
4174 | 28 | #include "StelUtils.hpp" | 26 | #include "StelUtils.hpp" |
4175 | 29 | #include "StelTranslator.hpp" | 27 | #include "StelTranslator.hpp" |
4176 | 28 | #include "renderer/StelCircleArcRenderer.hpp" | ||
4177 | 29 | #include "renderer/StelRenderer.hpp" | ||
4178 | 30 | #include "renderer/StelTextureNew.hpp" | ||
4179 | 31 | |||
4180 | 30 | 32 | ||
4181 | 31 | #include <QTextStream> | 33 | #include <QTextStream> |
4182 | 32 | #include <QRegExp> | 34 | #include <QRegExp> |
4183 | 33 | #include <QDebug> | 35 | #include <QDebug> |
4184 | 34 | #include <QVariant> | 36 | #include <QVariant> |
4185 | 35 | #include <QtOpenGL> | ||
4186 | 36 | #include <QSettings> | 37 | #include <QSettings> |
4187 | 37 | #include <QByteArray> | 38 | #include <QByteArray> |
4188 | 38 | 39 | ||
4189 | @@ -41,7 +42,6 @@ | |||
4190 | 41 | #include <cmath> | 42 | #include <cmath> |
4191 | 42 | 43 | ||
4192 | 43 | // static data members - will be initialised in the Satallites class (the StelObjectMgr) | 44 | // static data members - will be initialised in the Satallites class (the StelObjectMgr) |
4193 | 44 | StelTextureSP Satellite::hintTexture; | ||
4194 | 45 | float Satellite::showLabels = true; | 45 | float Satellite::showLabels = true; |
4195 | 46 | float Satellite::hintBrightness = 0.0; | 46 | float Satellite::hintBrightness = 0.0; |
4196 | 47 | float Satellite::hintScale = 1.f; | 47 | float Satellite::hintScale = 1.f; |
4197 | @@ -476,47 +476,45 @@ | |||
4198 | 476 | return year + 1900; | 476 | return year + 1900; |
4199 | 477 | } | 477 | } |
4200 | 478 | 478 | ||
4202 | 479 | void Satellite::draw(const StelCore* core, StelPainter& painter, float) | 479 | void Satellite::draw(const StelCore* core, StelRenderer* renderer, |
4203 | 480 | StelProjectorP projector, StelTextureNew* hintTexture) | ||
4204 | 480 | { | 481 | { |
4205 | 481 | if (core->getJDay() < jdLaunchYearJan1) return; | 482 | if (core->getJDay() < jdLaunchYearJan1) return; |
4206 | 482 | 483 | ||
4207 | 483 | XYZ = getJ2000EquatorialPos(core); | 484 | XYZ = getJ2000EquatorialPos(core); |
4208 | 484 | Vec3f drawColor; | 485 | Vec3f drawColor; |
4209 | 485 | (visibility==RADAR_NIGHT) ? drawColor = Vec3f(0.2f,0.2f,0.2f) : drawColor = hintColor; | 486 | (visibility==RADAR_NIGHT) ? drawColor = Vec3f(0.2f,0.2f,0.2f) : drawColor = hintColor; |
4213 | 486 | StelApp::getInstance().getVisionModeNight() ? glColor4f(0.6,0.0,0.0,1.0) : glColor4f(drawColor[0],drawColor[1],drawColor[2], Satellite::hintBrightness); | 487 | StelApp::getInstance().getVisionModeNight() |
4214 | 487 | 488 | ? renderer->setGlobalColor(0.6,0.0,0.0,1.0) | |
4215 | 488 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 489 | : renderer->setGlobalColor(drawColor[0],drawColor[1],drawColor[2], Satellite::hintBrightness); |
4216 | 489 | 490 | ||
4217 | 490 | Vec3d xy; | 491 | Vec3d xy; |
4219 | 491 | if (prj->project(XYZ,xy)) | 492 | if (core->getProjection(StelCore::FrameJ2000)->project(XYZ,xy)) |
4220 | 492 | { | 493 | { |
4221 | 493 | if (Satellite::showLabels) | 494 | if (Satellite::showLabels) |
4222 | 494 | { | 495 | { |
4225 | 495 | painter.drawText(xy[0], xy[1], name, 0, 10, 10, false); | 496 | renderer->drawText(TextParams(xy[0], xy[1], name).shift(10, 10).useGravity()); |
4224 | 496 | Satellite::hintTexture->bind(); | ||
4226 | 497 | } | 497 | } |
4228 | 498 | painter.drawSprite2dMode(xy[0], xy[1], 11); | 498 | renderer->drawTexturedRect(xy[0] - 11, xy[1] - 11, 22, 22); |
4229 | 499 | 499 | ||
4231 | 500 | if (orbitVisible && Satellite::orbitLinesFlag) drawOrbit(painter); | 500 | if (orbitVisible && Satellite::orbitLinesFlag) {drawOrbit(renderer, projector);} |
4232 | 501 | } | 501 | } |
4233 | 502 | } | 502 | } |
4234 | 503 | 503 | ||
4235 | 504 | 504 | ||
4237 | 505 | void Satellite::drawOrbit(StelPainter& painter) | 505 | void Satellite::drawOrbit(StelRenderer* renderer, StelProjectorP projector) |
4238 | 506 | { | 506 | { |
4239 | 507 | Vec3d position,previousPosition; | 507 | Vec3d position,previousPosition; |
4240 | 508 | 508 | ||
4241 | 509 | glDisable(GL_TEXTURE_2D); | ||
4242 | 510 | |||
4243 | 511 | QList<Vec3d>::iterator it= orbitPoints.begin(); | 509 | QList<Vec3d>::iterator it= orbitPoints.begin(); |
4244 | 512 | 510 | ||
4245 | 513 | //First point projection calculation | 511 | //First point projection calculation |
4246 | 514 | previousPosition.set(it->operator [](0), it->operator [](1), it->operator [](2)); | 512 | previousPosition.set(it->operator [](0), it->operator [](1), it->operator [](2)); |
4247 | 515 | 513 | ||
4248 | 516 | it++; | 514 | it++; |
4249 | 517 | StelVertexArray vertexArray; | ||
4250 | 518 | vertexArray.primitiveType=StelVertexArray::Lines; | ||
4251 | 519 | 515 | ||
4252 | 516 | QVector<Vec3d> orbitArcPoints; | ||
4253 | 517 | StelCircleArcRenderer circleArcRenderer(renderer, projector); | ||
4254 | 520 | //Rest of points | 518 | //Rest of points |
4255 | 521 | for (int i=1; i<orbitPoints.size(); i++) | 519 | for (int i=1; i<orbitPoints.size(); i++) |
4256 | 522 | { | 520 | { |
4257 | @@ -528,21 +526,21 @@ | |||
4258 | 528 | // Draw end (fading) parts of orbit lines one segment at a time. | 526 | // Draw end (fading) parts of orbit lines one segment at a time. |
4259 | 529 | if (i<=orbitLineFadeSegments || orbitLineSegments-i < orbitLineFadeSegments) | 527 | if (i<=orbitLineFadeSegments || orbitLineSegments-i < orbitLineFadeSegments) |
4260 | 530 | { | 528 | { |
4263 | 531 | painter.setColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], hintBrightness * calculateOrbitSegmentIntensity(i)); | 529 | renderer->setGlobalColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], |
4264 | 532 | painter.drawGreatCircleArc(previousPosition, position, &viewportHalfspace); | 530 | hintBrightness * calculateOrbitSegmentIntensity(i)); |
4265 | 531 | circleArcRenderer.drawGreatCircleArc(previousPosition, position, &viewportHalfspace); | ||
4266 | 533 | } | 532 | } |
4267 | 534 | else | 533 | else |
4268 | 535 | { | 534 | { |
4270 | 536 | vertexArray.vertex << previousPosition << position; | 535 | orbitArcPoints << previousPosition << position; |
4271 | 537 | } | 536 | } |
4272 | 538 | previousPosition = position; | 537 | previousPosition = position; |
4273 | 539 | } | 538 | } |
4274 | 540 | 539 | ||
4275 | 541 | // Draw center section of orbit in one go | 540 | // Draw center section of orbit in one go |
4280 | 542 | painter.setColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], hintBrightness); | 541 | renderer->setGlobalColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], |
4281 | 543 | painter.drawGreatCircleArcs(vertexArray, &viewportHalfspace); | 542 | hintBrightness); |
4282 | 544 | 543 | circleArcRenderer.drawGreatCircleArcs(orbitArcPoints, PrimitiveType_Lines, &viewportHalfspace); | |
4279 | 545 | glEnable(GL_TEXTURE_2D); | ||
4283 | 546 | } | 544 | } |
4284 | 547 | 545 | ||
4285 | 548 | 546 | ||
4286 | 549 | 547 | ||
4287 | === modified file 'plugins/Satellites/src/Satellite.hpp' | |||
4288 | --- plugins/Satellites/src/Satellite.hpp 2012-08-25 10:58:23 +0000 | |||
4289 | +++ plugins/Satellites/src/Satellite.hpp 2012-08-30 16:29:19 +0000 | |||
4290 | @@ -28,14 +28,12 @@ | |||
4291 | 28 | #include <QDateTime> | 28 | #include <QDateTime> |
4292 | 29 | 29 | ||
4293 | 30 | #include "StelObject.hpp" | 30 | #include "StelObject.hpp" |
4294 | 31 | #include "StelTextureTypes.hpp" | ||
4295 | 32 | #include "StelSphereGeometry.hpp" | 31 | #include "StelSphereGeometry.hpp" |
4296 | 32 | #include "StelProjectorType.hpp" | ||
4297 | 33 | 33 | ||
4298 | 34 | #include "StelPainter.hpp" | ||
4299 | 35 | #include "gSatWrapper.hpp" | 34 | #include "gSatWrapper.hpp" |
4300 | 36 | 35 | ||
4301 | 37 | 36 | ||
4302 | 38 | class StelPainter; | ||
4303 | 39 | class StelLocation; | 37 | class StelLocation; |
4304 | 40 | 38 | ||
4305 | 41 | typedef struct | 39 | typedef struct |
4306 | @@ -120,7 +118,7 @@ | |||
4307 | 120 | private: | 118 | private: |
4308 | 121 | //draw orbits methods | 119 | //draw orbits methods |
4309 | 122 | void computeOrbitPoints(); | 120 | void computeOrbitPoints(); |
4311 | 123 | void drawOrbit(StelPainter& painter); | 121 | void drawOrbit(class StelRenderer* renderer, StelProjectorP projector); |
4312 | 124 | //! returns 0 - 1.0 for the DRAWORBIT_FADE_NUMBER segments at | 122 | //! returns 0 - 1.0 for the DRAWORBIT_FADE_NUMBER segments at |
4313 | 125 | //! each end of an orbit, with 1 in the middle. | 123 | //! each end of an orbit, with 1 in the middle. |
4314 | 126 | float calculateOrbitSegmentIntensity(int segNum); | 124 | float calculateOrbitSegmentIntensity(int segNum); |
4315 | @@ -155,7 +153,6 @@ | |||
4316 | 155 | QStringList groupIDs; | 153 | QStringList groupIDs; |
4317 | 156 | QDateTime lastUpdated; | 154 | QDateTime lastUpdated; |
4318 | 157 | 155 | ||
4319 | 158 | static StelTextureSP hintTexture; | ||
4320 | 159 | static SphericalCap viewportHalfspace; | 156 | static SphericalCap viewportHalfspace; |
4321 | 160 | static float hintBrightness; | 157 | static float hintBrightness; |
4322 | 161 | static float hintScale; | 158 | static float hintScale; |
4323 | @@ -164,15 +161,16 @@ | |||
4324 | 164 | static int orbitLineSegmentDuration; //measured in seconds | 161 | static int orbitLineSegmentDuration; //measured in seconds |
4325 | 165 | static bool orbitLinesFlag; | 162 | static bool orbitLinesFlag; |
4326 | 166 | 163 | ||
4328 | 167 | void draw(const StelCore* core, StelPainter& painter, float maxMagHints); | 164 | void draw(const StelCore* core, class StelRenderer* renderer, |
4329 | 165 | StelProjectorP projector, class StelTextureNew* hintTexture); | ||
4330 | 168 | 166 | ||
4338 | 169 | //Satellite Orbit Position calculation | 167 | //Satellite Orbit Position calculation |
4339 | 170 | gSatWrapper *pSatWrapper; | 168 | gSatWrapper *pSatWrapper; |
4340 | 171 | Vec3d position; | 169 | Vec3d position; |
4341 | 172 | Vec3d velocity; | 170 | Vec3d velocity; |
4342 | 173 | Vec3d latLongSubPointPosition; | 171 | Vec3d latLongSubPointPosition; |
4343 | 174 | Vec3d elAzPosition; | 172 | Vec3d elAzPosition; |
4344 | 175 | int visibility; | 173 | int visibility; |
4345 | 176 | 174 | ||
4346 | 177 | //Satellite Orbit Draw | 175 | //Satellite Orbit Draw |
4347 | 178 | QFont font; | 176 | QFont font; |
4348 | 179 | 177 | ||
4349 | === modified file 'plugins/Satellites/src/Satellites.cpp' | |||
4350 | --- plugins/Satellites/src/Satellites.cpp 2012-08-25 09:46:49 +0000 | |||
4351 | +++ plugins/Satellites/src/Satellites.cpp 2012-08-30 16:29:19 +0000 | |||
4352 | @@ -17,7 +17,6 @@ | |||
4353 | 17 | */ | 17 | */ |
4354 | 18 | 18 | ||
4355 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
4356 | 20 | #include "StelPainter.hpp" | ||
4357 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
4358 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
4359 | 23 | #include "StelGui.hpp" | 22 | #include "StelGui.hpp" |
4360 | @@ -27,7 +26,6 @@ | |||
4361 | 27 | #include "StelModuleMgr.hpp" | 26 | #include "StelModuleMgr.hpp" |
4362 | 28 | #include "StelLocaleMgr.hpp" | 27 | #include "StelLocaleMgr.hpp" |
4363 | 29 | #include "StelFileMgr.hpp" | 28 | #include "StelFileMgr.hpp" |
4364 | 30 | #include "StelTextureMgr.hpp" | ||
4365 | 31 | #include "StelIniParser.hpp" | 29 | #include "StelIniParser.hpp" |
4366 | 32 | #include "Satellites.hpp" | 30 | #include "Satellites.hpp" |
4367 | 33 | #include "Satellite.hpp" | 31 | #include "Satellite.hpp" |
4368 | @@ -37,6 +35,7 @@ | |||
4369 | 37 | #include "SatellitesDialog.hpp" | 35 | #include "SatellitesDialog.hpp" |
4370 | 38 | #include "LabelMgr.hpp" | 36 | #include "LabelMgr.hpp" |
4371 | 39 | #include "StelTranslator.hpp" | 37 | #include "StelTranslator.hpp" |
4372 | 38 | #include "renderer/StelRenderer.hpp" | ||
4373 | 40 | 39 | ||
4374 | 41 | #include <QNetworkAccessManager> | 40 | #include <QNetworkAccessManager> |
4375 | 42 | #include <QNetworkReply> | 41 | #include <QNetworkReply> |
4376 | @@ -72,9 +71,16 @@ | |||
4377 | 72 | Q_EXPORT_PLUGIN2(Satellites, SatellitesStelPluginInterface) | 71 | Q_EXPORT_PLUGIN2(Satellites, SatellitesStelPluginInterface) |
4378 | 73 | 72 | ||
4379 | 74 | Satellites::Satellites() | 73 | Satellites::Satellites() |
4383 | 75 | : pxmapGlow(NULL), pxmapOnIcon(NULL), pxmapOffIcon(NULL), toolbarButton(NULL), | 74 | : hintTexture(NULL) |
4384 | 76 | earth(NULL), defaultHintColor(0.0, 0.4, 0.6), defaultOrbitColor(0.0, 0.3, 0.6), | 75 | , texPointer(NULL) |
4385 | 77 | progressBar(NULL) | 76 | , pxmapGlow(NULL) |
4386 | 77 | , pxmapOnIcon(NULL) | ||
4387 | 78 | , pxmapOffIcon(NULL) | ||
4388 | 79 | , toolbarButton(NULL) | ||
4389 | 80 | , earth(NULL) | ||
4390 | 81 | , defaultHintColor(0.0, 0.4, 0.6) | ||
4391 | 82 | , defaultOrbitColor(0.0, 0.3, 0.6) | ||
4392 | 83 | , progressBar(NULL) | ||
4393 | 78 | { | 84 | { |
4394 | 79 | setObjectName("Satellites"); | 85 | setObjectName("Satellites"); |
4395 | 80 | configDialog = new SatellitesDialog(); | 86 | configDialog = new SatellitesDialog(); |
4396 | @@ -82,8 +88,14 @@ | |||
4397 | 82 | 88 | ||
4398 | 83 | void Satellites::deinit() | 89 | void Satellites::deinit() |
4399 | 84 | { | 90 | { |
4402 | 85 | Satellite::hintTexture.clear(); | 91 | if(NULL != hintTexture) |
4403 | 86 | texPointer.clear(); | 92 | { |
4404 | 93 | delete hintTexture; | ||
4405 | 94 | } | ||
4406 | 95 | if(NULL != texPointer) | ||
4407 | 96 | { | ||
4408 | 97 | delete texPointer; | ||
4409 | 98 | } | ||
4410 | 87 | } | 99 | } |
4411 | 88 | 100 | ||
4412 | 89 | Satellites::~Satellites() | 101 | Satellites::~Satellites() |
4413 | @@ -120,8 +132,6 @@ | |||
4414 | 120 | satellitesJsonPath = StelFileMgr::findFile("modules/Satellites", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/satellites.json"; | 132 | satellitesJsonPath = StelFileMgr::findFile("modules/Satellites", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/satellites.json"; |
4415 | 121 | 133 | ||
4416 | 122 | // Load and find resources used in the plugin | 134 | // Load and find resources used in the plugin |
4417 | 123 | texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur5.png"); | ||
4418 | 124 | Satellite::hintTexture = StelApp::getInstance().getTextureManager().createTexture(":/satellites/hint.png"); | ||
4419 | 125 | 135 | ||
4420 | 126 | // key bindings and other actions | 136 | // key bindings and other actions |
4421 | 127 | // TRANSLATORS: Title of a group of key bindings in the Help window | 137 | // TRANSLATORS: Title of a group of key bindings in the Help window |
4422 | @@ -1160,7 +1170,7 @@ | |||
4423 | 1160 | } | 1170 | } |
4424 | 1161 | } | 1171 | } |
4425 | 1162 | 1172 | ||
4427 | 1163 | void Satellites::draw(StelCore* core) | 1173 | void Satellites::draw(StelCore* core, StelRenderer* renderer) |
4428 | 1164 | { | 1174 | { |
4429 | 1165 | if (core->getCurrentLocation().planetName != earth->getEnglishName() || | 1175 | if (core->getCurrentLocation().planetName != earth->getEnglishName() || |
4430 | 1166 | (core->getJDay()<2436116.3115) || // do not draw anything before Oct 4, 1957, 19:28:34GMT ;-) | 1176 | (core->getJDay()<2436116.3115) || // do not draw anything before Oct 4, 1957, 19:28:34GMT ;-) |
4431 | @@ -1168,26 +1178,32 @@ | |||
4432 | 1168 | return; | 1178 | return; |
4433 | 1169 | 1179 | ||
4434 | 1170 | StelProjectorP prj = core->getProjection(StelCore::FrameAltAz); | 1180 | StelProjectorP prj = core->getProjection(StelCore::FrameAltAz); |
4437 | 1171 | StelPainter painter(prj); | 1181 | renderer->setFont(labelFont); |
4436 | 1172 | painter.setFont(labelFont); | ||
4438 | 1173 | Satellite::hintBrightness = hintFader.getInterstate(); | 1182 | Satellite::hintBrightness = hintFader.getInterstate(); |
4439 | 1174 | 1183 | ||
4445 | 1175 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 1184 | renderer->setBlendMode(BlendMode_Alpha); |
4446 | 1176 | glEnable(GL_BLEND); | 1185 | |
4447 | 1177 | glEnable(GL_TEXTURE_2D); | 1186 | if(NULL == hintTexture) |
4448 | 1178 | Satellite::hintTexture->bind(); | 1187 | { |
4449 | 1179 | Satellite::viewportHalfspace = painter.getProjector()->getBoundingCap(); | 1188 | hintTexture = renderer->createTexture(":/satellites/hint.png"); |
4450 | 1189 | } | ||
4451 | 1190 | hintTexture->bind(); | ||
4452 | 1191 | Satellite::viewportHalfspace = prj->getBoundingCap(); | ||
4453 | 1180 | foreach (const SatelliteP& sat, satellites) | 1192 | foreach (const SatelliteP& sat, satellites) |
4454 | 1181 | { | 1193 | { |
4455 | 1182 | if (sat && sat->initialized && sat->visible) | 1194 | if (sat && sat->initialized && sat->visible) |
4457 | 1183 | sat->draw(core, painter, 1.0); | 1195 | { |
4458 | 1196 | sat->draw(core, renderer, prj, hintTexture); | ||
4459 | 1197 | } | ||
4460 | 1184 | } | 1198 | } |
4461 | 1185 | 1199 | ||
4462 | 1186 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) | 1200 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) |
4464 | 1187 | drawPointer(core, painter); | 1201 | { |
4465 | 1202 | drawPointer(core, renderer); | ||
4466 | 1203 | } | ||
4467 | 1188 | } | 1204 | } |
4468 | 1189 | 1205 | ||
4470 | 1190 | void Satellites::drawPointer(StelCore* core, StelPainter& painter) | 1206 | void Satellites::drawPointer(StelCore* core, StelRenderer* renderer) |
4471 | 1191 | { | 1207 | { |
4472 | 1192 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 1208 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
4473 | 1193 | 1209 | ||
4474 | @@ -1200,25 +1216,33 @@ | |||
4475 | 1200 | 1216 | ||
4476 | 1201 | // Compute 2D pos and return if outside screen | 1217 | // Compute 2D pos and return if outside screen |
4477 | 1202 | if (!prj->project(pos, screenpos)) | 1218 | if (!prj->project(pos, screenpos)) |
4478 | 1219 | { | ||
4479 | 1203 | return; | 1220 | return; |
4480 | 1221 | } | ||
4481 | 1222 | if(NULL == texPointer) | ||
4482 | 1223 | { | ||
4483 | 1224 | texPointer = renderer->createTexture("textures/pointeur5.png"); | ||
4484 | 1225 | } | ||
4485 | 1204 | if (StelApp::getInstance().getVisionModeNight()) | 1226 | if (StelApp::getInstance().getVisionModeNight()) |
4487 | 1205 | glColor3f(0.8f,0.0f,0.0f); | 1227 | renderer->setGlobalColor(0.8f,0.0f,0.0f); |
4488 | 1206 | else | 1228 | else |
4490 | 1207 | glColor3f(0.4f,0.5f,0.8f); | 1229 | renderer->setGlobalColor(0.4f,0.5f,0.8f); |
4491 | 1208 | texPointer->bind(); | 1230 | texPointer->bind(); |
4492 | 1209 | 1231 | ||
4496 | 1210 | glEnable(GL_TEXTURE_2D); | 1232 | renderer->setBlendMode(BlendMode_Alpha); |
4494 | 1211 | glEnable(GL_BLEND); | ||
4495 | 1212 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode | ||
4497 | 1213 | 1233 | ||
4498 | 1214 | // Size on screen | 1234 | // Size on screen |
4499 | 1215 | float size = obj->getAngularSize(core)*M_PI/180.*prj->getPixelPerRadAtCenter(); | 1235 | float size = obj->getAngularSize(core)*M_PI/180.*prj->getPixelPerRadAtCenter(); |
4500 | 1216 | size += 12.f + 3.f*std::sin(2.f * StelApp::getInstance().getTotalRunTime()); | 1236 | size += 12.f + 3.f*std::sin(2.f * StelApp::getInstance().getTotalRunTime()); |
4506 | 1217 | // size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getTotalRunTime()); | 1237 | const float halfSize = size * 0.5; |
4507 | 1218 | painter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]-size/2, 20, 90); | 1238 | const float left = screenpos[0] - halfSize - 20; |
4508 | 1219 | painter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]+size/2, 20, 0); | 1239 | const float right = screenpos[0] + halfSize - 20; |
4509 | 1220 | painter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]+size/2, 20, -90); | 1240 | const float top = screenpos[1] - halfSize - 20; |
4510 | 1221 | painter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]-size/2, 20, -180); | 1241 | const float bottom = screenpos[1] + halfSize - 20; |
4511 | 1242 | renderer->drawTexturedRect(left, top, 40, 40, 90); | ||
4512 | 1243 | renderer->drawTexturedRect(left, bottom, 40, 40, 0); | ||
4513 | 1244 | renderer->drawTexturedRect(right, bottom, 40, 40, -90); | ||
4514 | 1245 | renderer->drawTexturedRect(right, top, 40, 40, -180); | ||
4515 | 1222 | } | 1246 | } |
4516 | 1223 | } | 1247 | } |
4517 | 1224 | 1248 | ||
4518 | 1225 | 1249 | ||
4519 | === modified file 'plugins/Satellites/src/Satellites.hpp' | |||
4520 | --- plugins/Satellites/src/Satellites.hpp 2012-07-29 19:00:03 +0000 | |||
4521 | +++ plugins/Satellites/src/Satellites.hpp 2012-08-30 16:29:19 +0000 | |||
4522 | @@ -93,8 +93,8 @@ | |||
4523 | 93 | virtual void init(); | 93 | virtual void init(); |
4524 | 94 | virtual void deinit(); | 94 | virtual void deinit(); |
4525 | 95 | virtual void update(double deltaTime); | 95 | virtual void update(double deltaTime); |
4528 | 96 | virtual void draw(StelCore* core); | 96 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
4529 | 97 | virtual void drawPointer(StelCore* core, StelPainter& painter); | 97 | virtual void drawPointer(StelCore* core, class StelRenderer* renderer); |
4530 | 98 | virtual double getCallOrder(StelModuleActionName actionName) const; | 98 | virtual double getCallOrder(StelModuleActionName actionName) const; |
4531 | 99 | 99 | ||
4532 | 100 | /////////////////////////////////////////////////////////////////////////// | 100 | /////////////////////////////////////////////////////////////////////////// |
4533 | @@ -298,7 +298,8 @@ | |||
4534 | 298 | QString satellitesJsonPath; | 298 | QString satellitesJsonPath; |
4535 | 299 | QList<SatelliteP> satellites; | 299 | QList<SatelliteP> satellites; |
4536 | 300 | LinearFader hintFader; | 300 | LinearFader hintFader; |
4538 | 301 | StelTextureSP texPointer; | 301 | class StelTextureNew* hintTexture; |
4539 | 302 | class StelTextureNew* texPointer; | ||
4540 | 302 | QPixmap* pxmapGlow; | 303 | QPixmap* pxmapGlow; |
4541 | 303 | QPixmap* pxmapOnIcon; | 304 | QPixmap* pxmapOnIcon; |
4542 | 304 | QPixmap* pxmapOffIcon; | 305 | QPixmap* pxmapOffIcon; |
4543 | 305 | 306 | ||
4544 | === modified file 'plugins/SolarSystemEditor/src/SolarSystemEditor.cpp' | |||
4545 | --- plugins/SolarSystemEditor/src/SolarSystemEditor.cpp 2012-01-11 10:50:37 +0000 | |||
4546 | +++ plugins/SolarSystemEditor/src/SolarSystemEditor.cpp 2012-08-30 16:29:19 +0000 | |||
4547 | @@ -127,7 +127,7 @@ | |||
4548 | 127 | // | 127 | // |
4549 | 128 | } | 128 | } |
4550 | 129 | 129 | ||
4552 | 130 | void SolarSystemEditor::draw(StelCore*) //core | 130 | void SolarSystemEditor::draw(StelCore*, class StelRenderer*) //core |
4553 | 131 | { | 131 | { |
4554 | 132 | // | 132 | // |
4555 | 133 | } | 133 | } |
4556 | 134 | 134 | ||
4557 | === modified file 'plugins/SolarSystemEditor/src/SolarSystemEditor.hpp' | |||
4558 | --- plugins/SolarSystemEditor/src/SolarSystemEditor.hpp 2012-01-11 10:50:37 +0000 | |||
4559 | +++ plugins/SolarSystemEditor/src/SolarSystemEditor.hpp 2012-08-30 16:29:19 +0000 | |||
4560 | @@ -77,7 +77,7 @@ | |||
4561 | 77 | //! Dialog windows don't need explicit drawing, it's done automatically. | 77 | //! Dialog windows don't need explicit drawing, it's done automatically. |
4562 | 78 | //! If a plug-in draws on the screen, it should be able to respect | 78 | //! If a plug-in draws on the screen, it should be able to respect |
4563 | 79 | //! the night vision mode. | 79 | //! the night vision mode. |
4565 | 80 | virtual void draw(StelCore * core); | 80 | virtual void draw(StelCore * core, class StelRenderer* renderer); |
4566 | 81 | virtual double getCallOrder(StelModuleActionName actionName) const; | 81 | virtual double getCallOrder(StelModuleActionName actionName) const; |
4567 | 82 | //! called when the "configure" button in the "Plugins" tab is pressed | 82 | //! called when the "configure" button in the "Plugins" tab is pressed |
4568 | 83 | virtual bool configureGui(bool show); | 83 | virtual bool configureGui(bool show); |
4569 | 84 | 84 | ||
4570 | === modified file 'plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp' | |||
4571 | --- plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp 2012-02-13 18:59:16 +0000 | |||
4572 | +++ plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp 2012-08-30 16:29:19 +0000 | |||
4573 | @@ -31,6 +31,7 @@ | |||
4574 | 31 | #include "StelApp.hpp" | 31 | #include "StelApp.hpp" |
4575 | 32 | #include "StelFileMgr.hpp" | 32 | #include "StelFileMgr.hpp" |
4576 | 33 | #include "StelModuleMgr.hpp" | 33 | #include "StelModuleMgr.hpp" |
4577 | 34 | #include "StelUtils.hpp" | ||
4578 | 34 | //#include "StelTranslator.hpp" | 35 | //#include "StelTranslator.hpp" |
4579 | 35 | 36 | ||
4580 | 36 | 37 | ||
4581 | @@ -235,13 +236,13 @@ | |||
4582 | 235 | return false; | 236 | return false; |
4583 | 236 | } | 237 | } |
4584 | 237 | 238 | ||
4586 | 238 | if (!verifyPowerOfTwo(texture.height())) | 239 | if (!StelUtils::isPowerOfTwo(texture.height())) |
4587 | 239 | { | 240 | { |
4588 | 240 | qDebug() << "Invalid texure height:" << texture.height() | 241 | qDebug() << "Invalid texure height:" << texture.height() |
4589 | 241 | << "for file" << filePath; | 242 | << "for file" << filePath; |
4590 | 242 | return false; | 243 | return false; |
4591 | 243 | } | 244 | } |
4593 | 244 | if (!verifyPowerOfTwo(texture.width())) | 245 | if (!StelUtils::isPowerOfTwo(texture.width())) |
4594 | 245 | { | 246 | { |
4595 | 246 | qDebug() << "Invalid texture width:" << texture.width() | 247 | qDebug() << "Invalid texture width:" << texture.width() |
4596 | 247 | << "for file" << filePath; | 248 | << "for file" << filePath; |
4597 | @@ -250,11 +251,3 @@ | |||
4598 | 250 | 251 | ||
4599 | 251 | return true; | 252 | return true; |
4600 | 252 | } | 253 | } |
4601 | 253 | |||
4602 | 254 | bool ManualImportWindow::verifyPowerOfTwo(int value) | ||
4603 | 255 | { | ||
4604 | 256 | if (value > 0 && (value & (value-1)) == 0) | ||
4605 | 257 | return true; | ||
4606 | 258 | else | ||
4607 | 259 | return false; | ||
4608 | 260 | } | ||
4609 | 261 | 254 | ||
4610 | === modified file 'plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp' | |||
4611 | --- plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp 2012-02-13 18:59:16 +0000 | |||
4612 | +++ plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp 2012-08-30 16:29:19 +0000 | |||
4613 | @@ -68,10 +68,9 @@ | |||
4614 | 68 | void setColorButtonColor(QColor newColor); | 68 | void setColorButtonColor(QColor newColor); |
4615 | 69 | 69 | ||
4616 | 70 | void selectTextureFile(QLineEdit * filePathLineEdit); | 70 | void selectTextureFile(QLineEdit * filePathLineEdit); |
4619 | 71 | //! Check if a file is a valid graphics file with OpenGL texture dimensions. | 71 | //! Check if a file is a valid graphics file with power-of-two texture dimensions. |
4620 | 72 | //! OpenGL accepts only dimentions that are powers of 2 (512, 1024, etc.) | 72 | //! StelRenderer only guarantees support for dimentions that are powers of 2 (512, 1024, etc.) |
4621 | 73 | bool verifyTextureFile(QString filePath); | 73 | bool verifyTextureFile(QString filePath); |
4622 | 74 | bool verifyPowerOfTwo(int value); | ||
4623 | 75 | 74 | ||
4624 | 76 | protected: | 75 | protected: |
4625 | 77 | virtual void createDialogContent(); | 76 | virtual void createDialogContent(); |
4626 | 78 | 77 | ||
4627 | === modified file 'plugins/Supernovae/src/Supernova.cpp' | |||
4628 | --- plugins/Supernovae/src/Supernova.cpp 2012-08-08 10:11:01 +0000 | |||
4629 | +++ plugins/Supernovae/src/Supernova.cpp 2012-08-30 16:29:19 +0000 | |||
4630 | @@ -18,19 +18,17 @@ | |||
4631 | 18 | 18 | ||
4632 | 19 | #include "Supernova.hpp" | 19 | #include "Supernova.hpp" |
4633 | 20 | #include "StelObject.hpp" | 20 | #include "StelObject.hpp" |
4634 | 21 | #include "StelPainter.hpp" | ||
4635 | 22 | #include "StelApp.hpp" | 21 | #include "StelApp.hpp" |
4636 | 23 | #include "StelCore.hpp" | 22 | #include "StelCore.hpp" |
4637 | 24 | #include "StelTexture.hpp" | ||
4638 | 25 | #include "StelUtils.hpp" | 23 | #include "StelUtils.hpp" |
4639 | 26 | #include "StelTranslator.hpp" | 24 | #include "StelTranslator.hpp" |
4640 | 27 | #include "StelModuleMgr.hpp" | 25 | #include "StelModuleMgr.hpp" |
4641 | 28 | #include "StelSkyDrawer.hpp" | 26 | #include "StelSkyDrawer.hpp" |
4642 | 27 | #include "StelRenderer.hpp" | ||
4643 | 29 | 28 | ||
4644 | 30 | #include <QTextStream> | 29 | #include <QTextStream> |
4645 | 31 | #include <QDebug> | 30 | #include <QDebug> |
4646 | 32 | #include <QVariant> | 31 | #include <QVariant> |
4647 | 33 | #include <QtOpenGL> | ||
4648 | 34 | #include <QVariantMap> | 32 | #include <QVariantMap> |
4649 | 35 | #include <QVariant> | 33 | #include <QVariant> |
4650 | 36 | #include <QList> | 34 | #include <QList> |
4651 | @@ -202,7 +200,7 @@ | |||
4652 | 202 | labelsFader.update((int)(deltaTime*1000)); | 200 | labelsFader.update((int)(deltaTime*1000)); |
4653 | 203 | } | 201 | } |
4654 | 204 | 202 | ||
4656 | 205 | void Supernova::draw(StelCore* core, StelPainter& painter) | 203 | void Supernova::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector) |
4657 | 206 | { | 204 | { |
4658 | 207 | StelSkyDrawer* sd = core->getSkyDrawer(); | 205 | StelSkyDrawer* sd = core->getSkyDrawer(); |
4659 | 208 | 206 | ||
4660 | @@ -215,21 +213,20 @@ | |||
4661 | 215 | 213 | ||
4662 | 216 | StelUtils::spheToRect(snra, snde, XYZ); | 214 | StelUtils::spheToRect(snra, snde, XYZ); |
4663 | 217 | mag = getVMagnitude(core, true); | 215 | mag = getVMagnitude(core, true); |
4665 | 218 | sd->preDrawPointSource(&painter); | 216 | sd->preDrawPointSource(); |
4666 | 219 | 217 | ||
4667 | 220 | if (mag <= sd->getLimitMagnitude()) | 218 | if (mag <= sd->getLimitMagnitude()) |
4668 | 221 | { | 219 | { |
4669 | 222 | sd->computeRCMag(mag, rcMag); | 220 | sd->computeRCMag(mag, rcMag); |
4674 | 223 | // sd->drawPointSource(&painter, Vec3f(XYZ[0], XYZ[1], XYZ[2]), rcMag, color, false); | 221 | sd->drawPointSource(projector, XYZ, rcMag, color, false); |
4675 | 224 | sd->drawPointSource(&painter, XYZ, rcMag, color, false); | 222 | renderer->setGlobalColor(color[0], color[1], color[2], 1); |
4676 | 225 | painter.setColor(color[0], color[1], color[2], 1); | 223 | size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter(); |
4673 | 226 | size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter(); | ||
4677 | 227 | shift = 6.f + size/1.8f; | 224 | shift = 6.f + size/1.8f; |
4678 | 228 | if (labelsFader.getInterstate()<=0.f) | 225 | if (labelsFader.getInterstate()<=0.f) |
4679 | 229 | { | 226 | { |
4681 | 230 | painter.drawText(XYZ, designation, 0, shift, shift, false); | 227 | renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity()); |
4682 | 231 | } | 228 | } |
4683 | 232 | } | 229 | } |
4684 | 233 | 230 | ||
4686 | 234 | sd->postDrawPointSource(&painter); | 231 | sd->postDrawPointSource(projector); |
4687 | 235 | } | 232 | } |
4688 | 236 | 233 | ||
4689 | === modified file 'plugins/Supernovae/src/Supernova.hpp' | |||
4690 | --- plugins/Supernovae/src/Supernova.hpp 2012-01-11 10:50:37 +0000 | |||
4691 | +++ plugins/Supernovae/src/Supernova.hpp 2012-08-30 16:29:19 +0000 | |||
4692 | @@ -27,11 +27,9 @@ | |||
4693 | 27 | #include <QDateTime> | 27 | #include <QDateTime> |
4694 | 28 | 28 | ||
4695 | 29 | #include "StelObject.hpp" | 29 | #include "StelObject.hpp" |
4696 | 30 | #include "StelTextureTypes.hpp" | ||
4697 | 31 | #include "StelPainter.hpp" | ||
4698 | 32 | #include "StelFader.hpp" | 30 | #include "StelFader.hpp" |
4699 | 31 | #include "StelProjectorType.hpp" | ||
4700 | 33 | 32 | ||
4701 | 34 | class StelPainter; | ||
4702 | 35 | 33 | ||
4703 | 36 | //! @class Supernova | 34 | //! @class Supernova |
4704 | 37 | //! A Supernova object represents one supernova on the sky. | 35 | //! A Supernova object represents one supernova on the sky. |
4705 | @@ -83,9 +81,7 @@ | |||
4706 | 83 | 81 | ||
4707 | 84 | Vec3d XYZ; // holds J2000 position | 82 | Vec3d XYZ; // holds J2000 position |
4708 | 85 | 83 | ||
4712 | 86 | static StelTextureSP hintTexture; | 84 | void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector); |
4710 | 87 | |||
4711 | 88 | void draw(StelCore* core, StelPainter& painter); | ||
4713 | 89 | 85 | ||
4714 | 90 | // Supernova | 86 | // Supernova |
4715 | 91 | QString designation; //! The ID of the supernova | 87 | QString designation; //! The ID of the supernova |
4716 | 92 | 88 | ||
4717 | === modified file 'plugins/Supernovae/src/Supernovae.cpp' | |||
4718 | --- plugins/Supernovae/src/Supernovae.cpp 2012-07-29 09:54:59 +0000 | |||
4719 | +++ plugins/Supernovae/src/Supernovae.cpp 2012-08-30 16:29:19 +0000 | |||
4720 | @@ -17,7 +17,6 @@ | |||
4721 | 17 | */ | 17 | */ |
4722 | 18 | 18 | ||
4723 | 19 | #include "StelProjector.hpp" | 19 | #include "StelProjector.hpp" |
4724 | 20 | #include "StelPainter.hpp" | ||
4725 | 21 | #include "StelApp.hpp" | 20 | #include "StelApp.hpp" |
4726 | 22 | #include "StelCore.hpp" | 21 | #include "StelCore.hpp" |
4727 | 23 | #include "StelGui.hpp" | 22 | #include "StelGui.hpp" |
4728 | @@ -25,7 +24,6 @@ | |||
4729 | 25 | #include "StelLocaleMgr.hpp" | 24 | #include "StelLocaleMgr.hpp" |
4730 | 26 | #include "StelModuleMgr.hpp" | 25 | #include "StelModuleMgr.hpp" |
4731 | 27 | #include "StelObjectMgr.hpp" | 26 | #include "StelObjectMgr.hpp" |
4732 | 28 | #include "StelTextureMgr.hpp" | ||
4733 | 29 | #include "StelJsonParser.hpp" | 27 | #include "StelJsonParser.hpp" |
4734 | 30 | #include "StelFileMgr.hpp" | 28 | #include "StelFileMgr.hpp" |
4735 | 31 | #include "StelUtils.hpp" | 29 | #include "StelUtils.hpp" |
4736 | @@ -33,6 +31,8 @@ | |||
4737 | 33 | #include "LabelMgr.hpp" | 31 | #include "LabelMgr.hpp" |
4738 | 34 | #include "Supernova.hpp" | 32 | #include "Supernova.hpp" |
4739 | 35 | #include "Supernovae.hpp" | 33 | #include "Supernovae.hpp" |
4740 | 34 | #include "renderer/StelRenderer.hpp" | ||
4741 | 35 | #include "renderer/StelTextureNew.hpp" | ||
4742 | 36 | #include "SupernovaeDialog.hpp" | 36 | #include "SupernovaeDialog.hpp" |
4743 | 37 | 37 | ||
4744 | 38 | #include <QNetworkAccessManager> | 38 | #include <QNetworkAccessManager> |
4745 | @@ -41,14 +41,15 @@ | |||
4746 | 41 | #include <QAction> | 41 | #include <QAction> |
4747 | 42 | #include <QProgressBar> | 42 | #include <QProgressBar> |
4748 | 43 | #include <QDebug> | 43 | #include <QDebug> |
4749 | 44 | #include <QFile> | ||
4750 | 44 | #include <QFileInfo> | 45 | #include <QFileInfo> |
4751 | 45 | #include <QFile> | ||
4752 | 46 | #include <QTimer> | 46 | #include <QTimer> |
4753 | 47 | #include <QVariantMap> | ||
4754 | 48 | #include <QVariant> | ||
4755 | 49 | #include <QList> | 47 | #include <QList> |
4756 | 48 | #include <QSettings> | ||
4757 | 50 | #include <QSharedPointer> | 49 | #include <QSharedPointer> |
4758 | 51 | #include <QStringList> | 50 | #include <QStringList> |
4759 | 51 | #include <QVariant> | ||
4760 | 52 | #include <QVariantMap> | ||
4761 | 52 | 53 | ||
4762 | 53 | #define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */ | 54 | #define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */ |
4763 | 54 | 55 | ||
4764 | @@ -81,7 +82,8 @@ | |||
4765 | 81 | Constructor | 82 | Constructor |
4766 | 82 | */ | 83 | */ |
4767 | 83 | Supernovae::Supernovae() | 84 | Supernovae::Supernovae() |
4769 | 84 | : progressBar(NULL) | 85 | : texPointer(NULL) |
4770 | 86 | , progressBar(NULL) | ||
4771 | 85 | { | 87 | { |
4772 | 86 | setObjectName("Supernovae"); | 88 | setObjectName("Supernovae"); |
4773 | 87 | configDialog = new SupernovaeDialog(); | 89 | configDialog = new SupernovaeDialog(); |
4774 | @@ -99,7 +101,10 @@ | |||
4775 | 99 | 101 | ||
4776 | 100 | void Supernovae::deinit() | 102 | void Supernovae::deinit() |
4777 | 101 | { | 103 | { |
4779 | 102 | texPointer.clear(); | 104 | if(NULL != texPointer) |
4780 | 105 | { | ||
4781 | 106 | delete texPointer; | ||
4782 | 107 | } | ||
4783 | 103 | } | 108 | } |
4784 | 104 | 109 | ||
4785 | 105 | /* | 110 | /* |
4786 | @@ -133,9 +138,6 @@ | |||
4787 | 133 | readSettingsFromConfig(); | 138 | readSettingsFromConfig(); |
4788 | 134 | 139 | ||
4789 | 135 | sneJsonPath = StelFileMgr::findFile("modules/Supernovae", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/supernovae.json"; | 140 | sneJsonPath = StelFileMgr::findFile("modules/Supernovae", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/supernovae.json"; |
4790 | 136 | |||
4791 | 137 | texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png"); | ||
4792 | 138 | |||
4793 | 139 | // key bindings and other actions | 141 | // key bindings and other actions |
4794 | 140 | // TRANSLATORS: Title of a group of key bindings in the Help window | 142 | // TRANSLATORS: Title of a group of key bindings in the Help window |
4795 | 141 | QString groupName = N_("Plugin Key Bindings"); | 143 | QString groupName = N_("Plugin Key Bindings"); |
4796 | @@ -192,27 +194,27 @@ | |||
4797 | 192 | /* | 194 | /* |
4798 | 193 | Draw our module. This should print name of first SNe in the main window | 195 | Draw our module. This should print name of first SNe in the main window |
4799 | 194 | */ | 196 | */ |
4801 | 195 | void Supernovae::draw(StelCore* core) | 197 | void Supernovae::draw(StelCore* core, StelRenderer* renderer) |
4802 | 196 | { | 198 | { |
4803 | 197 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 199 | StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
4806 | 198 | StelPainter painter(prj); | 200 | renderer->setFont(font); |
4805 | 199 | painter.setFont(font); | ||
4807 | 200 | 201 | ||
4808 | 201 | foreach (const SupernovaP& sn, snstar) | 202 | foreach (const SupernovaP& sn, snstar) |
4809 | 202 | { | 203 | { |
4810 | 203 | if (sn && sn->initialized) | 204 | if (sn && sn->initialized) |
4812 | 204 | sn->draw(core, painter); | 205 | { |
4813 | 206 | sn->draw(core, renderer, prj); | ||
4814 | 207 | } | ||
4815 | 205 | } | 208 | } |
4816 | 206 | 209 | ||
4817 | 207 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) | 210 | if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer()) |
4820 | 208 | drawPointer(core, painter); | 211 | { |
4821 | 209 | 212 | drawPointer(core, renderer, prj); | |
4822 | 213 | } | ||
4823 | 210 | } | 214 | } |
4824 | 211 | 215 | ||
4826 | 212 | void Supernovae::drawPointer(StelCore* core, StelPainter& painter) | 216 | void Supernovae::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector) |
4827 | 213 | { | 217 | { |
4828 | 214 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | ||
4829 | 215 | |||
4830 | 216 | const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Supernova"); | 218 | const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Supernova"); |
4831 | 217 | if (!newSelected.empty()) | 219 | if (!newSelected.empty()) |
4832 | 218 | { | 220 | { |
4833 | @@ -221,16 +223,21 @@ | |||
4834 | 221 | 223 | ||
4835 | 222 | Vec3d screenpos; | 224 | Vec3d screenpos; |
4836 | 223 | // Compute 2D pos and return if outside screen | 225 | // Compute 2D pos and return if outside screen |
4838 | 224 | if (!painter.getProjector()->project(pos, screenpos)) | 226 | if (!projector->project(pos, screenpos)) |
4839 | 227 | { | ||
4840 | 225 | return; | 228 | return; |
4841 | 229 | } | ||
4842 | 226 | 230 | ||
4843 | 227 | const Vec3f& c(obj->getInfoColor()); | 231 | const Vec3f& c(obj->getInfoColor()); |
4845 | 228 | painter.setColor(c[0],c[1],c[2]); | 232 | renderer->setGlobalColor(c[0],c[1],c[2]); |
4846 | 233 | if(NULL == texPointer) | ||
4847 | 234 | { | ||
4848 | 235 | texPointer = renderer->createTexture("textures/pointeur2.png"); | ||
4849 | 236 | } | ||
4850 | 229 | texPointer->bind(); | 237 | texPointer->bind(); |
4855 | 230 | painter.enableTexture2d(true); | 238 | renderer->setBlendMode(BlendMode_Alpha); |
4856 | 231 | glEnable(GL_BLEND); | 239 | renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, 26.0f, |
4857 | 232 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode | 240 | StelApp::getInstance().getTotalRunTime() * 40.0f); |
4854 | 233 | painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.); | ||
4858 | 234 | } | 241 | } |
4859 | 235 | } | 242 | } |
4860 | 236 | 243 | ||
4861 | 237 | 244 | ||
4862 | === modified file 'plugins/Supernovae/src/Supernovae.hpp' | |||
4863 | --- plugins/Supernovae/src/Supernovae.hpp 2012-07-29 09:54:59 +0000 | |||
4864 | +++ plugins/Supernovae/src/Supernovae.hpp 2012-08-30 16:29:19 +0000 | |||
4865 | @@ -22,8 +22,6 @@ | |||
4866 | 22 | #include "StelObjectModule.hpp" | 22 | #include "StelObjectModule.hpp" |
4867 | 23 | #include "StelObject.hpp" | 23 | #include "StelObject.hpp" |
4868 | 24 | #include "StelFader.hpp" | 24 | #include "StelFader.hpp" |
4869 | 25 | #include "StelTextureTypes.hpp" | ||
4870 | 26 | #include "StelPainter.hpp" | ||
4871 | 27 | #include "Supernova.hpp" | 25 | #include "Supernova.hpp" |
4872 | 28 | #include <QFont> | 26 | #include <QFont> |
4873 | 29 | #include <QVariantMap> | 27 | #include <QVariantMap> |
4874 | @@ -39,8 +37,6 @@ | |||
4875 | 39 | class QTimer; | 37 | class QTimer; |
4876 | 40 | class SupernovaeDialog; | 38 | class SupernovaeDialog; |
4877 | 41 | 39 | ||
4878 | 42 | class StelPainter; | ||
4879 | 43 | |||
4880 | 44 | typedef QSharedPointer<Supernova> SupernovaP; | 40 | typedef QSharedPointer<Supernova> SupernovaP; |
4881 | 45 | 41 | ||
4882 | 46 | //! This is an example of a plug-in which can be dynamically loaded into stellarium | 42 | //! This is an example of a plug-in which can be dynamically loaded into stellarium |
4883 | @@ -66,8 +62,8 @@ | |||
4884 | 66 | virtual void init(); | 62 | virtual void init(); |
4885 | 67 | virtual void deinit(); | 63 | virtual void deinit(); |
4886 | 68 | virtual void update(double) {;} | 64 | virtual void update(double) {;} |
4889 | 69 | virtual void draw(StelCore* core); | 65 | virtual void draw(StelCore* core, class StelRenderer* renderer); |
4890 | 70 | virtual void drawPointer(StelCore* core, StelPainter& painter); | 66 | virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector); |
4891 | 71 | virtual double getCallOrder(StelModuleActionName actionName) const; | 67 | virtual double getCallOrder(StelModuleActionName actionName) const; |
4892 | 72 | 68 | ||
4893 | 73 | /////////////////////////////////////////////////////////////////////////// | 69 | /////////////////////////////////////////////////////////////////////////// |
4894 | @@ -181,7 +177,7 @@ | |||
4895 | 181 | 177 | ||
4896 | 182 | QString sneJsonPath; | 178 | QString sneJsonPath; |
4897 | 183 | 179 | ||
4899 | 184 | StelTextureSP texPointer; | 180 | class StelTextureNew* texPointer; |
4900 | 185 | QList<SupernovaP> snstar; | 181 | QList<SupernovaP> snstar; |
4901 | 186 | QHash<QString, double> snlist; | 182 | QHash<QString, double> snlist; |
4902 | 187 | 183 | ||
4903 | 188 | 184 | ||
4904 | === modified file 'plugins/TelescopeControl/src/TelescopeControl.cpp' | |||
4905 | --- plugins/TelescopeControl/src/TelescopeControl.cpp 2012-01-11 10:50:37 +0000 | |||
4906 | +++ plugins/TelescopeControl/src/TelescopeControl.cpp 2012-08-30 16:29:19 +0000 | |||
4907 | @@ -42,10 +42,11 @@ | |||
4908 | 42 | #include "StelMovementMgr.hpp" | 42 | #include "StelMovementMgr.hpp" |
4909 | 43 | #include "StelObject.hpp" | 43 | #include "StelObject.hpp" |
4910 | 44 | #include "StelObjectMgr.hpp" | 44 | #include "StelObjectMgr.hpp" |
4911 | 45 | #include "StelPainter.hpp" | ||
4912 | 46 | #include "StelProjector.hpp" | 45 | #include "StelProjector.hpp" |
4913 | 47 | #include "StelStyle.hpp" | 46 | #include "StelStyle.hpp" |
4915 | 48 | #include "StelTextureMgr.hpp" | 47 | #include "renderer/StelGeometryBuilder.hpp" |
4916 | 48 | #include "renderer/StelRenderer.hpp" | ||
4917 | 49 | #include "renderer/StelTextureNew.hpp" | ||
4918 | 49 | 50 | ||
4919 | 50 | #include <QAction> | 51 | #include <QAction> |
4920 | 51 | #include <QDateTime> | 52 | #include <QDateTime> |
4921 | @@ -85,6 +86,13 @@ | |||
4922 | 85 | //////////////////////////////////////////////////////////////////////////////// | 86 | //////////////////////////////////////////////////////////////////////////////// |
4923 | 86 | // Constructor and destructor | 87 | // Constructor and destructor |
4924 | 87 | TelescopeControl::TelescopeControl() | 88 | TelescopeControl::TelescopeControl() |
4925 | 89 | : pixmapHover(NULL) | ||
4926 | 90 | , pixmapOnIcon(NULL) | ||
4927 | 91 | , pixmapOffIcon(NULL) | ||
4928 | 92 | , reticleTexture(NULL) | ||
4929 | 93 | , selectionTexture(NULL) | ||
4930 | 94 | , telescopeDialog(NULL) | ||
4931 | 95 | , slewDialog(NULL) | ||
4932 | 88 | { | 96 | { |
4933 | 89 | setObjectName("TelescopeControl"); | 97 | setObjectName("TelescopeControl"); |
4934 | 90 | 98 | ||
4935 | @@ -138,10 +146,6 @@ | |||
4936 | 138 | //Load and start all telescope clients | 146 | //Load and start all telescope clients |
4937 | 139 | loadTelescopes(); | 147 | loadTelescopes(); |
4938 | 140 | 148 | ||
4939 | 141 | //Load OpenGL textures | ||
4940 | 142 | reticleTexture = StelApp::getInstance().getTextureManager().createTexture(":/telescopeControl/telescope_reticle.png"); | ||
4941 | 143 | selectionTexture = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png"); | ||
4942 | 144 | |||
4943 | 145 | StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); | 149 | StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); |
4944 | 146 | 150 | ||
4945 | 147 | //Create telescope key bindings | 151 | //Create telescope key bindings |
4946 | @@ -165,7 +169,7 @@ | |||
4947 | 165 | connect(gui->getGuiActions(name), SIGNAL(triggered()), this, SLOT(slewTelescopeToViewDirection())); | 169 | connect(gui->getGuiActions(name), SIGNAL(triggered()), this, SLOT(slewTelescopeToViewDirection())); |
4948 | 166 | } | 170 | } |
4949 | 167 | 171 | ||
4951 | 168 | //Create and initialize dialog windows | 172 | //Create and initialize dialog windows |
4952 | 169 | telescopeDialog = new TelescopeDialog(); | 173 | telescopeDialog = new TelescopeDialog(); |
4953 | 170 | slewDialog = new SlewDialog(); | 174 | slewDialog = new SlewDialog(); |
4954 | 171 | 175 | ||
4955 | @@ -175,10 +179,10 @@ | |||
4956 | 175 | connect(slewDialog, SIGNAL(visibleChanged(bool)), gui->getGuiActions("actionShow_Slew_Window"), SLOT(setChecked(bool))); | 179 | connect(slewDialog, SIGNAL(visibleChanged(bool)), gui->getGuiActions("actionShow_Slew_Window"), SLOT(setChecked(bool))); |
4957 | 176 | 180 | ||
4958 | 177 | //Create toolbar button | 181 | //Create toolbar button |
4963 | 178 | pixmapHover = new QPixmap(":/graphicGui/glow32x32.png"); | 182 | pixmapHover = new QPixmap(":/graphicGui/glow32x32.png"); |
4964 | 179 | pixmapOnIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_on.png"); | 183 | pixmapOnIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_on.png"); |
4965 | 180 | pixmapOffIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_off.png"); | 184 | pixmapOffIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_off.png"); |
4966 | 181 | toolbarButton = new StelButton(NULL, *pixmapOnIcon, *pixmapOffIcon, *pixmapHover, gui->getGuiActions("actionShow_Slew_Window")); | 185 | toolbarButton = new StelButton(NULL, *pixmapOnIcon, *pixmapOffIcon, *pixmapHover, gui->getGuiActions("actionShow_Slew_Window")); |
4967 | 182 | gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup"); | 186 | gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup"); |
4968 | 183 | } | 187 | } |
4969 | 184 | catch (std::runtime_error &e) | 188 | catch (std::runtime_error &e) |
4970 | @@ -216,6 +220,18 @@ | |||
4971 | 216 | ++iterator; | 220 | ++iterator; |
4972 | 217 | } | 221 | } |
4973 | 218 | 222 | ||
4974 | 223 | if(NULL != reticleTexture) {delete reticleTexture;} | ||
4975 | 224 | if(NULL != selectionTexture) {delete selectionTexture;} | ||
4976 | 225 | if(NULL != telescopeDialog) {delete telescopeDialog;} | ||
4977 | 226 | if(NULL != slewDialog) {delete slewDialog;} | ||
4978 | 227 | if(NULL != pixmapHover) {delete pixmapHover;} | ||
4979 | 228 | if(NULL != pixmapOnIcon) {delete pixmapOnIcon;} | ||
4980 | 229 | if(NULL != pixmapOffIcon) {delete pixmapOffIcon;} | ||
4981 | 230 | reticleTexture = selectionTexture = NULL; | ||
4982 | 231 | telescopeDialog = NULL; | ||
4983 | 232 | slewDialog = NULL; | ||
4984 | 233 | pixmapHover = pixmapOnIcon = pixmapOffIcon; | ||
4985 | 234 | |||
4986 | 219 | //TODO: Decide if it should be saved on change | 235 | //TODO: Decide if it should be saved on change |
4987 | 220 | //Save the configuration on exit | 236 | //Save the configuration on exit |
4988 | 221 | saveConfiguration(); | 237 | saveConfiguration(); |
4989 | @@ -230,15 +246,17 @@ | |||
4990 | 230 | communicate(); | 246 | communicate(); |
4991 | 231 | } | 247 | } |
4992 | 232 | 248 | ||
4994 | 233 | void TelescopeControl::draw(StelCore* core) | 249 | void TelescopeControl::draw(StelCore* core, StelRenderer* renderer) |
4995 | 234 | { | 250 | { |
4996 | 235 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); | 251 | const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); |
4997 | 236 | StelPainter sPainter(prj); | ||
4998 | 237 | sPainter.setFont(labelFont); | ||
4999 | 238 | glEnable(GL_TEXTURE_2D); | ||
5000 | 239 | glEnable(GL_BLEND); |
This simply fails to compile.
Looking into it more, there are several issues:
- GL_RGBA32F on Mac is GL_RGBA32F_ARB. It looks like this may be due to Apple not having updated their include files to reflect that it is now standard, and not experimental.
- SolarSystem. cpp:937: 12: error: variable length array of non-POD element type 'Vec4f' (aka 'Vector4<float>') cpp:940: 22: error: variable length array of non-POD element type 'Mat4d' (aka 'Matrix4<double>')
- SolarSystem.
For those last two, you need to do heap allocation, or refactor the code to use a Qt structure (QVector perhaps?).
Once those are taken care of, it compiles and runs (I used the heap allocation because it was the most expedient solution). However. On my very new, very expensive, very high end computer, the frame rate goes from 75 for the 0.11.4 release we just made, to 15. That's a phenomenal decrease in performance! I'll try it tomorrow on my crappy work machine running Ubuntu, to see how it is there. Is this kind of performance decrease expected?