Merge lp:~kiithsacmp/stellarium/glexperiment into lp:stellarium

Proposed by Ferdinand Majerech
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
Reviewer Review Type Date Requested Status
treaves Needs Fixing
Review via email: mp+121962@code.launchpad.net

Description of the change

Graphics code refactor and solar system shadows.

To post a comment you must log in.
Revision history for this message
treaves (treaves) wrote :

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>')
- SolarSystem.cpp:940:22: error: variable length array of non-POD element 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?

review: Needs Fixing
Revision history for this message
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.cpp:937:12: error: variable length array of non-POD element
> type 'Vec4f' (aka 'Vector4<float>')
> - SolarSystem.cpp:940:22: error: variable length array of non-POD element
> 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://code.launchpad.net/~kiithsacmp/stellarium/glexperiment/+merge/121962
> You are the owner of lp:~kiithsacmp/stellarium/glexperiment.
>

Revision history for this message
Ferdinand Majerech (kiithsacmp) wrote :
Download full text (3.4 KiB)

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.cpp:937:12: error: variable length array of non-POD element
>> type 'Vec4f' (aka 'Vector4<float>')
>> - SolarSystem.cpp:940:22: error: variable length array of non-POD element
>> 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...

Read more...

Revision history for this message
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://ompldr.org/vZmFnaQ/snapshot1.png)

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.

Revision history for this message
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://ompldr.org/vZmFnaQ/snapshot1.png)
>
> 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://code.launchpad.net/~kiithsacmp/stellarium/glexperiment/+merge/121962
> You are reviewing the proposed merge of
> lp:~kiithsacmp/stellarium/glexperiment into lp:stellarium.
>

Revision history for this message
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!)

Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2012-07-22 14:33:23 +0000
+++ .bzrignore 2012-08-30 16:29:19 +0000
@@ -4,5 +4,6 @@
4CMakeLists.txt.user4CMakeLists.txt.user
5Stellarium.bat5Stellarium.bat
6stellarium.iss6stellarium.iss
7*.kdev4
7./doc/qt.tag8./doc/qt.tag
8./locale9./locale
910
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-08-25 15:21:39 +0000
+++ CMakeLists.txt 2012-08-30 16:29:19 +0000
@@ -423,6 +423,7 @@
423 ${CMAKE_BINARY_DIR}423 ${CMAKE_BINARY_DIR}
424 ${CMAKE_SOURCE_DIR}/src424 ${CMAKE_SOURCE_DIR}/src
425 ${CMAKE_SOURCE_DIR}/src/core425 ${CMAKE_SOURCE_DIR}/src/core
426 ${CMAKE_SOURCE_DIR}/src/core/renderer
426 ${CMAKE_SOURCE_DIR}/src/core/modules427 ${CMAKE_SOURCE_DIR}/src/core/modules
427 ${CMAKE_SOURCE_DIR}/src/core/planetsephems428 ${CMAKE_SOURCE_DIR}/src/core/planetsephems
428 ${CMAKE_SOURCE_DIR}/src/core/external429 ${CMAKE_SOURCE_DIR}/src/core/external
429430
=== modified file 'Doxyfile.cmake'
--- Doxyfile.cmake 2012-05-09 04:30:26 +0000
+++ Doxyfile.cmake 2012-08-30 16:29:19 +0000
@@ -423,7 +423,7 @@
423423
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.
425425
426SORT_MEMBERS_CTORS_1ST = NO426SORT_MEMBERS_CTORS_1ST = YES
427427
428# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the428# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
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)
@@ -484,13 +484,13 @@
484# at the bottom of the documentation of classes and structs. If set to YES the484# at the bottom of the documentation of classes and structs. If set to YES the
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.
486486
487SHOW_USED_FILES = NO487SHOW_USED_FILES = YES
488488
489# If the sources in your project are distributed over multiple directories489# If the sources in your project are distributed over multiple directories
490# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy490# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
491# in the documentation. The default is NO.491# in the documentation. The default is NO.
492492
493SHOW_DIRECTORIES = NO493SHOW_DIRECTORIES = YES
494494
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.
496# This will remove the Files entry from the Quick Index and from the496# This will remove the Files entry from the Quick Index and from the
@@ -703,7 +703,7 @@
703# Note: To get rid of all source code in the generated output, make sure also703# Note: To get rid of all source code in the generated output, make sure also
704# VERBATIM_HEADERS is set to NO.704# VERBATIM_HEADERS is set to NO.
705705
706SOURCE_BROWSER = NO706SOURCE_BROWSER = YES
707707
708# Setting the INLINE_SOURCES tag to YES will include the body708# Setting the INLINE_SOURCES tag to YES will include the body
709# of functions and classes directly in the documentation.709# of functions and classes directly in the documentation.
710710
=== modified file 'data/default_config.ini'
--- data/default_config.ini 2012-08-28 17:10:57 +0000
+++ data/default_config.ini 2012-08-30 16:29:19 +0000
@@ -18,7 +18,8 @@
18vertical_offset = 018vertical_offset = 0
19minimum_fps = 1819minimum_fps = 18
20maximum_fps = 1000020maximum_fps = 10000
21viewport_effect = none21viewport_effect = sphericMirrorDistorter
22#viewport_effect = none
2223
23[projection]24[projection]
24type = ProjectionStereographic25type = ProjectionStereographic
2526
=== modified file 'data/shaders/xyYToRGB.glsl'
--- data/shaders/xyYToRGB.glsl 2010-03-04 18:55:22 +0000
+++ data/shaders/xyYToRGB.glsl 2012-08-30 16:29:19 +0000
@@ -16,45 +16,47 @@
16uniform mediump mat4 projectionMatrix;16uniform mediump mat4 projectionMatrix;
1717
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)
19attribute mediump vec2 skyVertex;19attribute mediump vec2 vertex;
2020
21// Contains the r,g,b,Y (luminosity) components.21// Contains the r,g,b,Y (luminosity) components.
22attribute highp vec4 skyColor;22attribute highp vec4 color;
2323
24// The output variable passed to the fragment shader24// The output variable passed to the fragment shader
25varying mediump vec4 resultSkyColor;25varying mediump vec4 resultSkyColor;
2626
27void main()27void main()
28{28{
29 gl_Position = projectionMatrix*vec4(skyVertex, 0., 1.);29 gl_Position = projectionMatrix*vec4(vertex, 0., 1.);
30 highp vec4 color = skyColor;30
31 // Must be a separate variable due to Intel drivers
32 vec4 tempColor = color;
3133
32 ///////////////////////////////////////////////////////////////////////////34 ///////////////////////////////////////////////////////////////////////////
33 // First compute the xy color component35 // First compute the xy color component
34 // color contains the unprojected vertex position in r,g,b36 // color contains the unprojected vertex position in r,g,b
35 // + the Y (luminance) component of the color in the alpha channel37 // + the Y (luminance) component of the color in the alpha channel
36 if (color[3]>0.01)38 if (tempColor[3]>0.01)
37 {39 {
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];
39 highp float distSun=acos(cosDistSunq);41 highp float distSun=acos(cosDistSunq);
40 highp float oneOverCosZenithAngle = (color[2]==0.) ? 9999999999999. : 1. / color[2];42 highp float oneOverCosZenithAngle = (tempColor[2]==0.) ? 9999999999999. : 1. / tempColor[2];
4143
42 cosDistSunq*=cosDistSunq;44 cosDistSunq*=cosDistSunq;
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);
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);
45 if (color[0] < 0. || color[1] < 0.)47 if (tempColor[0] < 0. || tempColor[1] < 0.)
46 {48 {
47 color[0] = 0.25;49 tempColor[0] = 0.25;
48 color[1] = 0.25;50 tempColor[1] = 0.25;
49 }51 }
50 }52 }
51 else53 else
52 {54 {
53 color[0] = 0.25;55 tempColor[0] = 0.25;
54 color[1] = 0.25;56 tempColor[1] = 0.25;
55 }57 }
56 color[2]=color[3];58 tempColor[2]=tempColor[3];
57 color[3]=1.;59 tempColor[3]=1.;
5860
5961
60 ///////////////////////////////////////////////////////////////////////////62 ///////////////////////////////////////////////////////////////////////////
@@ -64,39 +66,39 @@
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)
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),
66 // else mesopic vision (with rods and cones, transition state)68 // else mesopic vision (with rods and cones, transition state)
67 if (color[2] <= 0.01)69 if (tempColor[2] <= 0.01)
68 {70 {
69 // special case for s = 0 (x=0.25, y=0.25)71 // special case for s = 0 (x=0.25, y=0.25)
70 color[2] *= 0.5121445;72 tempColor[2] *= 0.5121445;
71 color[2] = pow(color[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;73 tempColor[2] = pow(tempColor[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;
72 color[0] = 0.787077*color[2];74 tempColor[0] = 0.787077*tempColor[2];
73 color[1] = 0.9898434*color[2];75 tempColor[1] = 0.9898434*tempColor[2];
74 color[2] *= 1.9256125;76 tempColor[2] *= 1.9256125;
75 resultSkyColor = color*brightnessScale;77 resultSkyColor = tempColor*brightnessScale;
76 }78 }
77 else79 else
78 {80 {
79 if (color[2]<3.9810717055349722)81 if (tempColor[2]<3.9810717055349722)
80 {82 {
81 // Compute s, ratio between scotopic and photopic vision83 // Compute s, ratio between scotopic and photopic vision
82 float op = (log(color[2])/ln10 + 2.)/2.6;84 float op = (log(tempColor[2])/ln10 + 2.)/2.6;
83 float s = op * op *(3. - 2. * op);85 float s = op * op *(3. - 2. * op);
84 // Do the blue shift for scotopic vision simulation (night vision) [3]86 // Do the blue shift for scotopic vision simulation (night vision) [3]
85 // The "night blue" is x,y(0.25, 0.25)87 // The "night blue" is x,y(0.25, 0.25)
86 color[0] = (1. - s) * 0.25 + s * color[0]; // Add scotopic + photopic components88 tempColor[0] = (1. - s) * 0.25 + s * tempColor[0]; // Add scotopic + photopic components
87 color[1] = (1. - s) * 0.25 + s * color[1]; // Add scotopic + photopic components89 tempColor[1] = (1. - s) * 0.25 + s * tempColor[1]; // Add scotopic + photopic components
88 // Take into account the scotopic luminance approximated by V [3] [4]90 // Take into account the scotopic luminance approximated by V [3] [4]
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);
90 color[2] = 0.4468 * (1. - s) * V + s * color[2];92 tempColor[2] = 0.4468 * (1. - s) * V + s * tempColor[2];
91 }93 }
9294
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]
94 // color[2] = std::pow(adaptLuminanceScaled(color[2]), oneOverGamma);96 // tempColor[2] = std::pow(adaptLuminanceScaled(tempColor[2]), oneOverGamma);
95 color[2] = pow(color[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;97 tempColor[2] = pow(tempColor[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;
9698
97 // Convert from xyY to XZY99 // Convert from xyY to XZY
98 // Use a XYZ to Adobe RGB (1998) matrix which uses a D65 reference white100 // Use a XYZ to Adobe RGB (1998) matrix which uses a D65 reference white
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]);
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.);
101 resultSkyColor*=brightnessScale;103 resultSkyColor*=brightnessScale;
102 }104 }
103105
=== modified file 'doc/codingConventions.doxygen'
--- doc/codingConventions.doxygen 2012-04-29 12:13:30 +0000
+++ doc/codingConventions.doxygen 2012-08-30 16:29:19 +0000
@@ -20,9 +20,7 @@
20/*!20/*!
2121
22@page codingStyle Coding Style Conventions in Stellarium22@page codingStyle Coding Style Conventions in Stellarium
23
24@tableofcontents23@tableofcontents
25
26The 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.24The 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.
2725
28@section stylistic_conventions_sec Stylistic Conventions26@section stylistic_conventions_sec Stylistic Conventions
2927
=== modified file 'doc/doc-header.html'
--- doc/doc-header.html 2011-08-03 17:51:45 +0000
+++ doc/doc-header.html 2012-08-30 16:29:19 +0000
@@ -19,6 +19,7 @@
19 <a href="codingStyle.html">Coding Style</a>&nbsp;&middot;19 <a href="codingStyle.html">Coding Style</a>&nbsp;&middot;
20 <a href="scripting.html">Scripting</a>&nbsp;&middot;20 <a href="scripting.html">Scripting</a>&nbsp;&middot;
21 <a href="plugins.html">Plugins</a>&nbsp;&middot;21 <a href="plugins.html">Plugins</a>&nbsp;&middot;
22 <a href="renderer.html">Renderer</a>&nbsp;&middot;
22 <a href="fileStructure.html">File Structure</a>23 <a href="fileStructure.html">File Structure</a>
23</td>24</td>
24</tr>25</tr>
2526
=== added file 'doc/images/renderer-api-overview.png'
26Binary 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 differ27Binary 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
=== added file 'doc/images/renderer-implementation-overview.png'
27Binary 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 differ28Binary 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
=== modified file 'doc/images/stellarium-architecture.png'
28Binary 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 differ29Binary 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
=== modified file 'doc/mainpage.doxygen'
--- doc/mainpage.doxygen 2012-04-29 12:13:30 +0000
+++ doc/mainpage.doxygen 2012-08-30 16:29:19 +0000
@@ -28,13 +28,39 @@
2828
29@section architecture_sec Program Architecture29@section architecture_sec Program Architecture
3030
31The code of Stellarium is split into several main blocks:31The code of Stellarium is split into several main blocks: <ul>
32<ul>32
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
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>34StelAppGraphicsWidget. Those classes have a single instance created at startup by the ::main()
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>35function. They perform tasks such as creating of the main window and renderer, creating the
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>36stellarium core, creating the GUI. After initialization, they manage user's input event
37<li>the script engine (StelScriptMgr) allows scripts to calls slots from the core and StelModules slots.</li>37propagation and event loop. They are heavily based on %Qt features. </li>
38
39<li> the core which provides generic services and features to the other components. The main
40class is the StelApp singleton which is used everywhere in the code to access other elements.
41The StelApp instance creates all the main core services and modules at initialization. Example
42services are sky layer management (e.g. images which have a fixed position in the sky) with the
43StelSkyLayerMgr, drawing with StelRenderer etc. . Two especially important manager classes are
44the StelModuleMgr and StelCore: the former manages the collection of StelModule instances
45registered in the program (see next point for more info on what a StelModule is). The latter
46provides performance critical features for computing coordinate transformation and other
47mathematical services. </li>
48
49<li> a collection of StelModule instances which display the main elements of the program such as
50planets and stars. Each StelModule should be registered to the StelModuleMgr. Because many
51Stellarium components derive from the StelModule class, the main loop is able to treat them
52generically by calling their standard methods such StelModule::update() and StelModule::draw()
53at each program iteration. This also allows other program components to access them by name.
54StelModule can also be loaded dynamically by Stellarium, which is the standard way of creating
55@ref plugins. </li>
56
57<li> the Graphical User Interface (StelGui). It is based on styled %Qt widgets which are
58rendered directly in the graphics window. User actions trigger signals connected to core and
59StelModules slots. </li>
60
61<li> the script engine (StelScriptMgr) allows scripts to calls slots from the core and
62StelModule slots. </li>
63
38</ul>64</ul>
39@image html stellarium-architecture.png65@image html stellarium-architecture.png
4066
4167
=== added file 'doc/renderer-api-overview.svg'
--- doc/renderer-api-overview.svg 1970-01-01 00:00:00 +0000
+++ doc/renderer-api-overview.svg 2012-08-30 16:29:19 +0000
@@ -0,0 +1,658 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
6 xmlns:dc="http://purl.org/dc/elements/1.1/"
7 xmlns:cc="http://creativecommons.org/ns#"
8 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9 xmlns:svg="http://www.w3.org/2000/svg"
10 xmlns="http://www.w3.org/2000/svg"
11 xmlns:xlink="http://www.w3.org/1999/xlink"
12 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
13 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
14 width="1052.3622"
15 height="744.09448"
16 id="svg3265"
17 version="1.1"
18 inkscape:version="0.48.3.1 r9886"
19 sodipodi:docname="api-overview.svg"
20 inkscape:export-filename="/home/kiith-sa/Programming/stellarium/doc/images/api-overview.png"
21 inkscape:export-xdpi="90"
22 inkscape:export-ydpi="90">
23 <defs
24 id="defs3267">
25 <marker
26 inkscape:stockid="EmptyDiamondL"
27 orient="auto"
28 refY="0.0"
29 refX="0.0"
30 id="EmptyDiamondL"
31 style="overflow:visible">
32 <path
33 id="path9879"
34 d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z "
35 style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
36 transform="scale(0.8)" />
37 </marker>
38 <linearGradient
39 id="linearGradient9420"
40 osb:paint="solid">
41 <stop
42 style="stop-color:#000000;stop-opacity:1;"
43 offset="0"
44 id="stop9422" />
45 </linearGradient>
46 <linearGradient
47 id="linearGradient8650"
48 osb:paint="solid">
49 <stop
50 style="stop-color:#000000;stop-opacity:1;"
51 offset="0"
52 id="stop8652" />
53 </linearGradient>
54 <marker
55 inkscape:stockid="Tail"
56 orient="auto"
57 refY="0.0"
58 refX="0.0"
59 id="Tail"
60 style="overflow:visible">
61 <g
62 id="g4852"
63 transform="scale(-1.2)">
64 <path
65 id="path4854"
66 d="M -3.8048674,-3.9585227 L 0.54352094,0"
67 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
68 <path
69 id="path4856"
70 d="M -1.2866832,-3.9585227 L 3.0617053,0"
71 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
72 <path
73 id="path4858"
74 d="M 1.3053582,-3.9585227 L 5.6537466,0"
75 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
76 <path
77 id="path4860"
78 d="M -3.8048674,4.1775838 L 0.54352094,0.21974226"
79 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
80 <path
81 id="path4862"
82 d="M -1.2866832,4.1775838 L 3.0617053,0.21974226"
83 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
84 <path
85 id="path4864"
86 d="M 1.3053582,4.1775838 L 5.6537466,0.21974226"
87 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
88 </g>
89 </marker>
90 <marker
91 inkscape:stockid="EmptyTriangleInL"
92 orient="auto"
93 refY="0.0"
94 refX="0.0"
95 id="EmptyTriangleInL"
96 style="overflow:visible">
97 <path
98 id="path4967"
99 d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
100 style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
101 transform="scale(-0.8) translate(-6,0)" />
102 </marker>
103 <marker
104 inkscape:stockid="EmptyTriangleOutL"
105 orient="auto"
106 refY="0.0"
107 refX="0.0"
108 id="EmptyTriangleOutL"
109 style="overflow:visible">
110 <path
111 id="path4976"
112 d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
113 style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
114 transform="scale(0.8) translate(-6,0)" />
115 </marker>
116 <marker
117 inkscape:stockid="SemiCircleOut"
118 orient="auto"
119 refY="0.0"
120 refX="0.0"
121 id="SemiCircleOut"
122 style="overflow:visible">
123 <path
124 id="path4997"
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 "
126 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
127 transform="scale(0.6) translate(7.125493,0.763446)" />
128 </marker>
129 <marker
130 inkscape:stockid="CurveOut"
131 orient="auto"
132 refY="0.0"
133 refX="0.0"
134 id="CurveOut"
135 style="overflow:visible">
136 <path
137 id="path5003"
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"
139 style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
140 transform="scale(0.6)" />
141 </marker>
142 <marker
143 inkscape:stockid="Scissors"
144 orient="auto"
145 refY="0.0"
146 refX="0.0"
147 id="Scissors"
148 style="overflow:visible">
149 <path
150 id="schere"
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 "
152 style="fill:#000000;" />
153 </marker>
154 <marker
155 inkscape:stockid="Legs"
156 orient="auto"
157 refY="0.0"
158 refX="0.0"
159 id="Legs"
160 style="overflow:visible">
161 <g
162 id="g5015"
163 transform="scale(-0.7)">
164 <g
165 id="g5017"
166 transform="matrix(0,-1.000000,-1.000000,0,20.70862,21.31391)">
167 <path
168 id="path5019"
169 d="M 21.221250,20.675360 C 14.311099,25.396517 18.766725,27.282204 15.380179,34.118595"
170 style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt" />
171 <path
172 id="path5021"
173 d="M 21.398110,20.548120 C 20.037601,28.895644 24.934182,29.318060 25.903151,34.373078"
174 style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt" />
175 </g>
176 <path
177 id="path5023"
178 d="M -14.090070,-6.7318716 L -15.012238,-2.6884886 L -11.049487,-3.9115586 L -14.090070,-6.7318716 z "
179 style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt" />
180 <path
181 id="path5025"
182 d="M -15.215679,4.5567534 L -13.341552,8.2563664 L -11.074678,4.7835114 L -15.215679,4.5567534 z "
183 style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt" />
184 </g>
185 </marker>
186 <marker
187 inkscape:stockid="CurveIn"
188 orient="auto"
189 refY="0.0"
190 refX="0.0"
191 id="CurveIn"
192 style="overflow:visible">
193 <path
194 id="path5000"
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"
196 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;fill:none"
197 transform="scale(0.6)" />
198 </marker>
199 <marker
200 inkscape:stockid="EmptyDiamondLstart"
201 orient="auto"
202 refY="0.0"
203 refX="0.0"
204 id="EmptyDiamondLstart"
205 style="overflow:visible">
206 <path
207 id="path4931"
208 d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z "
209 style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
210 transform="scale(0.8) translate(7,0)" />
211 </marker>
212 <marker
213 inkscape:stockid="Arrow2Lstart"
214 orient="auto"
215 refY="0.0"
216 refX="0.0"
217 id="Arrow2Lstart"
218 style="overflow:visible">
219 <path
220 id="path4834"
221 style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
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 "
223 transform="scale(1.1) translate(1,0)" />
224 </marker>
225 <marker
226 inkscape:stockid="Arrow1Lstart"
227 orient="auto"
228 refY="0.0"
229 refX="0.0"
230 id="Arrow1Lstart"
231 style="overflow:visible">
232 <path
233 id="path4816"
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 "
235 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
236 transform="scale(0.8) translate(12.5,0)" />
237 </marker>
238 <marker
239 inkscape:stockid="Arrow1Lend"
240 orient="auto"
241 refY="0.0"
242 refX="0.0"
243 id="Arrow1Lend"
244 style="overflow:visible;">
245 <path
246 id="path4819"
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 "
248 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
249 transform="scale(0.8) rotate(180) translate(12.5,0)" />
250 </marker>
251 </defs>
252 <sodipodi:namedview
253 id="base"
254 pagecolor="#ffffff"
255 bordercolor="#666666"
256 borderopacity="1.0"
257 inkscape:pageopacity="0.0"
258 inkscape:pageshadow="2"
259 inkscape:zoom="1.4142136"
260 inkscape:cx="611.81556"
261 inkscape:cy="403.85116"
262 inkscape:document-units="px"
263 inkscape:current-layer="layer1"
264 showgrid="true"
265 inkscape:window-width="2560"
266 inkscape:window-height="1385"
267 inkscape:window-x="-2"
268 inkscape:window-y="-3"
269 inkscape:window-maximized="1">
270 <inkscape:grid
271 type="xygrid"
272 id="grid4630"
273 empspacing="5"
274 visible="true"
275 enabled="true"
276 snapvisiblegridlinesonly="true" />
277 </sodipodi:namedview>
278 <metadata
279 id="metadata3270">
280 <rdf:RDF>
281 <cc:Work
282 rdf:about="">
283 <dc:format>image/svg+xml</dc:format>
284 <dc:type
285 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
286 <dc:title></dc:title>
287 </cc:Work>
288 </rdf:RDF>
289 </metadata>
290 <g
291 inkscape:label="Layer 1"
292 inkscape:groupmode="layer"
293 id="layer1"
294 transform="translate(0,-308.2677)">
295 <rect
296 style="fill:#000000;fill-opacity:0.1254902"
297 id="rect8829"
298 width="1050"
299 height="570"
300 x="0"
301 y="482.36218" />
302 <rect
303 style="fill:#00ff00;fill-opacity:0.1254902"
304 id="rect8771"
305 width="460"
306 height="120"
307 x="10"
308 y="522.36218" />
309 <rect
310 style="fill:#00ff00;fill-opacity:0.1254902"
311 id="rect8773"
312 width="460"
313 height="30"
314 x="10"
315 y="522.36218" />
316 <text
317 xml:space="preserve"
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"
319 x="70"
320 y="549.36169"
321 id="text8775"
322 sodipodi:linespacing="125%"><tspan
323 sodipodi:role="line"
324 x="70"
325 y="549.36169"
326 id="tspan8779">Renderer API extensions</tspan></text>
327 <rect
328 id="rect7204"
329 width="1030"
330 height="390"
331 x="10"
332 y="652.36218"
333 style="fill:#0000ff;fill-opacity:0.1254902" />
334 <rect
335 style="fill:#0000ff;fill-opacity:0.1254902"
336 id="rect8749"
337 width="1030"
338 height="30"
339 x="10"
340 y="652.36218" />
341 <text
342 xml:space="preserve"
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"
344 x="400"
345 y="679.36169"
346 id="text8751"
347 sodipodi:linespacing="125%"><tspan
348 sodipodi:role="line"
349 id="tspan8753"
350 x="400"
351 y="679.36169">Main Renderer API</tspan></text>
352 <g
353 id="g4775"
354 transform="translate(-290,280)">
355 <rect
356 y="692.36218"
357 x="380"
358 height="30"
359 width="190"
360 id="rect4693"
361 style="fill:#000000;fill-opacity:0.15686275" />
362 <flowRoot
363 xml:space="preserve"
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"
365 id="flowRoot8908"><flowRegion
366 id="flowRegion8910"><use
367 x="0"
368 y="0"
369 xlink:href="#rect4693"
370 id="use8912"
371 width="1052.3622"
372 height="744.09448" /></flowRegion><flowPara
373 id="flowPara8914">StelIndexBuffer</flowPara></flowRoot> </g>
374 <g
375 id="g4782"
376 transform="translate(320,170)">
377 <rect
378 y="802.36218"
379 x="440"
380 height="30"
381 width="200"
382 id="rect4695"
383 style="fill:#000000;fill-opacity:0.15686275" />
384 <flowRoot
385 xml:space="preserve"
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"
387 id="flowRoot8900"><flowRegion
388 id="flowRegion8902"><use
389 x="0"
390 y="0"
391 xlink:href="#rect4695"
392 id="use8904"
393 width="1052.3622"
394 height="744.09448" /></flowRegion><flowPara
395 id="flowPara8906">StelGLSLShader</flowPara></flowRoot> </g>
396 <g
397 id="g4789"
398 transform="translate(190,-130)">
399 <rect
400 y="892.36218"
401 x="520"
402 height="30"
403 width="190"
404 id="rect4697"
405 style="fill:#000000;fill-opacity:0.15686275" />
406 <flowRoot
407 xml:space="preserve"
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"
409 id="flowRoot8892"><flowRegion
410 id="flowRegion8894"><use
411 x="0"
412 y="0"
413 xlink:href="#rect4697"
414 id="use8896"
415 width="1052.3622"
416 height="744.09448" /></flowRegion><flowPara
417 id="flowPara8898">StelTextureNew</flowPara></flowRoot> </g>
418 <g
419 id="g4796"
420 transform="translate(-670,70)">
421 <rect
422 y="492.36218"
423 x="770"
424 height="30"
425 width="260"
426 id="rect4699"
427 style="fill:#000000;fill-opacity:0.15686275" />
428 <flowRoot
429 xml:space="preserve"
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"
431 id="flowRoot8951"><flowRegion
432 id="flowRegion8953"><use
433 x="0"
434 y="0"
435 xlink:href="#rect4699"
436 id="use8955"
437 width="1052.3622"
438 height="744.09448" /></flowRegion><flowPara
439 id="flowPara8957">StelGeometryBuilder</flowPara></flowRoot> </g>
440 <g
441 id="g4803"
442 transform="translate(-690,200)">
443 <rect
444 y="402.36218"
445 x="790"
446 height="30"
447 width="270"
448 id="rect4701"
449 style="fill:#000000;fill-opacity:0.15686275" />
450 <flowRoot
451 xml:space="preserve"
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"
453 id="flowRoot8916"><flowRegion
454 id="flowRegion8918"><use
455 x="0"
456 y="0"
457 xlink:href="#rect4701"
458 id="use8920"
459 width="1052.3622"
460 height="744.09448" /></flowRegion><flowPara
461 id="flowPara8922">StelCircleArcRenderer</flowPara></flowRoot> </g>
462 <g
463 id="g4761"
464 transform="translate(100,280)">
465 <rect
466 y="432.36218"
467 x="340"
468 height="30"
469 width="160"
470 id="rect4751"
471 style="fill:#000000;fill-opacity:0.15686275" />
472 <flowRoot
473 xml:space="preserve"
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"
475 id="flowRoot8876"><flowRegion
476 id="flowRegion8878"><use
477 x="0"
478 y="0"
479 xlink:href="#rect4751"
480 id="use8880"
481 width="1052.3622"
482 height="744.09448" /></flowRegion><flowPara
483 id="flowPara8882">StelRenderer</flowPara></flowRoot> </g>
484 <path
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"
486 d="m 230,762.36218 0,-40 210,0"
487 id="path4810"
488 inkscape:connector-curvature="0" />
489 <flowRoot
490 xml:space="preserve"
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"
492 id="flowRoot8055"
493 transform="translate(20,158.1017)"><flowRegion
494 id="flowRegion8057"><use
495 x="0"
496 y="0"
497 xlink:href="#path4810"
498 id="use8059"
499 width="1052.3622"
500 height="744.09448"
501 transform="translate(-10,-154.0392)" /></flowRegion><flowPara
502 id="flowPara8061">constructs</flowPara></flowRoot> <path
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"
504 d="m 860,972.36218 0,-40 -330,0 0,-190 0,0"
505 id="path8283"
506 inkscape:connector-curvature="0"
507 sodipodi:nodetypes="ccccc" />
508 <path
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)"
510 d="m 600,722.36218 200,0 0,40"
511 id="path5668"
512 inkscape:connector-curvature="0" />
513 <text
514 xml:space="preserve"
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"
516 x="710"
517 y="742.36218"
518 id="text5670"
519 sodipodi:linespacing="125%"><tspan
520 sodipodi:role="line"
521 id="tspan5672"
522 x="710"
523 y="742.36218">constructs</tspan></text>
524 <text
525 xml:space="preserve"
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"
527 x="420"
528 y="922.36218"
529 id="text5686"
530 sodipodi:linespacing="125%"><tspan
531 sodipodi:role="line"
532 x="420"
533 y="922.36218"
534 id="tspan5690">constructs</tspan></text>
535 <path
536 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
537 d="m 510,434.09448 0,190 -330,0 0,40"
538 id="path6987"
539 inkscape:connector-curvature="0"
540 transform="translate(0,308.2677)"
541 sodipodi:nodetypes="cccc" />
542 <rect
543 style="fill:#000000;fill-opacity:0.1254902"
544 id="rect8852"
545 width="1050"
546 height="30"
547 x="0"
548 y="482.36218" />
549 <text
550 xml:space="preserve"
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"
552 x="420.00293"
553 y="509.35849"
554 id="text8854"
555 sodipodi:linespacing="125%"
556 transform="scale(0.999993,1.000007)"><tspan
557 sodipodi:role="line"
558 x="420.00293"
559 y="509.35849"
560 id="tspan8858">Renderer API</tspan></text>
561 <g
562 id="g8943"
563 transform="translate(110,20)">
564 <rect
565 y="742.36218"
566 x="20"
567 height="30"
568 width="200"
569 id="rect4659"
570 style="fill:#000000;fill-opacity:0.15686275" />
571 <g
572 id="g8937">
573 <flowRoot
574 xml:space="preserve"
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"
576 id="flowRoot8929"><flowRegion
577 id="flowRegion8931"><use
578 x="0"
579 y="0"
580 xlink:href="#rect4659"
581 id="use8933"
582 width="1052.3622"
583 height="744.09448" /></flowRegion><flowPara
584 id="flowPara8935">StelVertexBuffer</flowPara></flowRoot> </g>
585 </g>
586 <path
587 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
588 d="m 470,274.09448 50,0 0,70"
589 id="path8978"
590 inkscape:connector-curvature="0"
591 transform="translate(0,308.2677)" />
592 <text
593 xml:space="preserve"
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"
595 x="480"
596 y="602.36218"
597 id="text9410"
598 sodipodi:linespacing="125%"><tspan
599 sodipodi:role="line"
600 x="480"
601 y="602.36218"
602 id="tspan9414">uses</tspan></text>
603 <rect
604 style="fill:#ffff00;fill-opacity:0.1254902;stroke:none"
605 id="rect9530"
606 width="1050"
607 height="120"
608 x="0"
609 y="312.36218" />
610 <rect
611 style="fill:none;stroke:#000000;stroke-width:25.90816879000000128;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none"
612 id="rect9418"
613 width="1024.092"
614 height="94.091827"
615 x="12.954084"
616 y="325.31625" />
617 <flowRoot
618 xml:space="preserve"
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"
620 id="flowRoot9544"
621 transform="translate(0,31.796903)"><flowRegion
622 id="flowRegion9546"><use
623 x="0"
624 y="0"
625 xlink:href="#rect9530"
626 id="use9548"
627 width="1052.3622"
628 height="744.09448" /></flowRegion><flowPara
629 id="flowPara9550">User code (plugins, modules, core)</flowPara></flowRoot> <path
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)"
631 d="m 520,124.09448 0,50"
632 id="path9552"
633 inkscape:connector-curvature="0"
634 transform="translate(0,308.2677)" />
635 <text
636 xml:space="preserve"
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"
638 x="530"
639 y="462.36218"
640 id="text10684"
641 sodipodi:linespacing="125%"><tspan
642 sodipodi:role="line"
643 x="530"
644 y="462.36218"
645 id="tspan10688">uses</tspan></text>
646 <text
647 xml:space="preserve"
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"
649 x="540"
650 y="922.36218"
651 id="text10894"
652 sodipodi:linespacing="125%"><tspan
653 sodipodi:role="line"
654 id="tspan10896"
655 x="540"
656 y="922.36218">constructs (if isGLSLSupported() is true)</tspan></text>
657 </g>
658</svg>
0659
=== added file 'doc/renderer-implementation-overview.svg'
--- doc/renderer-implementation-overview.svg 1970-01-01 00:00:00 +0000
+++ doc/renderer-implementation-overview.svg 2012-08-30 16:29:19 +0000
@@ -0,0 +1,835 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 width="297mm"
14 height="210mm"
15 id="svg11050"
16 version="1.1"
17 inkscape:version="0.48.3.1 r9886"
18 sodipodi:docname="implementation-overview-2.svg">
19 <defs
20 id="defs11052">
21 <marker
22 inkscape:stockid="Arrow1Lstart"
23 orient="auto"
24 refY="0.0"
25 refX="0.0"
26 id="Arrow1Lstart"
27 style="overflow:visible">
28 <path
29 id="path4071"
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 "
31 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
32 transform="scale(0.8) translate(12.5,0)" />
33 </marker>
34 <marker
35 inkscape:stockid="Arrow2Lend"
36 orient="auto"
37 refY="0.0"
38 refX="0.0"
39 id="Arrow2Lend"
40 style="overflow:visible;">
41 <path
42 id="path4092"
43 style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
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 "
45 transform="scale(1.1) rotate(180) translate(1,0)" />
46 </marker>
47 <marker
48 inkscape:stockid="Arrow1Mstart"
49 orient="auto"
50 refY="0.0"
51 refX="0.0"
52 id="Arrow1Mstart"
53 style="overflow:visible">
54 <path
55 id="path4077"
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 "
57 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
58 transform="scale(0.4) translate(10,0)" />
59 </marker>
60 <marker
61 inkscape:stockid="Arrow1Lend"
62 orient="auto"
63 refY="0.0"
64 refX="0.0"
65 id="Arrow1Lend"
66 style="overflow:visible;">
67 <path
68 id="path3885"
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 "
70 style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
71 transform="scale(0.8) rotate(180) translate(12.5,0)" />
72 </marker>
73 </defs>
74 <sodipodi:namedview
75 inkscape:document-units="mm"
76 pagecolor="#ffffff"
77 bordercolor="#666666"
78 borderopacity="1.0"
79 inkscape:pageopacity="0.0"
80 inkscape:pageshadow="2"
81 inkscape:zoom="1.2279853"
82 inkscape:cx="380.33865"
83 inkscape:cy="386.971"
84 inkscape:current-layer="layer1"
85 id="namedview11054"
86 showgrid="false"
87 units="mm"
88 inkscape:window-width="2560"
89 inkscape:window-height="1385"
90 inkscape:window-x="-2"
91 inkscape:window-y="-3"
92 inkscape:window-maximized="1">
93 <inkscape:grid
94 type="xygrid"
95 id="grid11083"
96 empspacing="5"
97 visible="true"
98 enabled="true"
99 snapvisiblegridlinesonly="true" />
100 </sodipodi:namedview>
101 <metadata
102 id="metadata11056">
103 <rdf:RDF>
104 <cc:Work
105 rdf:about="">
106 <dc:format>image/svg+xml</dc:format>
107 <dc:type
108 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
109 <dc:title></dc:title>
110 </cc:Work>
111 </rdf:RDF>
112 </metadata>
113 <g
114 inkscape:label="Layer 1"
115 inkscape:groupmode="layer"
116 id="layer1">
117 <g
118 id="g11633"
119 transform="translate(160,270)">
120 <rect
121 y="194.09448"
122 x="250"
123 height="30"
124 width="230"
125 id="rect11595"
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" />
127 <flowRoot
128 id="flowRoot11601"
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"
130 xml:space="preserve"><flowRegion
131 id="flowRegion11603"><use
132 id="use11605"
133 xlink:href="#rect11595"
134 y="0"
135 x="0"
136 width="1052.3622"
137 height="744.09448" /></flowRegion><flowPara
138 id="flowPara11607">StelQGL1Renderer</flowPara></flowRoot> </g>
139 <g
140 id="g11647"
141 transform="translate(30,170)">
142 <rect
143 y="84.094482"
144 x="390"
145 height="30"
146 width="210"
147 id="rect11085"
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" />
149 <flowRoot
150 id="flowRoot11617"
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"
152 xml:space="preserve"><flowRegion
153 id="flowRegion11619"><use
154 id="use11621"
155 xlink:href="#rect11085"
156 y="0"
157 x="0"
158 width="1052.3622"
159 height="744.09448" /></flowRegion><flowPara
160 id="flowPara11623">StelQGLRenderer</flowPara></flowRoot> </g>
161 <g
162 id="g11654"
163 transform="translate(30,0)">
164 <rect
165 y="24.094482"
166 x="410"
167 height="30"
168 width="160"
169 id="rect11599"
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" />
171 <flowRoot
172 id="flowRoot11625"
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"
174 xml:space="preserve"><flowRegion
175 id="flowRegion11627"><use
176 id="use11629"
177 xlink:href="#rect11599"
178 y="0"
179 x="0"
180 width="1052.3622"
181 height="744.09448" /></flowRegion><flowPara
182 id="flowPara11631">StelRenderer</flowPara></flowRoot> <path
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"
184 d="m 520,54.094482 0,199.999998"
185 id="path3108"
186 inkscape:connector-curvature="0"
187 transform="translate(-30,0)" />
188 <path
189 style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
190 d="m 630,274.09448 10,0 0,170 -120,0 0,20"
191 id="path4883"
192 inkscape:connector-curvature="0"
193 transform="translate(-30,0)"
194 sodipodi:nodetypes="ccccc" />
195 </g>
196 <g
197 id="g12057"
198 transform="translate(-580,-200)">
199 <g
200 id="g11923">
201 <rect
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"
203 id="rect11874"
204 width="200"
205 height="30"
206 x="590"
207 y="264.09448" />
208 <g
209 id="g11909">
210 <flowRoot
211 id="flowRoot11901"
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"
213 xml:space="preserve"><flowRegion
214 id="flowRegion11903"><use
215 id="use11905"
216 xlink:href="#rect11874"
217 y="0"
218 x="0"
219 width="1052.3622"
220 height="744.09448" /></flowRegion><flowPara
221 id="flowPara11907">StelGLSLShader</flowPara></flowRoot> </g>
222 </g>
223 </g>
224 <g
225 id="g12066"
226 transform="translate(-580,290)">
227 <rect
228 y="324.09448"
229 x="600"
230 height="30"
231 width="250"
232 id="rect11876"
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" />
234 <flowRoot
235 id="flowRoot11931"
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"
237 xml:space="preserve"><flowRegion
238 id="flowRegion11933"><use
239 id="use11935"
240 xlink:href="#rect11876"
241 y="0"
242 x="0"
243 width="1052.3622"
244 height="744.09448" /></flowRegion><flowPara
245 id="flowPara11937">StelQGLGLSLShader</flowPara></flowRoot> </g>
246 <g
247 id="g12073"
248 transform="translate(-10,-300)">
249 <rect
250 y="364.09448"
251 x="630"
252 height="30"
253 width="190"
254 id="rect11878"
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" />
256 <flowRoot
257 id="flowRoot11939"
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"
259 xml:space="preserve"><flowRegion
260 id="flowRegion11941"><use
261 id="use11943"
262 xlink:href="#rect11878"
263 y="0"
264 x="0"
265 width="1052.3622"
266 height="744.09448" /></flowRegion><flowPara
267 id="flowPara11945">StelIndexBuffer</flowPara></flowRoot> </g>
268 <g
269 id="g12080"
270 transform="translate(30,-100)">
271 <rect
272 y="394.09448"
273 x="620"
274 height="30"
275 width="240"
276 id="rect11880"
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" />
278 <flowRoot
279 id="flowRoot11947"
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"
281 xml:space="preserve"><flowRegion
282 id="flowRegion11949"><use
283 id="use11951"
284 xlink:href="#rect11880"
285 y="0"
286 x="0"
287 width="1052.3622"
288 height="744.09448" /></flowRegion><flowPara
289 id="flowPara11953">StelQGLIndexBuffer</flowPara></flowRoot> </g>
290 <g
291 id="g12087"
292 transform="translate(-400,-360)">
293 <rect
294 y="424.09448"
295 x="630"
296 height="30"
297 width="190"
298 id="rect11882"
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" />
300 <flowRoot
301 id="flowRoot11955"
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"
303 xml:space="preserve"><flowRegion
304 id="flowRegion11957"><use
305 id="use11959"
306 xlink:href="#rect11882"
307 y="0"
308 x="0"
309 width="1052.3622"
310 height="744.09448" /></flowRegion><flowPara
311 id="flowPara11961">StelTextureNew</flowPara></flowRoot> </g>
312 <g
313 id="g12094"
314 transform="translate(-440,-330)">
315 <rect
316 y="474.09448"
317 x="640"
318 height="30"
319 width="240"
320 id="rect11884"
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" />
322 <flowRoot
323 id="flowRoot11963"
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"
325 xml:space="preserve"><flowRegion
326 id="flowRegion11965"><use
327 id="use11967"
328 xlink:href="#rect11884"
329 y="0"
330 x="0"
331 width="1052.3622"
332 height="744.09448" /></flowRegion><flowPara
333 id="flowPara11969">StelTextureBackend</flowPara></flowRoot> </g>
334 <g
335 id="g12101"
336 transform="translate(-570,-250)">
337 <rect
338 y="544.09448"
339 x="680"
340 height="30"
341 width="290"
342 id="rect11886"
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" />
344 <flowRoot
345 id="flowRoot11971"
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"
347 xml:space="preserve"><flowRegion
348 id="flowRegion11973"><use
349 id="use11975"
350 xlink:href="#rect11886"
351 y="0"
352 x="0"
353 width="1052.3622"
354 height="744.09448" /></flowRegion><flowPara
355 id="flowPara11977">StelQGLTextureBackend</flowPara></flowRoot> </g>
356 <g
357 id="g12108"
358 transform="translate(630,-460)">
359 <g
360 id="g12050">
361 <rect
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"
363 id="rect11888"
364 width="200"
365 height="30"
366 x="200"
367 y="524.09448" />
368 <flowRoot
369 xml:space="preserve"
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"
371 id="flowRoot11979"><flowRegion
372 id="flowRegion11981"><use
373 x="0"
374 y="0"
375 xlink:href="#rect11888"
376 id="use11983"
377 width="1052.3622"
378 height="744.09448" /></flowRegion><flowPara
379 id="flowPara11985">StelVertexBuffer</flowPara></flowRoot> </g>
380 </g>
381 <g
382 id="g12043"
383 transform="translate(270,-60)">
384 <rect
385 y="394.09448"
386 x="150"
387 height="30"
388 width="210"
389 id="rect11872"
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" />
391 <flowRoot
392 id="flowRoot11987"
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"
394 xml:space="preserve"><flowRegion
395 id="flowRegion11989"><use
396 id="use11991"
397 xlink:href="#rect11872"
398 y="0"
399 x="0"
400 width="1052.3622"
401 height="744.09448" /></flowRegion><flowPara
402 id="flowPara11993">StelQGLViewport</flowPara></flowRoot> </g>
403 <g
404 id="g12116"
405 transform="translate(510,-430)">
406 <rect
407 y="574.09448"
408 x="220"
409 height="30"
410 width="300"
411 id="rect11893"
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" />
413 <flowRoot
414 id="flowRoot11995"
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"
416 xml:space="preserve"><flowRegion
417 id="flowRegion11997"><use
418 id="use11999"
419 xlink:href="#rect11893"
420 y="0"
421 x="0"
422 width="1052.3622"
423 height="744.09448" /></flowRegion><flowPara
424 id="flowPara12001">StelVertexBufferBackend</flowPara></flowRoot> </g>
425 <g
426 id="g12123"
427 transform="translate(430,-260)">
428 <rect
429 y="614.09448"
430 x="250"
431 height="30"
432 width="350"
433 id="rect11895"
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" />
435 <flowRoot
436 id="flowRoot12003"
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"
438 xml:space="preserve"><flowRegion
439 id="flowRegion12005"><use
440 id="use12007"
441 xlink:href="#rect11895"
442 y="0"
443 x="0"
444 width="1052.3622"
445 height="744.09448" /></flowRegion><flowPara
446 id="flowPara12009">StelQGLVertexBufferBackend</flowPara></flowRoot> </g>
447 <g
448 id="g12130"
449 transform="translate(370,-150)">
450 <rect
451 y="664.09448"
452 x="290"
453 height="30"
454 width="370"
455 id="rect11897"
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" />
457 <flowRoot
458 id="flowRoot12011"
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"
460 xml:space="preserve"><flowRegion
461 id="flowRegion12013"><use
462 id="use12015"
463 xlink:href="#rect11897"
464 y="0"
465 x="0"
466 width="1052.3622"
467 height="744.09448" /></flowRegion><flowPara
468 id="flowPara12017">StelQGL1VertexBufferBackend</flowPara></flowRoot> </g>
469 <g
470 id="g12137"
471 transform="translate(330,-90)">
472 <rect
473 y="704.09448"
474 x="330"
475 height="30"
476 width="370"
477 id="rect11899"
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" />
479 <flowRoot
480 id="flowRoot12019"
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"
482 xml:space="preserve"><flowRegion
483 id="flowRegion12021"><use
484 id="use12023"
485 xlink:href="#rect11899"
486 y="0"
487 x="0"
488 width="1052.3622"
489 height="744.09448" /></flowRegion><flowPara
490 id="flowPara12025">StelQGL2VertexBufferBackend</flowPara></flowRoot> </g>
491 <g
492 id="g12217"
493 transform="translate(0,-50)">
494 <rect
495 y="614.09448"
496 x="410"
497 height="30"
498 width="230"
499 id="rect11597"
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" />
501 <g
502 id="g12211">
503 <flowRoot
504 xml:space="preserve"
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"
506 id="flowRoot12203"><flowRegion
507 id="flowRegion12205"><use
508 x="0"
509 y="0"
510 xlink:href="#rect11597"
511 id="use12207"
512 width="1052.3622"
513 height="744.09448" /></flowRegion><flowPara
514 id="flowPara12209">StelQGL2Renderer</flowPara></flowRoot> </g>
515 </g>
516 <path
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)"
518 d="m 420,274.09448 -10,0 0,180 -10,0 0,90 120,0 0,20"
519 id="path5069"
520 inkscape:connector-curvature="0"
521 sodipodi:nodetypes="ccccccc" />
522 <path
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)"
524 d="m 410,584.09448 -270,0 0,30"
525 id="path5255"
526 inkscape:connector-curvature="0"
527 sodipodi:nodetypes="ccc" />
528 <path
529 style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
530 d="m 310,174.09448 0,120"
531 id="path5445"
532 inkscape:connector-curvature="0" />
533 <path
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)"
535 d="m 900,174.09448 0,180"
536 id="path5635"
537 inkscape:connector-curvature="0"
538 sodipodi:nodetypes="cc" />
539 <path
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)"
541 d="m 900,384.09448 0,130"
542 id="path5823"
543 inkscape:connector-curvature="0"
544 sodipodi:nodetypes="cc" />
545 <path
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)"
547 d="m 1030,374.09448 10,0 0,220 -200,0 0,20"
548 id="path6011"
549 inkscape:connector-curvature="0"
550 sodipodi:nodetypes="ccccc" />
551 <path
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)"
553 d="m 710,94.094482 0,199.999998"
554 id="path6571"
555 inkscape:connector-curvature="0" />
556 <path
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)"
558 d="m 190,94.094482 0,179.999998 -90,0 0,340"
559 id="path6759"
560 inkscape:connector-curvature="0"
561 sodipodi:nodetypes="cccc" />
562 <path
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)"
564 d="m 20,704.09448 60,0"
565 id="path7133"
566 inkscape:connector-curvature="0" />
567 <path
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)"
569 d="m 20,724.09448 60,0"
570 id="path7321"
571 inkscape:connector-curvature="0" />
572 <text
573 xml:space="preserve"
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"
575 x="89.99939"
576 y="707.01392"
577 id="text7509"
578 sodipodi:linespacing="125%"
579 transform="scale(1.0000065,0.99999346)"><tspan
580 sodipodi:role="line"
581 x="89.99939"
582 y="707.01392"
583 id="tspan7513">is parent class of</tspan></text>
584 <text
585 xml:space="preserve"
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"
587 x="90"
588 y="727.00885"
589 id="text7517"
590 sodipodi:linespacing="125%"><tspan
591 sodipodi:role="line"
592 id="tspan7519"
593 x="90"
594 y="727.00885">constructs</tspan></text>
595 <path
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)"
597 d="m 250,704.09448 60,0"
598 id="path7540"
599 inkscape:connector-curvature="0" />
600 <path
601 style="fill:none;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
602 d="m 250,724.09448 60,0"
603 id="path7728"
604 inkscape:connector-curvature="0" />
605 <text
606 xml:space="preserve"
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"
608 x="320"
609 y="707.00928"
610 id="text8288"
611 sodipodi:linespacing="125%"><tspan
612 sodipodi:role="line"
613 x="320"
614 y="707.00928"
615 id="tspan8292">wraps (tight wrapper)</tspan></text>
616 <text
617 xml:space="preserve"
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"
619 x="320"
620 y="727.00885"
621 id="text8296"
622 sodipodi:linespacing="125%"><tspan
623 sodipodi:role="line"
624 id="tspan8298"
625 x="320"
626 y="727.00885">includes (part of functionality separated into a class)</tspan></text>
627 <path
628 style="fill:none;stroke:#0000ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
629 d="m 320,94.094482 0,49.999998"
630 id="path8319"
631 inkscape:connector-curvature="0" />
632 <path
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)"
634 d="m 920,94.094482 0,49.999998"
635 id="path8507"
636 inkscape:connector-curvature="0" />
637 <path
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)"
639 d="m 640,584.09448 190,0 0,30"
640 id="path8695"
641 inkscape:connector-curvature="0" />
642 <path
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)"
644 d="m 640,484.09448 190,0 0,30"
645 id="path9069"
646 inkscape:connector-curvature="0" />
647 <path
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)"
649 d="m 420,264.09448 -40,0 0,30"
650 id="path9259"
651 inkscape:connector-curvature="0" />
652 <path
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)"
654 d="m 630,264.09448 40,0 0,30"
655 id="path9447"
656 inkscape:connector-curvature="0" />
657 <path
658 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
659 d="m 440,44.094482 -120,0 0,20"
660 id="path9635"
661 inkscape:connector-curvature="0" />
662 <path
663 style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
664 d="m 600,44.094482 320,0 0,20"
665 id="path9823"
666 inkscape:connector-curvature="0" />
667 <path
668 style="fill:none;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
669 d="m 520,284.09448 0,50"
670 id="path10767"
671 inkscape:connector-curvature="0" />
672 <path
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"
674 d="m 0,4.0944824 1050,0"
675 id="path12409"
676 inkscape:connector-curvature="0" />
677 <path
678 inkscape:connector-curvature="0"
679 id="path12975"
680 d="m 0,184.09448 1050,0"
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" />
682 <path
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"
684 d="m 0,394.09448 1050,0"
685 id="path12977"
686 inkscape:connector-curvature="0" />
687 <path
688 inkscape:connector-curvature="0"
689 id="path12979"
690 d="m 0,554.09448 1050,0"
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" />
692 <path
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"
694 d="m 0,654.09448 1050,0"
695 id="path12981"
696 inkscape:connector-curvature="0" />
697 <path
698 inkscape:connector-curvature="0"
699 id="path12983"
700 d="m 0,104.09448 1050,0"
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" />
702 <g
703 id="g13106"
704 transform="translate(-10,0.0657492)">
705 <rect
706 y="654.09448"
707 x="10"
708 height="30"
709 width="80"
710 id="rect13005"
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" />
712 <flowRoot
713 id="flowRoot13007"
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"
715 xml:space="preserve"><flowRegion
716 id="flowRegion13009"><use
717 id="use13011"
718 xlink:href="#rect13005"
719 y="0"
720 x="0"
721 width="1052.3622"
722 height="744.09448" /></flowRegion><flowPara
723 id="flowPara13013">Legend</flowPara></flowRoot> </g>
724 <g
725 id="g13099"
726 transform="translate(-10,0.0657492)">
727 <rect
728 y="554.09448"
729 x="10"
730 height="30"
731 width="50"
732 id="rect12997"
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" />
734 <flowRoot
735 id="flowRoot13015"
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"
737 xml:space="preserve"><flowRegion
738 id="flowRegion13017"><use
739 id="use13019"
740 xlink:href="#rect12997"
741 y="0"
742 x="0"
743 width="1052.3622"
744 height="744.09448" /></flowRegion><flowPara
745 id="flowPara13021">GL2</flowPara></flowRoot> </g>
746 <g
747 id="g13092"
748 transform="translate(-10,0)">
749 <rect
750 y="394.09448"
751 x="10"
752 height="30"
753 width="50"
754 id="rect12993"
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" />
756 <flowRoot
757 id="flowRoot13023"
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"
759 xml:space="preserve"><flowRegion
760 id="flowRegion13025"><use
761 id="use13027"
762 xlink:href="#rect12993"
763 y="0"
764 x="0"
765 width="1052.3622"
766 height="744.09448" /></flowRegion><flowPara
767 id="flowPara13029">GL1 </flowPara></flowRoot> </g>
768 <g
769 id="g13085"
770 transform="translate(-10,0.0657492)">
771 <rect
772 y="184.09448"
773 x="10"
774 height="30"
775 width="130"
776 id="rect12999"
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" />
778 <flowRoot
779 id="flowRoot13031"
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"
781 xml:space="preserve"><flowRegion
782 id="flowRegion13033"><use
783 id="use13035"
784 xlink:href="#rect12999"
785 y="0"
786 x="0"
787 width="1052.3622"
788 height="744.09448" /></flowRegion><flowPara
789 id="flowPara13037">GL common</flowPara></flowRoot> </g>
790 <g
791 id="g13078"
792 transform="translate(-10,0.0657492)">
793 <rect
794 y="104.09448"
795 x="10"
796 height="30"
797 width="180"
798 id="rect13001"
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" />
800 <flowRoot
801 id="flowRoot13039"
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"
803 xml:space="preserve"><flowRegion
804 id="flowRegion13041"><use
805 id="use13043"
806 xlink:href="#rect13001"
807 y="0"
808 x="0"
809 width="1052.3622"
810 height="744.09448" /></flowRegion><flowPara
811 id="flowPara13045">Abstract backend</flowPara></flowRoot> </g>
812 <g
813 id="g13071"
814 transform="translate(-10,0.0657492)">
815 <rect
816 y="4.0944824"
817 x="10"
818 height="30"
819 width="40"
820 id="rect13003"
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" />
822 <flowRoot
823 id="flowRoot13047"
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"
825 xml:space="preserve"><flowRegion
826 id="flowRegion13049"><use
827 id="use13051"
828 xlink:href="#rect13003"
829 y="0"
830 x="0"
831 width="1052.3622"
832 height="744.09448" /></flowRegion><flowPara
833 id="flowPara13053">API</flowPara></flowRoot> </g>
834 </g>
835</svg>
0836
=== added file 'doc/renderer.doxygen'
--- doc/renderer.doxygen 1970-01-01 00:00:00 +0000
+++ doc/renderer.doxygen 2012-08-30 16:29:19 +0000
@@ -0,0 +1,421 @@
1/*
2 * Stellarium
3 * Copyright (c) 2012 Ferdinand Majerech
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19
20/*!
21
22@page renderer Renderer
23
24
25
26@section introduction Introduction
27
28During Google Summer of Code 2012, graphics code was separated into a subsystem
29called Renderer (<code>src/core/renderer</code>).
30
31Renderer is composed of interface classes abstracting away low-level graphics
32work, and backend classes either derived from or used by the interface classes.
33
34This allows to change underlying implementation without rewriting drawing code.
35For example, we now have two sets of backend classes: GL1 and GL2. Which one
36us used is decided at startup without affecting drawing code.
37
38
39
40@section outline API outline
41
42@image html renderer-api-overview.png
43
44@subsection stelrenderer StelRenderer
45
46The central class of the Renderer subsystem is StelRenderer. It constructs
47other graphics classes (textures, vertex and index buffers, etc.) and sets
48graphics state (global color, depth test mode, etc.). It also handles drawing.
49There is always only one StelRenderer instance, though it's not a singleton (no
50global access). While the graphics classes are constructed by StelRenderer,
51it's the caller's responsibility to delete them. Also, they must be destroyed
52before StelRenderer (which is destroyed right before the program exits).
53
54For example, to construct a texture (StelTextureNew), call
55StelRenderer::createTexture(), to construct a vertex buffer (StelVertexBuffer),
56call StelRenderer::createVertexBuffer(), and so on.
57
58Handling construction of graphics classes in StelRenderer allows different
59backends (e.g. GL1, GL2) to construct their own implementations.
60
61@subsection stelvertexbuffer StelVertexBuffer
62
63StelVertexBuffer is a templated array-like container constructed by
64StelRenderer that stores vertices. A vertex is a struct specified by user
65through the template argument; it has to fulfill some requirements (see
66StelVertexBuffer documentation), e.g. it can't have data members that don't
67make sense in a vertex. Various vertex types are possible; vertex type
68specifies what attributes to use (position, texcoord, color, normal) as well as
69their dimensions.
70
71Before drawing, a vertex buffer must be locked, allowing things like uploading
72vertices to the GPU. Vertex buffers are drawn using StelRenderer. If possible,
73they should be filled once, locked, and never unlocked again. Backend might
74then move the vertex data to the GPU, greatly improving performance even if
75some extra vertices are drawn.
76
77@subsection stelindexbuffer StelIndexBuffer
78
79Index buffers can be used with vertex buffers to specify which vertices to
80draw. For example, a vertex buffer containing a 2D grid might be used with
81many index buffers (one draw per index buffer), each specifying a row of the
82grid as a triangle strip. StelIndexBuffer API is similar to StelVertexBuffer,
83but it's not templated. There are 2 index types (specified at construction);
8416bit and 32bit. 16bit is faster but only usable with with up to 65535
85vertices. Again, the buffer must be locked before drawing, and it's best to
86keep it locked for a long time without modifications.
87
88@subsection steltexturenew StelTextureNew
89
90Textures are bound to texture units to be used in following draws. Textures
91are used only with vertex types that have texture coordinates. By default, only
92the texture bound to the first texture unit is drawn, interpreted as color.
93Shaders can also use other texture units and interpret the texture differently
94(as normals, specularity, etc.).
95
96StelTextureNew is the interface class for textures. StelRenderer never fails to
97construct a texture, but the new texture might be in various states. If loading
98fails, the texture is in "Error" state, and, when bound, a placeholder texture
99is used instead. Depending on creation parameters, a texture might still be
100loading in background when constructed. It might even wait to start loading
101until the first time it's bound. In this case the placeholder is used until
102loading finishes.
103
104@subsection stelglslshader StelGLSLShader
105
106Shaders are programs running on the GPU that can override default graphics
107functionality. They are usually used for advanced effects such as normal
108mapping, shadows, and so on. Some backends (GL2) might draw everything with
109shaders internally, but default graphics functionality is unchanged. Graphics
110APIs have different shader languages; for OpenGL, GLSL is used. There is no
111simple way to abstract this behind a backend-independent interface, so instead
112of a generic "Shader" class, GLSL is used as an optional StelRenderer feature
113that might not be supported by a backend. If ever needed, support for HLSL
114(used by Direct3D) might be implemented in a similar way.
115
116StelGLSLShader is a GLSL shader program class constructed by StelRenderer. The
117program is composed of vertex and fragment shaders, equivalent to .c files in
118a C program. There must be at least one vertex and one fragment shader. There
119might be more, which is useful for more complex shaders. There can only be one
120main() function for vertex shader and one for fragment shader. Shaders can be
121named, and enabled or disabled by name, allowing for exchangeable modules.
122
123Vertex shaders run once per vertex while fragment shaders run at least once per
124pixel. Keep this in mind; a graphics scene might have 100000 vertices but it
125will likely have many more pixels, e.g. 1920x1080 is roughly 2000000 pixels.
126
127Code using GLSL must be optional as the renderer might not support it. The code
128must first ask StelRenderer if GLSL is supported, if so, use the GLSL-based
129code, and otherwise use a fallback implemented without shaders. For
130non-essential effects, like shadows, disabling the effect without a fallback
131might be enough.
132
133
134@subsection extensions Renderer extension classes
135
136Some graphics functionality is commonly used but can be implemented using
137existing Renderer API. Unless heavy optimizations are needed , this
138functionality should be built on top of other Renderer classes. I call this
139"extensions". The advantage of extensions is that they only depend on the
140public Renderer API, reducing work needed to be done in each backend.
141
142An example is sphere drawing. While StelRenderer could have a "drawSphere"
143member function, adding such functions might result in a difficult to implement
144API. So instead we have a class that builds sphere vertex/index buffers using
145existing API.
146
147Current extension classes are StelGeometryBuilder and StelCircleArcRenderer.
148The former builds vertex buffers with various geometry to be drawn. The latter
149draws circle arcs, used to display various lines in the sky with correct
150curvature.
151
152
153@section api_philosophy API design philosophy
154
155Renderer is designed with five priorities, in this order:
156
157<ol>
158<li> ease of use (code using Renderer) </li>
159<li> portability (ease of backend implementation) </li>
160<li> maintainability (avoid bug creep, avoid API breaking) </li>
161<li> speed (FPS) </li>
162<li> power (features) </li>
163</ol>
164
165This is not absolute. Portability can trump ease of use; otherwise we'd use
166a plain GL2+ wrapper. Same is true for speed; otherwise we'd have an
167immediate mode style API.
168
169Ease of use is rather obvious. Drawing code should be as simple as possible.
170While some graphics knowledge is required, we should not require mastery of
171OpenGL.
172
173Portability matters as Stellarium runs not only on the PC OS's, but also on
174mobile platforms and maybe even some embedded systems. Getting a basic backend
175for a new platform to work should be a straightforward, one-week task.
176Eventually, Stellarium will need backends for OpenGL 4+ and OpenGL ES 3.
177A backend should not need to implement hundreds of functions.
178
179Maintainability is close to portability. To be portable, an API should be
180simple, and a simple API will also be more maintainable. Features should not be
181added because they are cool; they should be added when needed. They should be
182well documented, both API and implementation. Documentation should include code
183examples if possible, and be updated immediately when a feature changes, not
184"when time allows it". Tests should be added when possible; we still need to
185improve this. Code should be simple first. Unless it absolutely needs to be
186powerful and/or optimized, it should be easy to read. 100-line functions are
187bad. 1000-line files are unacceptable.
188
189Speed is important as Stellarium is a real-time app. It's not Crysis, so speed
190isn't the main priority, but it's not Crysis, so it shouldn't require high-end
191hardware. Old GPUs should work, as should modern integrated GPUs. With
192Stellarium's graphics it's viable to support mainstream hardware up to 10 years
193old. That said, speed often conflicts with maintainability. Optimization should
194only be done based on careful profiling and measurable gains. Adding 1000
195lines to get 0.1 FPS will result in bugs and maybe even slowdown as code rots
196and hardware changes.
197
198The API must be powerful to draw everything Stellarium needs. However, we
199don't compete in the demoscene; if not adding a feature Stellarium does not
200need will make the API simpler or more portable, we shouldn't add it. For
201example, StelRenderer depth buffer functionality doesn't match OpenGL; it only
202covers the cases we use (with a mechanism to add more if needed). This
203disallows creating some effects possible with OpenGL, but it is simpler, and
204much easier to emulate on a backend that does not support these particular
205OpenGL features.
206
207
208@section implementation Implementation
209
210@subsection impl_overview Overview
211
212@image html renderer-implementation-overview.png
213
214Currently there are two Renderer backends: QGL1 and QGL2, based on OpenGL 1.1
215and OpenGL 2.1 respectively. They use Qt's QGL classes for things like context
216management and texture upload. Code common for both versions, like some GL
217state, textures, viewport and vertex array manipulation, is shared between
218these, while code such as fixed-function/shaders and drawing is separate.
219
220The QGL1 backend is designed for compatibility with old hardware; it doesn't
221usually use new features brought by extensions or later GL 1.x versions. It
222requires GL 1.1 for vertex array support. After Qt5 removes GL 1.x support this
223backend should still work as GL 2.x is backwards compatible with GL 1.x; but
224only on drivers that support GL 2.x . It provides better compatibility/speed
225for older GPUs and buggy drivers.
226
227The QGL2 backend should use GL 2.1 to its fullest, and might even have
228optionally use features from GL 3.x and extensions, but never require them. An
229example is float texture support, which requires GL 3.0 . It's required for
230advanced effects such as shadows, and obviously for any GLSL based effects.
231It's also likely to be slower than the QGL1 backend.
232
233
234@subsection viewport StelQGLViewport
235
236Manages the viewport. It handles capturing the screen to a texture, screenshots
237and so on. If FBOs are supported and not disabled, custom double buffering
238logic is used allowing to interrupt a frame in progress to increase
239responsiveness, finishing the drawing later.
240
241@subsection vertexbufferbackend StelVertexBufferBackend and implementations
242
243In C++, a templated function can never be virtual; so
244<strong>createVertexBuffer()</strong> functions of StelRenderer implementations
245can't construct objects derived from
246<strong>StelVertexBuffer<SomeVertexType></strong> . To work around this
247limitation without sacrificing its safe templated API StelVertexBuffer wraps
248a non-templated class, StelVertexBufferBackend, from which backend vertex
249buffers are derived. StelRenderer has an internal virtual function that allows
250its implementations to return a custom vertex buffer backend type.
251
252StelVertexBufferBackend doesn't know the vertex type directly; it uses metadata
253from the VERTEX_ATTRIBUTES macro in the vertex type describing its layout and
254vertex attributes (data members).
255
256Currently, only one vertex buffer backend exists;
257StelQGLArrayVertexBufferBackend, based on vertex arrays where each vertex
258attribute is in a separate array. GL version specific backends
259StelQGL1ArrayVertexBufferBackend and StelQGL2ArrayVertexBufferBackend, used by
260StelQGL1Renderer and StelQGL2Renderer respectively, derive from it, specifying
261drawing logic (fixed function for QGL1 and shaders for QGL2).
262
263@subsection texturebackend StelTextureBackend and implementations
264
265Like StelVertexBuffer, StelTextureNew wraps a backend class;
266StelTextureBackend, from which the each backend derives. The reason is not
267templating; the API class and backend are separate so the former is owned by
268user code, while the latter might be owned by the renderer backend. This
269allows for features like texture caching; deleting the frontend decreases
270a reference count of the backend in cache. Caching is used internally to avoid
271loading the same texture twice. If creating a texture from a previously loaded
272file we can return a cached texture instead, wrapping the same
273StelTextureBackend in a different StelTextureNew. Caching is not mandatory, so
274there might be backends that don't use it.
275
276The only backend right now is StelQGLTextureBackend, used both for GL1 and GL2
277(it's managed by StelQGLRenderer). It uses Qt functions to load textures with
278some exceptions like loading textures from raw data, when plain GL texture
279functions are used.
280
281@subsection qglglslshader StelQGLGLSLShader
282
283This is the shader backend used by StelQGL2Renderer. It uses QGL to manage
284shaders. All shaders added are stored in compiled form. When
285<strong>build()</strong> is called, enabled shaders are linked into a shader
286program, but the program is only bound inside StelQGL2Renderer's draw code.
287Linked programs are cached so we never link the same program twice. Any
288uniforms set are stored in temporary storage and only passed when the
289underlying program is bound.
290
291@subsection rendererbackend StelQGLRenderer, StelQGL1Renderer, StelQGL2Renderer
292
293The GL1 and GL2 backends share much code; this code is in the StelQGLRenderer
294class. This includes text and rectangle drawing, texture management,
295viewport (StelQGLViewport), and so on.
296
297StelQGL1Renderer contains GL1 specific code. This is mostly pre-draw setup
298(drawing is done by StelQGL1ArrayVertexBufferBackend) and various GL1 specific
299state.
300
301StelQGL2Renderer is more complicated. Along with functionality equivalent to
302StelQGL1Renderer, it also manages shaders. Especially important is swapping of
303default shaders, which emulate a simplified fixed function pipeline with
304specific vertex formats, and custom shaders specified by the user by binding
305a StelGLSLShader.
306
307
308@section implementation_philosophy Implementation philosophy
309
310Implementation is usually secondary to the API (ease of use); it needs to work
311within its constraints. It's not acceptable to break the API just to make
312implementation a bit more convenient. The main priorities of the implementation
313are maintainability and speed. Portability is not much of a concern - we might
314e.g. have a Windows-only Direct3D implementation, as long as we have
315implementations to cover other platforms. Power and ease of use are determined
316by the API.
317
318Maintainability is often in direct conflict with speed; highly optimized code
319is hard to maintain. There is one way we can deal with this; for any part of
320the subsystem, a simple and readable, not necessarily fast, implementation
321should exist. This can then be used as a reference when writing other
322implementations (for different platforms or for speed) and for testing.
323StelQGLArrayVertexBufferBackend, StelQGLIndexBuffer, StelQGLGLSLShader and
324StelQGLTextureBackend can be considered such references, but they could
325probably be simpler if they should serve exclusively this purpose.
326
327We can also have implementations designed for speed, optimized as much as
328possible. For example, a vertex buffer implementation could internally switch
329between vertex arrays and VBOs based on last time the buffer was updated.
330Complexity is acceptable here as long as it brings speed gains.
331
332The advantage of this approach is that we always have an implementation that
333works and is maintainable. Optimized implementations might be thrown out and
334replaced if maintainability is a problem, but we still have something that
335works.
336
337
338@section usage_patterns Why not singleton & Usage patterns
339
340Unlike other core services, StelRenderer is not directly accessible through
341StelCore, nor is there any way to access it globally. Only one StelRenderer
342exists, but it's not a singleton. Drawing code usually gets a StelRenderer
343through a parameter. This has more to do with maintainability than ease of
344use; a globally accessible StelRenderer might be easier to use, removing need
345for lazy initialization.
346
347Initialization and destruction of StelRenderer backend happens at well defined
348times and when a StelRenderer pointer is passed to drawing code, it's
349guaranteed to be initialized. Graphics accessing a StelRenderer globally might
350end up using an uninitialized StelRenderer, or, if it was a lazily initialized
351singleton, trigger premature initialization.
352
353In future Renderer could be enhanced to allow switching backends
354post-initialization, even for single frames (e.g. export to document formats).
355This would be more complicated with a global renderer, although the main
356problem here is different - allowing API objects constructed by one renderer to
357work with another.
358
359Finally, the main reason why StelRenderer is not globally accessible is making
360any future (however distant) major rewrites less complicated. Refactoring
361previous drawing code was made difficult by circular dependencies of various
362parts of code; not in the "include" sense, but in "classes using each other"
363sense. There was no clear point to start - many things had to be refactored
364simultaneously. Removing global accessibility makes dependencies more similar
365to a directed acyclic graph and there are clear points to start changes.
366
367The disadvantage of a non-global StelRenderer is that we can't access it when
368initializing drawing code (unless it's explicitly passed). I.e. we can't load
369our textures when a class using StelRenderer is constructed. However, we don't
370need to initialize at construction; we only need the drawing objects to be
371ready before drawing. We can initialize them lazily. One way to do this is
372initializing drawing data in a function called during the first draw,setting an
373"initialized" flag, and only letting destructor destroy this data if this flag
374is set. This is less convenient, but it might actually improve performance as
375we only initialize drawing data once we need it.
376
377
378@section future Future development
379
380
381The Renderer API is quite complete and should be sufficient for some time;
382especially the shader support can be used for various new graphics features.
383However, backend performance, especially the GL2 backend, leaves something to
384be desired. Also, now that all drawing is separated, new debugging and
385profiling features are possible.
386
387One near-term goal is collection of statistics about the backend's operation.
388We should be able to collect data about things such as the number of calls of
389specific functions per frame, triangles/vertices/indices per frame, underlying
390OpenGL draw calls, state changes, etc. . In combination with profiling data
391this should make finding bottlenecks easier. More importantly, it should help
392find inefficiencies in user code, such as plugins, and help plugin authors
393improve performance of their code.
394
395Currently, Renderer backend classes are implemented in a mostly straightforward
396way. We should be able to improve performance by optimizing or adding
397alternative high-performance backends.
398
399A major optimization would be a VBO (vertex buffer object) vertex buffer
400backend. With VBOs, vertex data is in GPU memory, freeing the bus. This can
401result in massive performance increase, even an order of magnitude. As the data
402must be stored on the GPU instead of being permanently re-uploaded, this is
403only useful if we have a lot of graphics data that never changes. Otherwise
404performance is likely to drop instead of increasing. Right now VBOs could help
405with things like planets and models, but the majority of drawing is done by
406StelSkyDrawer (point sources, mostly stars), where vertex data is regenerated
407every frame. Rewriting some StelSkyDrawer users, especially
408BigStarCatalogExtension::ZoneArray, to use static vertex buffers initialized
409once and never modified, would result in more vertices per frame, but it might
410make VBOs viable which would likely bring massive performance boost. Other
411work currently done on the CPU, such as vertex projection, would also have to
412be done on GPU (this is already done for stereographic projection).
413
414A non-essential, but useful future addition would be the ability to switch
415backends at any time. This would require all StelRenderer constructed classes
416to have separate frontend and backend objects, as StelVertexBuffer and
417StelTextureNew already have, and the frontends would need to store all data
418needed to reconstruct the backends - probably duplicating a lot of data. If
419a StelRenderer backend would be passed an object constructed by a different
420backend, it would delete the object's backend and replace it with its own.
421*/
0422
=== modified file 'doc/scripting.doxygen'
--- doc/scripting.doxygen 2012-03-16 22:11:30 +0000
+++ doc/scripting.doxygen 2012-08-30 16:29:19 +0000
@@ -29,7 +29,7 @@
29This makes it possible to write small programs within Stellarium to produce 29This makes it possible to write small programs within Stellarium to produce
30presentations, set up custom configurations, and to automate repetitive 30presentations, set up custom configurations, and to automate repetitive
31tasks. Prior to version 0.10.0, Stellarium used a different scripting engine 31tasks. Prior to version 0.10.0, Stellarium used a different scripting engine
32called @ref StratoScript.32called @ref stratoscript.
3333
34The core scripting language is34The core scripting language is
35<a href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a>, giving users35<a href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a>, giving users
@@ -38,7 +38,7 @@
38is done via a collection of objects which represent components of Stellarium38is done via a collection of objects which represent components of Stellarium
39itself. See @ref scripting_api for more details.39itself. See @ref scripting_api for more details.
4040
41@section scratoscript StratoScript41@section stratoscript StratoScript
4242
43Prior to version 0.10.0, Stellarium had a simple scripting engine, known as 43Prior to version 0.10.0, Stellarium had a simple scripting engine, known as
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
4545
=== modified file 'doc/stellarium-architecture.svg'
--- doc/stellarium-architecture.svg 2010-04-18 21:16:11 +0000
+++ doc/stellarium-architecture.svg 2012-08-30 16:29:19 +0000
@@ -13,7 +13,7 @@
13 height="744.09448"13 height="744.09448"
14 id="svg2"14 id="svg2"
15 sodipodi:version="0.32"15 sodipodi:version="0.32"
16 inkscape:version="0.47pre4 r22446"16 inkscape:version="0.48.3.1 r9886"
17 version="1.0"17 version="1.0"
18 sodipodi:docname="stellarium-architecture.svg"18 sodipodi:docname="stellarium-architecture.svg"
19 inkscape:output_extension="org.inkscape.output.svg.inkscape"19 inkscape:output_extension="org.inkscape.output.svg.inkscape"
@@ -135,12 +135,12 @@
135 inkscape:current-layer="layer1"135 inkscape:current-layer="layer1"
136 width="1052.3622px"136 width="1052.3622px"
137 height="744.09448px"137 height="744.09448px"
138 inkscape:window-width="1274"138 inkscape:window-width="2560"
139 inkscape:window-height="751"139 inkscape:window-height="1385"
140 inkscape:window-x="0"140 inkscape:window-x="-2"
141 inkscape:window-y="0"141 inkscape:window-y="-3"
142 showgrid="false"142 showgrid="false"
143 inkscape:window-maximized="0" />143 inkscape:window-maximized="1" />
144 <metadata144 <metadata
145 id="metadata7">145 id="metadata7">
146 <rdf:RDF>146 <rdf:RDF>
@@ -149,7 +149,7 @@
149 <dc:format>image/svg+xml</dc:format>149 <dc:format>image/svg+xml</dc:format>
150 <dc:type150 <dc:type
151 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />151 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
152 <dc:title></dc:title>152 <dc:title />
153 </cc:Work>153 </cc:Work>
154 </rdf:RDF>154 </rdf:RDF>
155 </metadata>155 </metadata>
@@ -189,66 +189,61 @@
189 sodipodi:role="line"189 sodipodi:role="line"
190 x="77.209961"190 x="77.209961"
191 y="454.34995"191 y="454.34995"
192 id="tspan3142"192 id="tspan3144"
193 style="font-size:16px">StelTextureMgr</tspan><tspan193 style="font-size:16px">StelRenderer</tspan><tspan
194 sodipodi:role="line"194 sodipodi:role="line"
195 x="77.209961"195 x="77.209961"
196 y="474.34995"196 y="474.34995"
197 id="tspan3144"
198 style="font-size:16px">StelFontMgr</tspan><tspan
199 sodipodi:role="line"
200 x="77.209961"
201 y="494.34995"
202 id="tspan3146"197 id="tspan3146"
203 style="font-size:16px">StelFileMgr</tspan><tspan198 style="font-size:16px">StelFileMgr</tspan><tspan
204 sodipodi:role="line"199 sodipodi:role="line"
205 x="77.209961"200 x="77.209961"
206 y="514.34998"201 y="494.34995"
207 id="tspan3148"202 id="tspan3148"
208 style="font-size:16px">StelLocaleMgr</tspan><tspan203 style="font-size:16px">StelLocaleMgr</tspan><tspan
209 sodipodi:role="line"204 sodipodi:role="line"
210 x="77.209961"205 x="77.209961"
206 y="514.34998"
207 style="font-size:16px"
208 id="tspan10494">StelAudioMgr</tspan><tspan
209 sodipodi:role="line"
210 x="77.209961"
211 y="534.34998"211 y="534.34998"
212 style="font-size:16px"212 style="font-size:16px"
213 id="tspan10494">StelAudioMgr</tspan><tspan213 id="tspan10498">StelSkyLayerMgr</tspan><tspan
214 sodipodi:role="line"214 sodipodi:role="line"
215 x="77.209961"215 x="77.209961"
216 y="554.34998"216 y="554.34998"
217 style="font-size:16px"217 style="font-size:16px"
218 id="tspan10498">StelSkyImageMgr</tspan><tspan218 id="tspan10486">StelModuleMgr</tspan><tspan
219 sodipodi:role="line"219 sodipodi:role="line"
220 x="77.209961"220 x="77.209961"
221 y="574.34998"221 y="574.34998"
222 style="font-size:16px"
223 id="tspan10486">StelModuleMgr</tspan><tspan
224 sodipodi:role="line"
225 x="77.209961"
226 y="594.34998"
227 id="tspan3152"222 id="tspan3152"
228 style="font-size:16px">StelSkyCultureMgr</tspan><tspan223 style="font-size:16px">StelSkyCultureMgr</tspan><tspan
229 sodipodi:role="line"224 sodipodi:role="line"
230 x="77.209961"225 x="77.209961"
226 y="594.34998"
227 style="font-size:16px"
228 id="tspan11513">StelObjectMgr</tspan><tspan
229 sodipodi:role="line"
230 x="77.209961"
231 y="614.34998"231 y="614.34998"
232 style="font-size:16px"232 style="font-size:16px"
233 id="tspan11513">StelObjectMgr</tspan><tspan233 id="tspan2609">StelDownloadMgr</tspan><tspan
234 sodipodi:role="line"234 sodipodi:role="line"
235 x="77.209961"235 x="77.209961"
236 y="634.34998"236 y="634.34998"
237 style="font-size:16px"237 style="font-size:16px"
238 id="tspan2609">StelDownloadMgr</tspan><tspan238 id="tspan2611">StelLocationMgr</tspan><tspan
239 sodipodi:role="line"239 sodipodi:role="line"
240 x="77.209961"240 x="77.209961"
241 y="654.34998"241 y="654.34998"
242 style="font-size:16px"242 style="font-size:16px"
243 id="tspan2611">StelLocationMgr</tspan><tspan243 id="tspan2613">...</tspan><tspan
244 sodipodi:role="line"244 sodipodi:role="line"
245 x="77.209961"245 x="77.209961"
246 y="674.34998"246 y="674.34998"
247 style="font-size:16px"
248 id="tspan2613">...</tspan><tspan
249 sodipodi:role="line"
250 x="77.209961"
251 y="694.34998"
252 style="font-size:18px"247 style="font-size:18px"
253 id="tspan6340" /></text>248 id="tspan6340" /></text>
254 <rect249 <rect
255250
=== modified file 'plugins/AngleMeasure/src/AngleMeasure.cpp'
--- plugins/AngleMeasure/src/AngleMeasure.cpp 2012-08-08 09:44:23 +0000
+++ plugins/AngleMeasure/src/AngleMeasure.cpp 2012-08-30 16:29:19 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelFileMgr.hpp"22#include "StelFileMgr.hpp"
@@ -26,10 +25,10 @@
26#include "StelGui.hpp"25#include "StelGui.hpp"
27#include "StelGuiItems.hpp"26#include "StelGuiItems.hpp"
28#include "StelIniParser.hpp"27#include "StelIniParser.hpp"
29#include "StelVertexArray.hpp"
30#include "AngleMeasure.hpp"28#include "AngleMeasure.hpp"
29#include "renderer/StelCircleArcRenderer.hpp"
30#include "renderer/StelRenderer.hpp"
3131
32#include <QtOpenGL>
33#include <QDebug>32#include <QDebug>
34#include <QTimer>33#include <QTimer>
35#include <QAction>34#include <QAction>
@@ -152,63 +151,55 @@
152}151}
153152
154//! Draw any parts on the screen which are for our module153//! Draw any parts on the screen which are for our module
155void AngleMeasure::draw(StelCore* core)154void AngleMeasure::draw(StelCore* core, StelRenderer* renderer)
156{155{
157 if (lineVisible.getInterstate() < 0.000001f && messageFader.getInterstate() < 0.000001f)156 if (lineVisible.getInterstate() < 0.000001f && messageFader.getInterstate() < 0.000001f)
158 return;157 return;
159 158
160 const StelProjectorP prj = core->getProjection(StelCore::FrameEquinoxEqu);159 const StelProjectorP prj = core->getProjection(StelCore::FrameEquinoxEqu);
161 StelPainter painter(prj);160
162 painter.setFont(font);161 renderer->setFont(font);
163 Vec3f tColor, lColor;162
164 if (StelApp::getInstance().getVisionModeNight())163 const bool night = StelApp::getInstance().getVisionModeNight();
165 {164 const Vec3f tColor = night ? StelUtils::getNightColor(textColor) : lineColor;
166 tColor = StelUtils::getNightColor(textColor);165 const Vec3f lColor = night ? StelUtils::getNightColor(lineColor) : lineColor;
167 lColor = StelUtils::getNightColor(lineColor);
168 }
169 else
170 {
171 tColor = textColor;
172 lColor = lineColor;
173 }
174166
175 if (lineVisible.getInterstate() > 0.000001f)167 if (lineVisible.getInterstate() > 0.000001f)
176 {168 {
177 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);169 renderer->setBlendMode(BlendMode_Alpha);
178 glEnable(GL_BLEND);
179 glEnable(GL_TEXTURE_2D);
180 170
181 Vec3d xy;171 Vec3d xy;
182 if (prj->project(perp1EndPoint,xy))172 if (prj->project(perp1EndPoint,xy))
183 {173 {
184 painter.setColor(tColor[0], tColor[1], tColor[2], lineVisible.getInterstate());174 renderer->setGlobalColor(tColor[0], tColor[1], tColor[2],
185 painter.drawText(xy[0], xy[1], angleText, 0, 15, 15);175 lineVisible.getInterstate());
176 renderer->drawText(TextParams(xy[0], xy[1], angleText).shift(15, 15));
186 }177 }
187178
188 glDisable(GL_TEXTURE_2D);179 renderer->setGlobalColor(lColor[0], lColor[1], lColor[2],
189 glEnable(GL_LINE_SMOOTH);180 lineVisible.getInterstate());
190 glEnable(GL_BLEND);181
191 182 // main line is a great circle
192 // main line is a great circle 183 StelCircleArcRenderer circleArcRenderer(renderer, prj);
193 painter.setColor(lColor[0], lColor[1], lColor[2], lineVisible.getInterstate());184 circleArcRenderer.drawGreatCircleArc(startPoint, endPoint);
194 painter.drawGreatCircleArc(startPoint, endPoint, NULL);
195185
196 // End lines186 // End lines
197 painter.drawGreatCircleArc(perp1StartPoint, perp1EndPoint, NULL);187 circleArcRenderer.drawGreatCircleArc(perp1StartPoint, perp1EndPoint);
198 painter.drawGreatCircleArc(perp2StartPoint, perp2EndPoint, NULL);188 circleArcRenderer.drawGreatCircleArc(perp2StartPoint, perp2EndPoint);
199 }189 }
200190
201 if (messageFader.getInterstate() > 0.000001f)191 if (messageFader.getInterstate() > 0.000001f)
202 {192 {
203 painter.setColor(tColor[0], tColor[1], tColor[2], messageFader.getInterstate());193 renderer->setGlobalColor(tColor[0], tColor[1], tColor[2],
194 messageFader.getInterstate());
204 int x = 83;195 int x = 83;
205 int y = 120;196 int y = 120;
206 int ls = painter.getFontMetrics().lineSpacing();197 const int ls = QFontMetrics(font).lineSpacing();
207 painter.drawText(x, y, messageEnabled);198 renderer->drawText(TextParams(x, y, messageEnabled));
208 y -= ls;199 y -= ls;
209 painter.drawText(x, y, messageLeftButton);200 renderer->drawText(TextParams(x, y, messageLeftButton));
210 y -= ls;201 y -= ls;
211 painter.drawText(x, y, messageRightButton);202 renderer->drawText(TextParams(x, y, messageRightButton));
212 }203 }
213}204}
214205
215206
=== modified file 'plugins/AngleMeasure/src/AngleMeasure.hpp'
--- plugins/AngleMeasure/src/AngleMeasure.hpp 2012-01-11 10:50:37 +0000
+++ plugins/AngleMeasure/src/AngleMeasure.hpp 2012-08-30 16:29:19 +0000
@@ -40,7 +40,7 @@
40 // Methods defined in the StelModule class40 // Methods defined in the StelModule class
41 virtual void init();41 virtual void init();
42 virtual void update(double deltaTime);42 virtual void update(double deltaTime);
43 virtual void draw(StelCore* core);43 virtual void draw(StelCore* core, class StelRenderer* renderer);
44 virtual double getCallOrder(StelModuleActionName actionName) const;44 virtual double getCallOrder(StelModuleActionName actionName) const;
45 virtual void handleKeys(class QKeyEvent* event);45 virtual void handleKeys(class QKeyEvent* event);
46 virtual void handleMouseClicks(class QMouseEvent* event);46 virtual void handleMouseClicks(class QMouseEvent* event);
4747
=== modified file 'plugins/CompassMarks/src/CompassMarks.cpp'
--- plugins/CompassMarks/src/CompassMarks.cpp 2012-08-26 16:11:26 +0000
+++ plugins/CompassMarks/src/CompassMarks.cpp 2012-08-30 16:29:19 +0000
@@ -18,7 +18,6 @@
1818
19#include "VecMath.hpp"19#include "VecMath.hpp"
20#include "StelProjector.hpp"20#include "StelProjector.hpp"
21#include "StelPainter.hpp"
22#include "StelApp.hpp"21#include "StelApp.hpp"
23#include "StelCore.hpp"22#include "StelCore.hpp"
24#include "StelLocaleMgr.hpp"23#include "StelLocaleMgr.hpp"
@@ -30,8 +29,9 @@
30#include "StelGui.hpp"29#include "StelGui.hpp"
31#include "StelGuiItems.hpp"30#include "StelGuiItems.hpp"
32#include "StelIniParser.hpp"31#include "StelIniParser.hpp"
32#include "renderer/StelCircleArcRenderer.hpp"
33#include "renderer/StelRenderer.hpp"
3334
34#include <QtOpenGL>
35#include <QAction>35#include <QAction>
36#include <QDebug>36#include <QDebug>
37#include <QPixmap>37#include <QPixmap>
@@ -146,27 +146,23 @@
146}146}
147147
148//! Draw any parts on the screen which are for our module148//! Draw any parts on the screen which are for our module
149void CompassMarks::draw(StelCore* core)149void CompassMarks::draw(StelCore* core, StelRenderer* renderer)
150{150{
151 if (markFader.getInterstate() <= 0.0) { return; }151 if (markFader.getInterstate() <= 0.0) { return; }
152152
153 Vec3d pos;153 Vec3d pos;
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
155 StelPainter painter(prj);155
156 painter.setFont(font);156 renderer->setFont(font);
157157 const Vec3f mColor = StelApp::getInstance().getVisionModeNight()
158 Vec3f mColor;158 ? StelUtils::getNightColor(markColor) : markColor;
159 if (StelApp::getInstance().getVisionModeNight())159
160 mColor = StelUtils::getNightColor(markColor);160 renderer->setGlobalColor(mColor[0], mColor[1], mColor[2], markFader.getInterstate());
161 else161 renderer->setBlendMode(BlendMode_Alpha);
162 mColor = markColor;162
163163 StelCircleArcRenderer circleArcRenderer(renderer, prj);
164 glColor4f(mColor[0], mColor[1], mColor[2], markFader.getInterstate());164 const QFontMetrics fontMetrics(font);
165 glDisable(GL_TEXTURE_2D);165
166 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
167 glEnable(GL_BLEND);
168 glEnable(GL_LINE_SMOOTH);
169
170 for(int i=0; i<360; i++)166 for(int i=0; i<360; i++)
171 {167 {
172 float a = i*M_PI/180;168 float a = i*M_PI/180;
@@ -177,24 +173,17 @@
177 h = -0.02; // the size of the mark every 15 degrees173 h = -0.02; // the size of the mark every 15 degrees
178174
179 QString s = QString("%1").arg((i+90)%360);175 QString s = QString("%1").arg((i+90)%360);
180176 const float shiftx = fontMetrics.width(s) / 2.;
181 float shiftx = painter.getFontMetrics().width(s) / 2.;177 const float shifty = fontMetrics.height() / 2.;
182 float shifty = painter.getFontMetrics().height() / 2.;178 renderer->drawText(TextParams(pos, prj, s).shift(-shiftx, shifty));
183 painter.drawText(pos, s, 0, -shiftx, shifty);
184 }179 }
185 else if (i % 5 == 0)180 else if (i % 5 == 0)
186 {181 {
187 h = -0.01; // the size of the mark every 5 degrees182 h = -0.01; // the size of the mark every 5 degrees
188 }183 }
189184
190 glDisable(GL_TEXTURE_2D);185 circleArcRenderer.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1], h));
191 painter.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1], h), NULL);
192 glEnable(GL_TEXTURE_2D);
193 }186 }
194 glDisable(GL_LINE_SMOOTH);
195 glDisable(GL_BLEND);
196 glEnable(GL_TEXTURE_2D);
197
198}187}
199188
200void CompassMarks::update(double deltaTime)189void CompassMarks::update(double deltaTime)
201190
=== modified file 'plugins/CompassMarks/src/CompassMarks.hpp'
--- plugins/CompassMarks/src/CompassMarks.hpp 2012-01-11 10:50:37 +0000
+++ plugins/CompassMarks/src/CompassMarks.hpp 2012-08-30 16:29:19 +0000
@@ -39,7 +39,7 @@
39 // Methods defined in the StelModule class39 // Methods defined in the StelModule class
40 virtual void init();40 virtual void init();
41 virtual void update(double deltaTime);41 virtual void update(double deltaTime);
42 virtual void draw(StelCore* core);42 virtual void draw(StelCore* core, class StelRenderer* renderer);
43 virtual double getCallOrder(StelModuleActionName actionName) const;43 virtual double getCallOrder(StelModuleActionName actionName) const;
4444
45public slots:45public slots:
4646
=== modified file 'plugins/Exoplanets/src/Exoplanet.cpp'
--- plugins/Exoplanets/src/Exoplanet.cpp 2012-08-08 10:11:01 +0000
+++ plugins/Exoplanets/src/Exoplanet.cpp 2012-08-30 16:29:19 +0000
@@ -18,25 +18,22 @@
1818
19#include "Exoplanet.hpp"19#include "Exoplanet.hpp"
20#include "StelObject.hpp"20#include "StelObject.hpp"
21#include "StelPainter.hpp"
22#include "StelApp.hpp"21#include "StelApp.hpp"
23#include "StelCore.hpp"22#include "StelCore.hpp"
24#include "StelTexture.hpp"
25#include "StelUtils.hpp"23#include "StelUtils.hpp"
26#include "StelTranslator.hpp"24#include "StelTranslator.hpp"
27#include "StelModuleMgr.hpp"25#include "StelModuleMgr.hpp"
28#include "StelSkyDrawer.hpp"26#include "StelSkyDrawer.hpp"
27#include "renderer/StelRenderer.hpp"
28#include "renderer/StelTextureNew.hpp"
2929
30#include <QTextStream>30#include <QTextStream>
31#include <QDebug>31#include <QDebug>
32#include <QVariant>32#include <QVariant>
33#include <QtOpenGL>
34#include <QVariantMap>33#include <QVariantMap>
35#include <QVariant>34#include <QVariant>
36#include <QList>35#include <QList>
3736
38StelTextureSP Exoplanet::markerTexture;
39
40Exoplanet::Exoplanet(const QVariantMap& map)37Exoplanet::Exoplanet(const QVariantMap& map)
41 : initialized(false)38 : initialized(false)
42{39{
@@ -355,31 +352,33 @@
355 labelsFader.update((int)(deltaTime*1000));352 labelsFader.update((int)(deltaTime*1000));
356}353}
357354
358void Exoplanet::draw(StelCore* core, StelPainter& painter)355void Exoplanet::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector,
356 StelTextureNew* markerTexture)
359{357{
360 StelSkyDrawer* sd = core->getSkyDrawer(); 358 StelSkyDrawer* sd = core->getSkyDrawer();
361359
362 Vec3f color = Vec3f(0.4f,1.2f,0.5f);360 Vec3f color = Vec3f(0.4f,1.2f,0.5f);
363 if (StelApp::getInstance().getVisionModeNight())361 if (StelApp::getInstance().getVisionModeNight())
364 color = StelUtils::getNightColor(color);362 color = StelUtils::getNightColor(color);
365363 const double mag = getVMagnitude(core, true);
366 double mag = getVMagnitude(core, true);
367364
368 StelUtils::spheToRect(RA, DE, XYZ);365 StelUtils::spheToRect(RA, DE, XYZ);
369 glEnable(GL_BLEND);366 renderer->setBlendMode(BlendMode_Add);
370 glBlendFunc(GL_ONE, GL_ONE);367 renderer->setGlobalColor(color[0], color[1], color[2]);
371 painter.setColor(color[0], color[1], color[2], 1);
372368
373 if (mag <= sd->getLimitMagnitude())369 if (mag <= sd->getLimitMagnitude())
374 {370 {
375371 markerTexture->bind();
376 Exoplanet::markerTexture->bind();372 const float size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
377 float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();373 const float shift = 5.f + size/1.6f;
378 float shift = 5.f + size/1.6f;
379 if (labelsFader.getInterstate()<=0.f)374 if (labelsFader.getInterstate()<=0.f)
380 {375 {
381 painter.drawSprite2dMode(XYZ, 5);376 Vec3d win;
382 painter.drawText(XYZ, designation, 0, shift, shift, false);377 if(projector->project(XYZ, win))
378 {
379 renderer->drawTexturedRect(win[0] - 5, win[1] - 5, 10, 10);
380 renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
381 }
383 }382 }
384 }383 }
385}384}
386385
=== modified file 'plugins/Exoplanets/src/Exoplanet.hpp'
--- plugins/Exoplanets/src/Exoplanet.hpp 2012-08-05 12:24:40 +0000
+++ plugins/Exoplanets/src/Exoplanet.hpp 2012-08-30 16:29:19 +0000
@@ -27,8 +27,7 @@
27#include <QDateTime>27#include <QDateTime>
2828
29#include "StelObject.hpp"29#include "StelObject.hpp"
30#include "StelTextureTypes.hpp"30#include "StelProjectorType.hpp"
31#include "StelPainter.hpp"
32#include "StelFader.hpp"31#include "StelFader.hpp"
3332
34typedef struct33typedef struct
@@ -44,7 +43,6 @@
44 int discovered; //! Exoplanet discovered year43 int discovered; //! Exoplanet discovered year
45} exoplanetData;44} exoplanetData;
4645
47class StelPainter;
4846
49//! @class Exoplanet47//! @class Exoplanet
50//! A exoplanet object represents one pulsar on the sky.48//! A exoplanet object represents one pulsar on the sky.
@@ -101,10 +99,8 @@
10199
102 Vec3d XYZ; // holds J2000 position 100 Vec3d XYZ; // holds J2000 position
103101
104 static StelTextureSP hintTexture;102 void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector,
105 static StelTextureSP markerTexture;103 class StelTextureNew* markerTexture);
106
107 void draw(StelCore* core, StelPainter& painter);
108104
109 //! Variables for description of properties of exoplanets105 //! Variables for description of properties of exoplanets
110 QString designation; //! The designation of the host star106 QString designation; //! The designation of the host star
111107
=== modified file 'plugins/Exoplanets/src/Exoplanets.cpp'
--- plugins/Exoplanets/src/Exoplanets.cpp 2012-08-05 12:35:06 +0000
+++ plugins/Exoplanets/src/Exoplanets.cpp 2012-08-30 16:29:19 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelGui.hpp"22#include "StelGui.hpp"
@@ -25,11 +24,12 @@
25#include "StelLocaleMgr.hpp"24#include "StelLocaleMgr.hpp"
26#include "StelModuleMgr.hpp"25#include "StelModuleMgr.hpp"
27#include "StelObjectMgr.hpp"26#include "StelObjectMgr.hpp"
28#include "StelTextureMgr.hpp"
29#include "StelJsonParser.hpp"27#include "StelJsonParser.hpp"
30#include "StelFileMgr.hpp"28#include "StelFileMgr.hpp"
31#include "StelUtils.hpp"29#include "StelUtils.hpp"
32#include "StelTranslator.hpp"30#include "StelTranslator.hpp"
31#include "renderer/StelRenderer.hpp"
32#include "renderer/StelTextureNew.hpp"
33#include "LabelMgr.hpp"33#include "LabelMgr.hpp"
34#include "Exoplanets.hpp"34#include "Exoplanets.hpp"
35#include "Exoplanet.hpp"35#include "Exoplanet.hpp"
@@ -47,6 +47,7 @@
47#include <QVariantMap>47#include <QVariantMap>
48#include <QVariant>48#include <QVariant>
49#include <QList>49#include <QList>
50#include <QSettings>
50#include <QSharedPointer>51#include <QSharedPointer>
51#include <QStringList>52#include <QStringList>
52#include <QPixmap>53#include <QPixmap>
@@ -82,7 +83,14 @@
82 Constructor83 Constructor
83*/84*/
84Exoplanets::Exoplanets()85Exoplanets::Exoplanets()
85 : flagShowExoplanets(false), OnIcon(NULL), OffIcon(NULL), GlowIcon(NULL), toolbarButton(NULL), progressBar(NULL)86 : texPointer(NULL)
87 , markerTexture(NULL)
88 , flagShowExoplanets(false)
89 , OnIcon(NULL)
90 , OffIcon(NULL)
91 , GlowIcon(NULL)
92 , toolbarButton(NULL)
93 , progressBar(NULL)
86{94{
87 setObjectName("Exoplanets");95 setObjectName("Exoplanets");
88 exoplanetsConfigDialog = new ExoplanetsDialog();96 exoplanetsConfigDialog = new ExoplanetsDialog();
@@ -108,8 +116,9 @@
108void Exoplanets::deinit()116void Exoplanets::deinit()
109{117{
110 ep.clear();118 ep.clear();
111 Exoplanet::markerTexture.clear();119 if(NULL != texPointer) {delete texPointer;}
112 texPointer.clear();120 if(NULL != markerTexture) {delete markerTexture;}
121 texPointer = markerTexture = NULL;
113}122}
114123
115void Exoplanets::update(double) //deltaTime124void Exoplanets::update(double) //deltaTime
@@ -149,9 +158,6 @@
149158
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";
151160
152 texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
153 Exoplanet::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Exoplanets/exoplanet.png");
154
155 // key bindings and other actions161 // key bindings and other actions
156 // TRANSLATORS: Title of a group of key bindings in the Help window162 // TRANSLATORS: Title of a group of key bindings in the Help window
157 QString groupName = N_("Plugin Key Bindings");163 QString groupName = N_("Plugin Key Bindings");
@@ -218,27 +224,33 @@
218/*224/*
219 Draw our module. This should print name of first PSR in the main window225 Draw our module. This should print name of first PSR in the main window
220*/226*/
221void Exoplanets::draw(StelCore* core)227void Exoplanets::draw(StelCore* core, StelRenderer* renderer)
222{228{
223 if (!flagShowExoplanets)229 if (!flagShowExoplanets)
224 return;230 return;
225231
226 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);232 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
227 StelPainter painter(prj);233 renderer->setFont(font);
228 painter.setFont(font);234
235 if(NULL == texPointer)
236 {
237 Q_ASSERT_X(NULL == markerTexture, Q_FUNC_INFO, "Textures need to be created simultaneously");
238 texPointer = renderer->createTexture("textures/pointeur2.png");
239 markerTexture = renderer->createTexture(":/Exoplanets/exoplanet.png");
240 }
229 241
230 foreach (const ExoplanetP& eps, ep)242 foreach (const ExoplanetP& eps, ep)
231 {243 {
232 if (eps && eps->initialized)244 if (eps && eps->initialized)
233 eps->draw(core, painter);245 eps->draw(core, renderer, prj, markerTexture);
234 }246 }
235247
236 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())248 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
237 drawPointer(core, painter);249 drawPointer(core, renderer, prj);
238250
239}251}
240252
241void Exoplanets::drawPointer(StelCore* core, StelPainter& painter)253void Exoplanets::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
242{254{
243 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);255 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
244256
@@ -250,16 +262,15 @@
250262
251 Vec3d screenpos;263 Vec3d screenpos;
252 // Compute 2D pos and return if outside screen264 // Compute 2D pos and return if outside screen
253 if (!painter.getProjector()->project(pos, screenpos))265 if (!projector->project(pos, screenpos))
254 return;266 return;
255267
256 const Vec3f& c(obj->getInfoColor());268 const Vec3f& c(obj->getInfoColor());
257 painter.setColor(c[0],c[1],c[2]);269 renderer->setGlobalColor(c[0],c[1],c[2]);
258 texPointer->bind();270 texPointer->bind();
259 painter.enableTexture2d(true);271 renderer->setBlendMode(BlendMode_Alpha);
260 glEnable(GL_BLEND);272 renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f,
261 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode273 26.0f, StelApp::getInstance().getTotalRunTime() * 40.0f);
262 painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
263 }274 }
264}275}
265276
266277
=== modified file 'plugins/Exoplanets/src/Exoplanets.hpp'
--- plugins/Exoplanets/src/Exoplanets.hpp 2012-06-21 16:40:28 +0000
+++ plugins/Exoplanets/src/Exoplanets.hpp 2012-08-30 16:29:19 +0000
@@ -22,8 +22,6 @@
22#include "StelObjectModule.hpp"22#include "StelObjectModule.hpp"
23#include "StelObject.hpp"23#include "StelObject.hpp"
24#include "StelFader.hpp"24#include "StelFader.hpp"
25#include "StelTextureTypes.hpp"
26#include "StelPainter.hpp"
27#include "Exoplanet.hpp"25#include "Exoplanet.hpp"
28#include <QFont>26#include <QFont>
29#include <QVariantMap>27#include <QVariantMap>
@@ -37,7 +35,6 @@
37class QSettings;35class QSettings;
38class QTimer;36class QTimer;
39class ExoplanetsDialog;37class ExoplanetsDialog;
40class StelPainter;
41class QPixmap;38class QPixmap;
42class StelButton;39class StelButton;
4340
@@ -66,8 +63,9 @@
66 virtual void init();63 virtual void init();
67 virtual void deinit();64 virtual void deinit();
68 virtual void update(double deltaTime);65 virtual void update(double deltaTime);
69 virtual void draw(StelCore* core);66 virtual void draw(StelCore* core, class StelRenderer* renderer);
70 virtual void drawPointer(StelCore* core, StelPainter& painter);67 virtual void drawPointer(StelCore* core, class StelRenderer* renderer,
68 StelProjectorP projector);
71 virtual double getCallOrder(StelModuleActionName actionName) const;69 virtual double getCallOrder(StelModuleActionName actionName) const;
7270
73 ///////////////////////////////////////////////////////////////////////////71 ///////////////////////////////////////////////////////////////////////////
@@ -181,7 +179,8 @@
181179
182 QString jsonCatalogPath;180 QString jsonCatalogPath;
183181
184 StelTextureSP texPointer;182 StelTextureNew* texPointer;
183 StelTextureNew* markerTexture;
185 QList<ExoplanetP> ep;184 QList<ExoplanetP> ep;
186185
187 // variables and functions for the updater186 // variables and functions for the updater
188187
=== modified file 'plugins/HelloStelModule/src/HelloStelModule.cpp'
--- plugins/HelloStelModule/src/HelloStelModule.cpp 2010-01-13 11:26:18 +0000
+++ plugins/HelloStelModule/src/HelloStelModule.cpp 2012-08-30 16:29:19 +0000
@@ -17,12 +17,12 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelLocaleMgr.hpp"22#include "StelLocaleMgr.hpp"
24#include "StelModuleMgr.hpp"23#include "StelModuleMgr.hpp"
25#include "HelloStelModule.hpp"24#include "HelloStelModule.hpp"
25#include "renderer/StelRenderer.hpp"
2626
27#include <QDebug>27#include <QDebug>
2828
@@ -87,11 +87,10 @@
87/*************************************************************************87/*************************************************************************
88 Draw our module. This should print "Hello world!" in the main window88 Draw our module. This should print "Hello world!" in the main window
89*************************************************************************/89*************************************************************************/
90void HelloStelModule::draw(StelCore* core)90void HelloStelModule::draw(StelCore* core, StelRenderer* renderer)
91{91{
92 StelPainter painter(core->getProjection2d());92 renderer->setColor(1, 1, 1, 1);
93 painter.setColor(1,1,1,1);93 renderer->setFont(font);
94 painter.setFont(font);94 renderer->drawText(300, 300, "Hello World!")
95 painter.drawText(300, 300, "Hello World!");
96}95}
9796
9897
=== modified file 'plugins/HelloStelModule/src/HelloStelModule.hpp'
--- plugins/HelloStelModule/src/HelloStelModule.hpp 2010-05-09 20:49:19 +0000
+++ plugins/HelloStelModule/src/HelloStelModule.hpp 2012-08-30 16:29:19 +0000
@@ -33,7 +33,7 @@
33 // Methods defined in the StelModule class33 // Methods defined in the StelModule class
34 virtual void init();34 virtual void init();
35 virtual void update(double) {;}35 virtual void update(double) {;}
36 virtual void draw(StelCore* core);36 virtual void draw(StelCore* core, class StelRenderer* renderer);
37 virtual double getCallOrder(StelModuleActionName actionName) const;37 virtual double getCallOrder(StelModuleActionName actionName) const;
38private:38private:
39 // Font used for displaying our text39 // Font used for displaying our text
4040
=== modified file 'plugins/LogBook/src/LogBook.cpp'
--- plugins/LogBook/src/LogBook.cpp 2010-06-08 18:21:56 +0000
+++ plugins/LogBook/src/LogBook.cpp 2012-08-30 16:29:19 +0000
@@ -34,7 +34,6 @@
34#include "StelObjectMgr.hpp"34#include "StelObjectMgr.hpp"
35#include "StelObjectType.hpp"35#include "StelObjectType.hpp"
36#include "StelProjector.hpp"36#include "StelProjector.hpp"
37#include "StelPainter.hpp"
38#include "StelStyle.hpp"37#include "StelStyle.hpp"
39#include "StelTranslator.hpp"38#include "StelTranslator.hpp"
4039
@@ -51,13 +50,6 @@
51#include <QSqlRelationalTableModel>50#include <QSqlRelationalTableModel>
52#include <QSqlTableModel>51#include <QSqlTableModel>
5352
54#if defined(__APPLE__) && defined(__MACH__)
55#include <OpenGL/glu.h> /* Header File For The GLU Library */
56#else
57#include <GL/glu.h> /* Header File For The GLU Library */
58#endif
59
60
61/* ********************************************************************* */53/* ********************************************************************* */
62#if 054#if 0
63#pragma mark -55#pragma mark -
@@ -119,9 +111,8 @@
119 return true;111 return true;
120}112}
121113
122void LogBook::draw(StelCore* core)114void LogBook::draw(StelCore* core, class StelRenderer* renderer)
123{115{
124 StelPainter painter(core->getProjection2d());
125}116}
126117
127double LogBook::getCallOrder(StelModuleActionName actionName) const118double LogBook::getCallOrder(StelModuleActionName actionName) const
128119
=== modified file 'plugins/LogBook/src/LogBook.hpp'
--- plugins/LogBook/src/LogBook.hpp 2010-06-08 18:21:56 +0000
+++ plugins/LogBook/src/LogBook.hpp 2012-08-30 16:29:19 +0000
@@ -48,7 +48,7 @@
48 ///////////////////////////////////////////////////////////////////////////48 ///////////////////////////////////////////////////////////////////////////
49 // Methods defined in the StelModule class49 // Methods defined in the StelModule class
50 virtual bool configureGui(bool show=true);50 virtual bool configureGui(bool show=true);
51 virtual void draw(StelCore* core);51 virtual void draw(StelCore* core, class StelRenderer* renderer);
52 virtual double getCallOrder(StelModuleActionName actionName) const;52 virtual double getCallOrder(StelModuleActionName actionName) const;
53 //! Returns the module-specific style sheet.53 //! Returns the module-specific style sheet.
54 //! The main StelStyle instance should be passed.54 //! The main StelStyle instance should be passed.
5555
=== modified file 'plugins/Observability/src/Observability.cpp'
--- plugins/Observability/src/Observability.cpp 2012-08-27 13:29:14 +0000
+++ plugins/Observability/src/Observability.cpp 2012-08-30 16:29:19 +0000
@@ -19,7 +19,6 @@
19#include <QSettings>19#include <QSettings>
20#include <QPixmap>20#include <QPixmap>
21#include <QTimer>21#include <QTimer>
22#include <QtOpenGL>
23#include <QString>22#include <QString>
24#include <QDebug>23#include <QDebug>
25#include <QAction>24#include <QAction>
@@ -28,6 +27,7 @@
28#include <QKeyEvent>27#include <QKeyEvent>
29#include <QMouseEvent>28#include <QMouseEvent>
3029
30#include "renderer/StelRenderer.hpp"
31#include "StelIniParser.hpp"31#include "StelIniParser.hpp"
32#include "StelProjector.hpp"32#include "StelProjector.hpp"
33#include "StarMgr.hpp"33#include "StarMgr.hpp"
@@ -42,9 +42,7 @@
42#include "StelGuiItems.hpp"42#include "StelGuiItems.hpp"
43#include "StelMovementMgr.hpp"43#include "StelMovementMgr.hpp"
44#include "StelFileMgr.hpp"44#include "StelFileMgr.hpp"
45#include "StelVertexArray.hpp"
46#include "StelCore.hpp"45#include "StelCore.hpp"
47#include "StelPainter.hpp"
48#include "ZoneArray.hpp"46#include "ZoneArray.hpp"
49#include "StelSkyDrawer.hpp"47#include "StelSkyDrawer.hpp"
50#include "Observability.hpp"48#include "Observability.hpp"
@@ -239,7 +237,7 @@
239237
240/////////////////////////////////////////////238/////////////////////////////////////////////
241// MAIN CODE:239// MAIN CODE:
242void Observability::draw(StelCore* core)240void Observability::draw(StelCore* core, StelRenderer* renderer)
243{241{
244242
245 if (!flagShowObservability) return; // Button is off.243 if (!flagShowObservability) return; // Button is off.
@@ -255,10 +253,10 @@
255 if (core->getCurrentLocation().planetName != "Earth") {return;};253 if (core->getCurrentLocation().planetName != "Earth") {return;};
256254
257// Set the painter:255// Set the painter:
258 StelPainter paintresult(core->getProjection2d());256 StelProjectorP projector = core->getProjection2d();
259 paintresult.setColor(fontColor[0],fontColor[1],fontColor[2],1);257 renderer->setGlobalColor(fontColor[0],fontColor[1],fontColor[2],1);
260 font.setPixelSize(fontSize);258 font.setPixelSize(fontSize);
261 paintresult.setFont(font);259 renderer->setFont(font);
262260
263261
264// Get current date, location, and check if there is something selected.262// Get current date, location, and check if there is something selected.
@@ -675,30 +673,30 @@
675673
676 if (show_Today) 674 if (show_Today)
677 {675 {
678 paintresult.drawText(xLine, yLine,q_("TODAY:"));676 renderer->drawText(TextParams(xLine, yLine,q_(" TODAY:")));
679 paintresult.drawText(xLine+fontSize, yLine-spacing, RS2);677 renderer->drawText(TextParams(xLine+fontSize, yLine-spacing, RS2));
680 paintresult.drawText(xLine+fontSize, yLine-spacing*2, RS1);678 renderer->drawText(TextParams(xLine+fontSize, yLine-spacing*2, RS1));
681 paintresult.drawText(xLine+fontSize, yLine-spacing*3, Cul);679 renderer->drawText(TextParams(xLine+fontSize, yLine-spacing*3, Cul));
682 yLine -= spacing2;680 yLine -= spacing2;
683 };681 };
684 682
685 if ((isMoon && show_FullMoon) || (!isSun && !isMoon && show_Year)) 683 if ((isMoon && show_FullMoon) || (!isSun && !isMoon && show_Year))
686 {684 {
687 paintresult.drawText(xLine,yLine,q_("THIS YEAR:"));685 renderer->drawText(TextParams(xLine,yLine," THIS YEAR:"));
688 if (show_Best_Night || show_FullMoon)686 if (show_Best_Night || show_FullMoon)
689 {687 {
690 yLine -= spacing;688 yLine -= spacing;
691 paintresult.drawText(xLine+fontSize, yLine, bestNight);689 renderer->drawText(TextParams(xLine+fontSize, yLine, bestNight));
692 };690 };
693 if (show_Good_Nights) 691 if (show_Good_Nights)
694 {692 {
695 yLine -= spacing;693 yLine -= spacing;
696 paintresult.drawText(xLine+fontSize, yLine, ObsRange);694 renderer->drawText(TextParams(xLine+fontSize, yLine, ObsRange));
697 };695 };
698 if (show_AcroCos) 696 if (show_AcroCos)
699 {697 {
700 yLine -= spacing;698 yLine -= spacing;
701 paintresult.drawText(xLine+fontSize, yLine, AcroCos);699 renderer->drawText(TextParams(xLine+fontSize, yLine, AcroCos));
702 };700 };
703701
704 };702 };
705703
=== modified file 'plugins/Observability/src/Observability.hpp'
--- plugins/Observability/src/Observability.hpp 2012-08-23 09:21:20 +0000
+++ plugins/Observability/src/Observability.hpp 2012-08-30 16:29:19 +0000
@@ -38,7 +38,7 @@
38 virtual ~Observability();38 virtual ~Observability();
39 virtual void init();39 virtual void init();
40 virtual void update(double) {;}40 virtual void update(double) {;}
41 virtual void draw(StelCore* core);41 virtual void draw(StelCore* core, class StelRenderer* renderer);
42 virtual double getCallOrder(StelModuleActionName actionName) const;42 virtual double getCallOrder(StelModuleActionName actionName) const;
4343
4444
4545
=== modified file 'plugins/Oculars/src/Oculars.cpp'
--- plugins/Oculars/src/Oculars.cpp 2012-07-06 17:00:39 +0000
+++ plugins/Oculars/src/Oculars.cpp 2012-08-30 16:29:19 +0000
@@ -29,13 +29,15 @@
29#include "StelMovementMgr.hpp"29#include "StelMovementMgr.hpp"
30#include "StelObjectMgr.hpp"30#include "StelObjectMgr.hpp"
31#include "StelLocaleMgr.hpp"31#include "StelLocaleMgr.hpp"
32#include "StelPainter.hpp"
33#include "StelProjector.hpp"32#include "StelProjector.hpp"
34#include "StelGui.hpp"33#include "StelGui.hpp"
35#include "StelGuiItems.hpp"34#include "StelGuiItems.hpp"
36#include "StelMainWindow.hpp"35#include "StelMainWindow.hpp"
37#include "StelTranslator.hpp"36#include "StelTranslator.hpp"
38#include "SkyGui.hpp"37#include "SkyGui.hpp"
38#include "renderer/GenericVertexTypes.hpp"
39#include "renderer/StelGeometryBuilder.hpp"
40#include "renderer/StelRenderer.hpp"
3941
40#include <QAction>42#include <QAction>
41#include <QGraphicsWidget>43#include <QGraphicsWidget>
@@ -49,12 +51,6 @@
4951
50#include <cmath>52#include <cmath>
5153
52#if defined(__APPLE__) && defined(__MACH__)
53#include <OpenGL/glu.h> /* Header File For The GLU Library */
54#else
55#include <GL/glu.h> /* Header File For The GLU Library */
56#endif
57
58#ifdef Q_WS_MAC54#ifdef Q_WS_MAC
59extern void qt_set_sequence_auto_mnemonic(bool b);55extern void qt_set_sequence_auto_mnemonic(bool b);
60#endif56#endif
@@ -228,10 +224,10 @@
228}224}
229225
230//! Draw any parts on the screen which are for our module226//! Draw any parts on the screen which are for our module
231void Oculars::draw(StelCore* core)227void Oculars::draw(StelCore* core, StelRenderer* renderer)
232{228{
233 if (flagShowTelrad) {229 if (flagShowTelrad) {
234 paintTelrad();230 paintTelrad(renderer);
235 } else if (flagShowOculars){231 } else if (flagShowOculars){
236 // Ensure there is a selected ocular & telescope232 // Ensure there is a selected ocular & telescope
237 if (selectedCCDIndex > ccds.count()) {233 if (selectedCCDIndex > ccds.count()) {
@@ -255,37 +251,33 @@
255 251
256 if (ready) {252 if (ready) {
257 if (selectedOcularIndex > -1) {253 if (selectedOcularIndex > -1) {
258 paintOcularMask();254 paintOcularMask(renderer);
259 if (flagShowCrosshairs) {255 if (flagShowCrosshairs) {
260 paintCrosshairs();256 paintCrosshairs(renderer);
261 }257 }
262 }258 }
263 if (guiPanelEnabled)259 if (guiPanelEnabled)
264 {260 {
265 // Reset the state to allow the panel to be painted normally261 // Reset the state to allow the panel to be painted normally
266 glDisable(GL_TEXTURE_2D);262 renderer->setBlendMode(BlendMode_Alpha);
267 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
268 glEnable(GL_BLEND);
269 }263 }
270 else264 else
271 {265 {
272 // Paint the information in the upper-right hand corner266 // Paint the information in the upper-right hand corner
273 paintText(core);267 paintText(core, renderer);
274 }268 }
275 }269 }
276 } else if (flagShowCCD) {270 } else if (flagShowCCD) {
277 paintCCDBounds();271 paintCCDBounds(renderer);
278 if (guiPanelEnabled)272 if (guiPanelEnabled)
279 {273 {
280 // Reset the state to allow the panel to be painted normally274 // Reset the state to allow the panel to be painted normally
281 glDisable(GL_TEXTURE_2D);275 renderer->setBlendMode(BlendMode_Alpha);
282 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
283 glEnable(GL_BLEND);
284 }276 }
285 else277 else
286 {278 {
287 // Paint the information in the upper-right hand corner279 // Paint the information in the upper-right hand corner
288 paintText(core);280 paintText(core, renderer);
289 }281 }
290 }282 }
291}283}
@@ -1293,73 +1285,96 @@
1293 return binocularFound;1285 return binocularFound;
1294}1286}
12951287
1296void Oculars::paintCCDBounds()1288void Oculars::paintCCDBounds(StelRenderer* renderer)
1297{1289{
1298 StelCore *core = StelApp::getInstance().getCore();1290 StelCore *core = StelApp::getInstance().getCore();
1299 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();1291 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
13001292
1301 glDisable(GL_BLEND);1293 renderer->setBlendMode(BlendMode_None);
1302 glColor3f(0.f,0.f,0.f);1294
1303 glPushMatrix();1295 StelVertexBuffer<VertexP2>* vertices =
1304 glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0);1296 renderer->createVertexBuffer<VertexP2>(PrimitiveType_LineStrip);
1305 glRotated(ccdRotationAngle, 0.0, 0.0, 1.0);1297
1306 GLdouble screenFOV = params.fov;1298 double screenFOV = params.fov;
1299 const Vec2f offset = Vec2f(params.viewportCenter[0], params.viewportCenter[1]);
13071300
1308 // draw sensor rectangle1301 // draw sensor rectangle
1309 if(selectedCCDIndex != -1) {1302 if(selectedCCDIndex != -1) {
1310 CCD *ccd = ccds[selectedCCDIndex];1303 CCD *ccd = ccds[selectedCCDIndex];
1311 if (ccd) {1304 if (ccd) {
1312 glColor4f(0.77, 0.14, 0.16, 0.5);1305 renderer->setGlobalColor(0.77f, 0.14f, 0.16f, 0.5f);
1313 Telescope *telescope = telescopes[selectedTelescopeIndex];1306 Telescope *telescope = telescopes[selectedTelescopeIndex];
1314 double ccdXRatio = ccd->getActualFOVx(telescope) / screenFOV;1307 const double ccdXRatio = ccd->getActualFOVx(telescope) / screenFOV;
1315 double ccdYRatio = ccd->getActualFOVy(telescope) / screenFOV;1308 const double ccdYRatio = ccd->getActualFOVy(telescope) / screenFOV;
1316 // As the FOV is based on the narrow aspect of the screen, we need to calculate1309 // As the FOV is based on the narrow aspect of the screen, we need to calculate
1317 // height & width based soley off of that dimension.1310 // height & width based soley off of that dimension.
1318 int aspectIndex = 2;1311 int aspectIndex = 2;
1319 if (params.viewportXywh[2] > params.viewportXywh[3]) {1312 if (params.viewportXywh[2] > params.viewportXywh[3]) {
1320 aspectIndex = 3;1313 aspectIndex = 3;
1321 }1314 }
1322 float width = params.viewportXywh[aspectIndex] * ccdYRatio;1315 const float halfWidth = 0.5f * (params.viewportXywh[aspectIndex] * ccdYRatio);
1323 float height = params.viewportXywh[aspectIndex] * ccdXRatio;1316 const float halfHeight = 0.5f * (params.viewportXywh[aspectIndex] * ccdXRatio);
13241317
1325 if (width > 0.0 && height > 0.0) {1318 if (halfWidth > 0.0 && halfHeight > 0.0)
1326 glBegin(GL_LINE_LOOP);1319 {
1327 glVertex2f(-width / 2.0, height / 2.0);1320 const float s = sin(-ccdRotationAngle * M_PI / 180.0f);
1328 glVertex2f(width / 2.0, height / 2.0);1321 const float c = cos(-ccdRotationAngle * M_PI / 180.0f);
1329 glVertex2f(width / 2.0, -height / 2.0);1322 const float cosHalfWidth = c * halfWidth;
1330 glVertex2f(-width / 2.0, -height / 2.0);1323 const float sinHalfWidth = s * halfWidth;
1331 glEnd();1324 const float cosHalfHeight = c * halfHeight;
1325 const float sinHalfHeight = s * halfHeight;
1326 const Vec2f v1 = Vec2f(-cosHalfWidth - sinHalfHeight, -sinHalfWidth + cosHalfHeight);
1327 const Vec2f v2 = Vec2f(cosHalfWidth - sinHalfHeight, sinHalfWidth + cosHalfHeight);
1328 const Vec2f v3 = Vec2f(cosHalfWidth + sinHalfHeight, sinHalfWidth - cosHalfHeight);
1329 const Vec2f v4 = Vec2f(-cosHalfWidth + sinHalfHeight, -sinHalfWidth - cosHalfHeight);
1330 vertices->addVertex(VertexP2(offset + v1));
1331 vertices->addVertex(VertexP2(offset + v2));
1332 vertices->addVertex(VertexP2(offset + v3));
1333 vertices->addVertex(VertexP2(offset + v4));
1334 vertices->addVertex(VertexP2(offset + v1));
1335 vertices->lock();
1336
1337 renderer->drawVertexBuffer(vertices);
1332 }1338 }
1333 }1339 }
1334 }1340 }
13351341 delete vertices;
1336 glPopMatrix();
1337}1342}
13381343
1339void Oculars::paintCrosshairs()1344void Oculars::paintCrosshairs(StelRenderer* renderer)
1340{1345{
1341 const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);1346 const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);
1342 StelCore *core = StelApp::getInstance().getCore();1347 StelCore *core = StelApp::getInstance().getCore();
1343 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();1348 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
1344 // Center of screen1349 // Center of screen
1345 Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,1350 Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,
1346 projector->getViewportPosY()+projector->getViewportHeight()/2);1351 projector->getViewportPosY()+projector->getViewportHeight()/2);
1347 GLdouble length = 0.5 * params.viewportFovDiameter;1352 double length = 0.5 * params.viewportFovDiameter;
1348 // See if we need to scale the length1353 // See if we need to scale the length
1349 if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0) {1354 if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0) {
1350 length = oculars[selectedOcularIndex]->appearentFOV() * length / maxEyepieceAngle;1355 length = oculars[selectedOcularIndex]->appearentFOV() * length / maxEyepieceAngle;
1351 }1356 }
13521357
1353 // Draw the lines1358 // Draw the lines
1354 StelPainter painter(projector);1359 renderer->setGlobalColor(0.77f, 0.14f, 0.16f);
1355 painter.setColor(0.77, 0.14, 0.16, 1);1360 StelVertexBuffer<VertexP2>* vertices =
1356 painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0], centerScreen[1] + length);1361 renderer->createVertexBuffer<VertexP2>(PrimitiveType_Lines);
1357 painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0], centerScreen[1] - length);1362 const VertexP2 center(centerScreen[0], centerScreen[1]);
1358 painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0] + length, centerScreen[1]);1363 vertices->addVertex(center);
1359 painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0] - length, centerScreen[1]);1364 vertices->addVertex(VertexP2(centerScreen[0], centerScreen[1] + length));
1365 vertices->addVertex(center);
1366 vertices->addVertex(VertexP2(centerScreen[0], centerScreen[1] - length));
1367 vertices->addVertex(center);
1368 vertices->addVertex(VertexP2(centerScreen[0] + length, centerScreen[1]));
1369 vertices->addVertex(center);
1370 vertices->addVertex(VertexP2(centerScreen[0] - length, centerScreen[1]));
1371 vertices->lock();
1372
1373 renderer->drawVertexBuffer(vertices);
1374 delete vertices;
1360}1375}
13611376
1362void Oculars::paintTelrad()1377void Oculars::paintTelrad(StelRenderer* renderer)
1363{1378{
1364 if (!flagShowOculars) {1379 if (!flagShowOculars) {
1365 const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);1380 const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);
@@ -1367,50 +1382,61 @@
1367 // StelCore *core = StelApp::getInstance().getCore();1382 // StelCore *core = StelApp::getInstance().getCore();
1368 // StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();1383 // StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
13691384
1370 // StelPainter drawing1385 renderer->setGlobalColor(0.77f, 0.14f, 0.16f);
1371 StelPainter painter(projector);
1372 painter.setColor(0.77, 0.14, 0.16, 1.0);
1373 Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,1386 Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,
1374 projector->getViewportPosY()+projector->getViewportHeight()/2);1387 projector->getViewportPosY()+projector->getViewportHeight()/2);
1375 painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (0.5));1388
1376 painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (2.0));1389 // Generate and draw the circles.
1377 painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (4.0));1390 StelVertexBuffer<VertexP2>* circle =
13781391 renderer->createVertexBuffer<VertexP2>(PrimitiveType_LineStrip);
1392 const float baseRadius = 0.5f * projector->getPixelPerRadAtCenter() * (M_PI / 180.0f);
1393 StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 0.5f);
1394 renderer->drawVertexBuffer(circle);
1395
1396 circle->unlock();
1397 circle->clear();
1398 StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 2.0f);
1399 renderer->drawVertexBuffer(circle);
1400
1401 circle->unlock();
1402 circle->clear();
1403 StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 4.0f);
1404 renderer->drawVertexBuffer(circle);
1405
1406 delete circle;
1379 }1407 }
1380}1408}
13811409
1382void Oculars::paintOcularMask()1410
1411void Oculars::paintOcularMask(StelRenderer* renderer)
1383{1412{
1384 StelCore *core = StelApp::getInstance().getCore();1413 StelCore *core = StelApp::getInstance().getCore();
1385 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();1414 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
13861415
1387 glDisable(GL_BLEND);1416 renderer->setBlendMode(BlendMode_None);
1388 glColor3f(0.f,0.f,0.f);1417 renderer->setGlobalColor(0.0f, 0.0f, 0.0f);
1389 glPushMatrix();1418
1390 glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0);1419 float inner = 0.5f * params.viewportFovDiameter;
1391 GLUquadricObj *quadric = gluNewQuadric();
1392
1393 GLdouble inner = 0.5 * params.viewportFovDiameter;
1394
1395 // See if we need to scale the mask1420 // See if we need to scale the mask
1396 if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0 && !oculars[selectedOcularIndex]->isBinoculars()) {1421 if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0 && !oculars[selectedOcularIndex]->isBinoculars()) {
1397 inner = oculars[selectedOcularIndex]->appearentFOV() * inner / maxEyepieceAngle;1422 inner = oculars[selectedOcularIndex]->appearentFOV() * inner / maxEyepieceAngle;
1398 }1423 }
1424 const float outer = params.viewportXywh[2] + params.viewportXywh[3];
1425 const Vec2f offset(params.viewportCenter[0], params.viewportCenter[1]);
13991426
1400 GLdouble outer = params.viewportXywh[2] + params.viewportXywh[3];1427 StelGeometryRing* disc =
1401 // Draw the mask1428 StelGeometryBuilder().buildRing2D(RingParams(inner, outer).resolution(128, 1), offset);
1402 gluDisk(quadric, inner, outer, 256, 1);1429 disc->draw(renderer);
1403 // the gray circle1430 // the gray circle
1404 glColor3f(0.15f,0.15f,0.15f);1431 renderer->setGlobalColor(0.15f, 0.15f, 0.15f);
1405 gluDisk(quadric, inner - 1.0, inner, 256, 1);1432 disc->setInnerOuterRadius(inner - 1.0f, inner);
1406 gluDeleteQuadric(quadric);1433 disc->draw(renderer);
1407 glPopMatrix();1434 delete disc;
1408}1435}
14091436
1410void Oculars::paintText(const StelCore* core)1437void Oculars::paintText(const StelCore* core, StelRenderer* renderer)
1411{1438{
1412 const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);1439 const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);
1413 StelPainter painter(prj);
14141440
1415 // Get the current instruments1441 // Get the current instruments
1416 CCD *ccd = NULL;1442 CCD *ccd = NULL;
@@ -1420,22 +1446,20 @@
1420 Ocular *ocular = oculars[selectedOcularIndex];1446 Ocular *ocular = oculars[selectedOcularIndex];
1421 Telescope *telescope = telescopes[selectedTelescopeIndex];1447 Telescope *telescope = telescopes[selectedTelescopeIndex];
14221448
1423 // set up the color and the GL state1449 // set up drawing
1424 painter.setColor(0.8, 0.48, 0.0, 1);1450 renderer->setGlobalColor(0.8f, 0.48f, 0.0f);
1425 glDisable(GL_TEXTURE_2D);1451 renderer->setBlendMode(BlendMode_Alpha);
1426 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1427 glEnable(GL_BLEND);
14281452
1429 // Get the X & Y positions, and the line height1453 // Get the X & Y positions, and the line height
1430 painter.setFont(font);1454 renderer->setFont(font);
1431 QString widthString = "MMMMMMMMMMMMMMMMMMM";1455 QString widthString = "MMMMMMMMMMMMMMMMMMM";
1432 float insetFromRHS = painter.getFontMetrics().width(widthString);1456 const float insetFromRHS = QFontMetrics(font).width(widthString);
1433 StelProjector::StelProjectorParams projectorParams = core->getCurrentStelProjectorParams();1457 StelProjector::StelProjectorParams projectorParams = core->getCurrentStelProjectorParams();
1434 int xPosition = projectorParams.viewportXywh[2];1458 int xPosition = projectorParams.viewportXywh[2];
1435 xPosition -= insetFromRHS;1459 xPosition -= insetFromRHS;
1436 int yPosition = projectorParams.viewportXywh[3];1460 int yPosition = projectorParams.viewportXywh[3];
1437 yPosition -= 40;1461 yPosition -= 40;
1438 const int lineHeight = painter.getFontMetrics().height();1462 const int lineHeight = QFontMetrics(font).height();
1439 1463
1440 1464
1441 // The Ocular1465 // The Ocular
@@ -1457,22 +1481,22 @@
1457 if (name.length() > widthString.length()) {1481 if (name.length() > widthString.length()) {
1458 xPosition -= (insetFromRHS / 2.0);1482 xPosition -= (insetFromRHS / 2.0);
1459 }1483 }
1460 painter.drawText(xPosition, yPosition, ocularNumberLabel);1484 renderer->drawText(TextParams(xPosition, yPosition, ocularNumberLabel));
1461 yPosition-=lineHeight;1485 yPosition-=lineHeight;
1462 1486
1463 if (!ocular->isBinoculars()) {1487 if (!ocular->isBinoculars()) {
1464 QString eFocalLength = QVariant(ocular->effectiveFocalLength()).toString();1488 QString eFocalLength = QVariant(ocular->effectiveFocalLength()).toString();
1465 // TRANSLATORS: FL = Focal length1489 // TRANSLATORS: FL = Focal length
1466 QString eFocalLengthLabel = QString(q_("Ocular FL: %1 mm")).arg(eFocalLength);1490 QString eFocalLengthLabel = QString(q_("Ocular FL: %1 mm")).arg(eFocalLength);
1467 painter.drawText(xPosition, yPosition, eFocalLengthLabel);1491 renderer->drawText(TextParams(xPosition, yPosition, eFocalLengthLabel));
1468 yPosition-=lineHeight;1492 yPosition-=lineHeight;
1469 1493
1470 QString ocularFov = QString::number(ocular->appearentFOV());1494 QString ocularFov = QString::number(ocular->appearentFOV());
1471 ocularFov.append(QChar(0x00B0));//Degree sign1495 ocularFov.append(QChar(0x00B0));//Degree sign
1472 // TRANSLATORS: aFOV = apparent field of view1496 // TRANSLATORS: aFOV = apparent field of view
1473 QString ocularFOVLabel = QString(q_("Ocular aFOV: %1"))1497 QString ocularFOVLabel = QString(q_("Ocular aFOV: %1"))
1474 .arg(ocularFov);1498 .arg(ocularFov);
1475 painter.drawText(xPosition, yPosition, ocularFOVLabel);1499 renderer->drawText(TextParams(xPosition, yPosition, ocularFOVLabel));
1476 yPosition-=lineHeight;1500 yPosition-=lineHeight;
1477 1501
1478 // The telescope1502 // The telescope
@@ -1489,7 +1513,7 @@
1489 .arg(selectedTelescopeIndex)1513 .arg(selectedTelescopeIndex)
1490 .arg(telescopeName);1514 .arg(telescopeName);
1491 }1515 }
1492 painter.drawText(xPosition, yPosition, telescopeNumberLabel);1516 renderer->drawText(TextParams(xPosition, yPosition, telescopeNumberLabel));
1493 yPosition-=lineHeight;1517 yPosition-=lineHeight;
1494 1518
1495 // General info1519 // General info
@@ -1498,14 +1522,14 @@
1498 magString.append(QChar(0x00D7));//Multiplication sign1522 magString.append(QChar(0x00D7));//Multiplication sign
1499 QString magnificationLabel = QString(q_("Magnification: %1"))1523 QString magnificationLabel = QString(q_("Magnification: %1"))
1500 .arg(magString);1524 .arg(magString);
1501 painter.drawText(xPosition, yPosition, magnificationLabel);1525 renderer->drawText(TextParams(xPosition, yPosition, magnificationLabel));
1502 yPosition-=lineHeight;1526 yPosition-=lineHeight;
1503 1527
1504 double fov = ((int)(ocular->actualFOV(telescope) * 10000.00)) / 10000.0;1528 double fov = ((int)(ocular->actualFOV(telescope) * 10000.00)) / 10000.0;
1505 QString fovString = QString::number(fov);1529 QString fovString = QString::number(fov);
1506 fovString.append(QChar(0x00B0));//Degree sign1530 fovString.append(QChar(0x00B0));//Degree sign
1507 QString fovLabel = QString(q_("FOV: %1")).arg(fovString);1531 QString fovLabel = QString(q_("FOV: %1")).arg(fovString);
1508 painter.drawText(xPosition, yPosition, fovLabel);1532 renderer->drawText(TextParams(xPosition, yPosition, fovLabel));
1509 }1533 }
1510 }1534 }
15111535
@@ -1527,9 +1551,9 @@
1527 .arg(selectedCCDIndex)1551 .arg(selectedCCDIndex)
1528 .arg(name);1552 .arg(name);
1529 }1553 }
1530 painter.drawText(xPosition, yPosition, ccdSensorLabel);1554 renderer->drawText(TextParams(xPosition, yPosition, ccdSensorLabel));
1531 yPosition-=lineHeight;1555 yPosition-=lineHeight;
1532 painter.drawText(xPosition, yPosition, ccdInfoLabel);1556 renderer->drawText(TextParams(xPosition, yPosition, ccdInfoLabel));
1533 yPosition-=lineHeight;1557 yPosition-=lineHeight;
15341558
1535 // The telescope1559 // The telescope
@@ -1546,7 +1570,7 @@
1546 .arg(selectedTelescopeIndex)1570 .arg(selectedTelescopeIndex)
1547 .arg(telescopeName);1571 .arg(telescopeName);
1548 }1572 }
1549 painter.drawText(xPosition, yPosition, telescopeNumberLabel);1573 renderer->drawText(TextParams(xPosition, yPosition, telescopeNumberLabel));
1550 }1574 }
1551 1575
1552}1576}
15531577
=== modified file 'plugins/Oculars/src/Oculars.hpp'
--- plugins/Oculars/src/Oculars.hpp 2012-07-06 17:00:39 +0000
+++ plugins/Oculars/src/Oculars.hpp 2012-08-30 16:29:19 +0000
@@ -62,7 +62,7 @@
62 virtual void init();62 virtual void init();
63 virtual void deinit();63 virtual void deinit();
64 virtual bool configureGui(bool show=true);64 virtual bool configureGui(bool show=true);
65 virtual void draw(StelCore* core);65 virtual void draw(StelCore* core, class StelRenderer* renderer);
66 virtual double getCallOrder(StelModuleActionName actionName) const;66 virtual double getCallOrder(StelModuleActionName actionName) const;
67 //! Returns the module-specific style sheet.67 //! Returns the module-specific style sheet.
68 //! The main StelStyle instance should be passed.68 //! The main StelStyle instance should be passed.
@@ -134,18 +134,18 @@
134 bool isBinocularDefined();134 bool isBinocularDefined();
135135
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.
137 void paintCCDBounds();137 void paintCCDBounds(class StelRenderer* renderer);
138 //! Renders crosshairs into the viewport.138 //! Renders crosshairs into the viewport.
139 void paintCrosshairs();139 void paintCrosshairs(class StelRenderer* renderer);
140 //! Paint the mask into the viewport.140 //! Paint the mask into the viewport.
141 void paintOcularMask();141 void paintOcularMask(class StelRenderer* renderer);
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.
143 void paintTelrad();143 void paintTelrad(class StelRenderer* renderer);
144144
145145
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.
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.
148 void paintText(const StelCore* core);148 void paintText(const StelCore* core, StelRenderer* renderer);
149149
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.
151 void unzoomOcular();151 void unzoomOcular();
152152
=== modified file 'plugins/Pulsars/src/Pulsar.cpp'
--- plugins/Pulsars/src/Pulsar.cpp 2012-08-08 10:11:01 +0000
+++ plugins/Pulsars/src/Pulsar.cpp 2012-08-30 16:29:19 +0000
@@ -19,27 +19,23 @@
19#include "Pulsar.hpp"19#include "Pulsar.hpp"
20#include "Pulsars.hpp"20#include "Pulsars.hpp"
21#include "StelObject.hpp"21#include "StelObject.hpp"
22#include "StelPainter.hpp"
23#include "StelApp.hpp"22#include "StelApp.hpp"
24#include "StelCore.hpp"23#include "StelCore.hpp"
25#include "StelTexture.hpp"
26#include "StelUtils.hpp"24#include "StelUtils.hpp"
27#include "StelTranslator.hpp"25#include "StelTranslator.hpp"
28#include "StelModuleMgr.hpp"26#include "StelModuleMgr.hpp"
29#include "StelSkyDrawer.hpp"27#include "StelSkyDrawer.hpp"
28#include "renderer/StelRenderer.hpp"
3029
31#include <QTextStream>30#include <QTextStream>
32#include <QDebug>31#include <QDebug>
33#include <QVariant>32#include <QVariant>
34#include <QtOpenGL>
35#include <QVariantMap>33#include <QVariantMap>
36#include <QVariant>34#include <QVariant>
37#include <QList>35#include <QList>
3836
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 */
4038
41StelTextureSP Pulsar::markerTexture;
42
43Pulsar::Pulsar(const QVariantMap& map)39Pulsar::Pulsar(const QVariantMap& map)
44 : initialized(false)40 : initialized(false)
45{41{
@@ -334,7 +330,8 @@
334 labelsFader.update((int)(deltaTime*1000));330 labelsFader.update((int)(deltaTime*1000));
335}331}
336332
337void Pulsar::draw(StelCore* core, StelPainter& painter)333void Pulsar::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector,
334 StelTextureNew* markerTexture)
338{335{
339 StelSkyDrawer* sd = core->getSkyDrawer(); 336 StelSkyDrawer* sd = core->getSkyDrawer();
340337
@@ -345,27 +342,26 @@
345 double mag = getVMagnitude(core, true);342 double mag = getVMagnitude(core, true);
346343
347 StelUtils::spheToRect(RA, DE, XYZ); 344 StelUtils::spheToRect(RA, DE, XYZ);
348 glEnable(GL_BLEND);345 renderer->setBlendMode(BlendMode_Add);
349 glBlendFunc(GL_ONE, GL_ONE);346 renderer->setGlobalColor(color[0], color[1], color[2]);
350 painter.setColor(color[0], color[1], color[2], 1);
351347
352 if (mag <= sd->getLimitMagnitude())348 if (mag <= sd->getLimitMagnitude())
353 {349 {
354350 markerTexture->bind();
355 Pulsar::markerTexture->bind();351 const float size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
356 float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();352 const float shift = 5.f + size/1.6f;
357 float shift = 5.f + size/1.6f;
358 if (labelsFader.getInterstate()<=0.f)353 if (labelsFader.getInterstate()<=0.f)
359 {354 {
355 Vec3d win;
356 if(!projector->project(XYZ, win)){return;}
360 if (GETSTELMODULE(Pulsars)->getDisplayMode())357 if (GETSTELMODULE(Pulsars)->getDisplayMode())
361 {358 {
362 painter.drawSprite2dMode(XYZ, 4);359 renderer->drawTexturedRect(win[0] - 4, win[1] - 4, 8, 8);
363 painter.drawText(XYZ, " ", 0, shift, shift, false);
364 }360 }
365 else361 else
366 {362 {
367 painter.drawSprite2dMode(XYZ, 5);363 renderer->drawTexturedRect(win[0] - 5, win[1] - 5, 10, 10);
368 painter.drawText(XYZ, designation, 0, shift, shift, false);364 renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
369 }365 }
370 }366 }
371 }367 }
372368
=== modified file 'plugins/Pulsars/src/Pulsar.hpp'
--- plugins/Pulsars/src/Pulsar.hpp 2012-05-20 11:10:52 +0000
+++ plugins/Pulsars/src/Pulsar.hpp 2012-08-30 16:29:19 +0000
@@ -27,11 +27,10 @@
27#include <QDateTime>27#include <QDateTime>
2828
29#include "StelObject.hpp"29#include "StelObject.hpp"
30#include "StelTextureTypes.hpp"30#include "StelProjectorType.hpp"
31#include "StelPainter.hpp"31
32#include "StelFader.hpp"32#include "StelFader.hpp"
3333
34class StelPainter;
3534
36//! @class Pulsar35//! @class Pulsar
37//! A Pulsar object represents one pulsar on the sky.36//! A Pulsar object represents one pulsar on the sky.
@@ -88,10 +87,8 @@
8887
89 Vec3d XYZ; // holds J2000 position 88 Vec3d XYZ; // holds J2000 position
9089
91 static StelTextureSP hintTexture;90 void draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector,
92 static StelTextureSP markerTexture;91 class StelTextureNew* markerTexture);
93
94 void draw(StelCore* core, StelPainter& painter);
9592
96 //! Variables for description of properties of pulsars93 //! Variables for description of properties of pulsars
97 QString designation; //! The designation of the pulsar (J2000 pulsar name)94 QString designation; //! The designation of the pulsar (J2000 pulsar name)
9895
=== modified file 'plugins/Pulsars/src/Pulsars.cpp'
--- plugins/Pulsars/src/Pulsars.cpp 2012-06-17 08:17:55 +0000
+++ plugins/Pulsars/src/Pulsars.cpp 2012-08-30 16:29:19 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelGui.hpp"22#include "StelGui.hpp"
@@ -25,7 +24,6 @@
25#include "StelLocaleMgr.hpp"24#include "StelLocaleMgr.hpp"
26#include "StelModuleMgr.hpp"25#include "StelModuleMgr.hpp"
27#include "StelObjectMgr.hpp"26#include "StelObjectMgr.hpp"
28#include "StelTextureMgr.hpp"
29#include "StelJsonParser.hpp"27#include "StelJsonParser.hpp"
30#include "StelFileMgr.hpp"28#include "StelFileMgr.hpp"
31#include "StelUtils.hpp"29#include "StelUtils.hpp"
@@ -34,6 +32,7 @@
34#include "Pulsar.hpp"32#include "Pulsar.hpp"
35#include "Pulsars.hpp"33#include "Pulsars.hpp"
36#include "PulsarsDialog.hpp"34#include "PulsarsDialog.hpp"
35#include "renderer/StelRenderer.hpp"
3736
38#include <QNetworkAccessManager>37#include <QNetworkAccessManager>
39#include <QNetworkReply>38#include <QNetworkReply>
@@ -47,6 +46,7 @@
47#include <QVariantMap>46#include <QVariantMap>
48#include <QVariant>47#include <QVariant>
49#include <QList>48#include <QList>
49#include <QSettings>
50#include <QSharedPointer>50#include <QSharedPointer>
51#include <QStringList>51#include <QStringList>
5252
@@ -81,7 +81,9 @@
81 Constructor81 Constructor
82*/82*/
83Pulsars::Pulsars()83Pulsars::Pulsars()
84 : progressBar(NULL)84 : texPointer(NULL)
85 , markerTexture(NULL)
86 , progressBar(NULL)
85{87{
86 setObjectName("Pulsars");88 setObjectName("Pulsars");
87 configDialog = new PulsarsDialog();89 configDialog = new PulsarsDialog();
@@ -100,8 +102,14 @@
100void Pulsars::deinit()102void Pulsars::deinit()
101{103{
102 psr.clear();104 psr.clear();
103 Pulsar::markerTexture.clear();105 if(NULL != markerTexture)
104 texPointer.clear();106 {
107 delete markerTexture;
108 }
109 if(NULL != texPointer)
110 {
111 delete texPointer;
112 }
105}113}
106114
107/*115/*
@@ -136,9 +144,6 @@
136144
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";
138146
139 texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
140 Pulsar::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Pulsars/pulsar.png");
141
142 // key bindings and other actions147 // key bindings and other actions
143 // TRANSLATORS: Title of a group of key bindings in the Help window148 // TRANSLATORS: Title of a group of key bindings in the Help window
144 QString groupName = N_("Plugin Key Bindings");149 QString groupName = N_("Plugin Key Bindings");
@@ -195,27 +200,31 @@
195/*200/*
196 Draw our module. This should print name of first PSR in the main window201 Draw our module. This should print name of first PSR in the main window
197*/202*/
198void Pulsars::draw(StelCore* core)203void Pulsars::draw(StelCore* core, StelRenderer* renderer)
199{204{
200 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);205 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
201 StelPainter painter(prj);206 renderer->setFont(font);
202 painter.setFont(font);
203 207
204 foreach (const PulsarP& pulsar, psr)208 foreach (const PulsarP& pulsar, psr)
205 {209 {
206 if (pulsar && pulsar->initialized)210 if (pulsar && pulsar->initialized)
207 pulsar->draw(core, painter);211 {
212 if(NULL == markerTexture)
213 {
214 markerTexture = renderer->createTexture(":/Pulsars/pulsar.png");
215 }
216 pulsar->draw(core, renderer, prj, markerTexture);
217 }
208 }218 }
209219
210 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())220 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
211 drawPointer(core, painter);221 {
212222 drawPointer(core, renderer, prj);
223 }
213}224}
214225
215void Pulsars::drawPointer(StelCore* core, StelPainter& painter)226void Pulsars::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
216{227{
217 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
218
219 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Pulsar");228 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Pulsar");
220 if (!newSelected.empty())229 if (!newSelected.empty())
221 {230 {
@@ -224,16 +233,21 @@
224233
225 Vec3d screenpos;234 Vec3d screenpos;
226 // Compute 2D pos and return if outside screen235 // Compute 2D pos and return if outside screen
227 if (!painter.getProjector()->project(pos, screenpos))236 if (!projector->project(pos, screenpos))
228 return;237 {
238 return;
239 }
229240
230 const Vec3f& c(obj->getInfoColor());241 const Vec3f& c(obj->getInfoColor());
231 painter.setColor(c[0],c[1],c[2]);242 renderer->setGlobalColor(c[0], c[1], c[2]);
243 if(NULL == texPointer)
244 {
245 texPointer = renderer->createTexture("textures/pointeur2.png");
246 }
232 texPointer->bind();247 texPointer->bind();
233 painter.enableTexture2d(true);248 renderer->setBlendMode(BlendMode_Alpha);
234 glEnable(GL_BLEND);249 renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, 26.0f,
235 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode250 StelApp::getInstance().getTotalRunTime() * 40.0f);
236 painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
237 }251 }
238}252}
239253
240254
=== modified file 'plugins/Pulsars/src/Pulsars.hpp'
--- plugins/Pulsars/src/Pulsars.hpp 2012-06-17 08:17:55 +0000
+++ plugins/Pulsars/src/Pulsars.hpp 2012-08-30 16:29:19 +0000
@@ -22,8 +22,6 @@
22#include "StelObjectModule.hpp"22#include "StelObjectModule.hpp"
23#include "StelObject.hpp"23#include "StelObject.hpp"
24#include "StelFader.hpp"24#include "StelFader.hpp"
25#include "StelTextureTypes.hpp"
26#include "StelPainter.hpp"
27#include "Pulsar.hpp"25#include "Pulsar.hpp"
28#include <QFont>26#include <QFont>
29#include <QVariantMap>27#include <QVariantMap>
@@ -38,7 +36,6 @@
38class QTimer;36class QTimer;
39class PulsarsDialog;37class PulsarsDialog;
4038
41class StelPainter;
4239
43typedef QSharedPointer<Pulsar> PulsarP;40typedef QSharedPointer<Pulsar> PulsarP;
4441
@@ -65,8 +62,8 @@
65 virtual void init();62 virtual void init();
66 virtual void deinit();63 virtual void deinit();
67 virtual void update(double) {;}64 virtual void update(double) {;}
68 virtual void draw(StelCore* core);65 virtual void draw(StelCore* core, class StelRenderer* renderer);
69 virtual void drawPointer(StelCore* core, StelPainter& painter);66 virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
70 virtual double getCallOrder(StelModuleActionName actionName) const;67 virtual double getCallOrder(StelModuleActionName actionName) const;
7168
72 ///////////////////////////////////////////////////////////////////////////69 ///////////////////////////////////////////////////////////////////////////
@@ -180,7 +177,8 @@
180177
181 QString jsonCatalogPath;178 QString jsonCatalogPath;
182179
183 StelTextureSP texPointer;180 class StelTextureNew* texPointer;
181 class StelTextureNew* markerTexture;
184 QList<PulsarP> psr;182 QList<PulsarP> psr;
185183
186 // variables and functions for the updater184 // variables and functions for the updater
187185
=== modified file 'plugins/Quasars/src/Quasar.cpp'
--- plugins/Quasars/src/Quasar.cpp 2012-08-08 10:11:01 +0000
+++ plugins/Quasars/src/Quasar.cpp 2012-08-30 16:29:19 +0000
@@ -19,24 +19,21 @@
19#include "Quasar.hpp"19#include "Quasar.hpp"
20#include "Quasars.hpp"20#include "Quasars.hpp"
21#include "StelObject.hpp"21#include "StelObject.hpp"
22#include "StelPainter.hpp"
23#include "StelApp.hpp"22#include "StelApp.hpp"
24#include "StelCore.hpp"23#include "StelCore.hpp"
25#include "StelTexture.hpp"
26#include "StelUtils.hpp"24#include "StelUtils.hpp"
27#include "StelTranslator.hpp"25#include "StelTranslator.hpp"
28#include "StelModuleMgr.hpp"26#include "StelModuleMgr.hpp"
29#include "StelSkyDrawer.hpp"27#include "StelSkyDrawer.hpp"
28#include "renderer/StelRenderer.hpp"
3029
31#include <QTextStream>30#include <QTextStream>
32#include <QDebug>31#include <QDebug>
33#include <QVariant>32#include <QVariant>
34#include <QtOpenGL>
35#include <QVariantMap>33#include <QVariantMap>
36#include <QVariant>34#include <QVariant>
37#include <QList>35#include <QList>
3836
39StelTextureSP Quasar::markerTexture;
4037
41Quasar::Quasar(const QVariantMap& map)38Quasar::Quasar(const QVariantMap& map)
42 : initialized(false)39 : initialized(false)
@@ -170,11 +167,11 @@
170 labelsFader.update((int)(deltaTime*1000));167 labelsFader.update((int)(deltaTime*1000));
171}168}
172169
173void Quasar::draw(StelCore* core, StelPainter& painter)170void Quasar::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector, StelTextureNew* markerTexture)
174{171{
175 StelSkyDrawer* sd = core->getSkyDrawer();172 StelSkyDrawer* sd = core->getSkyDrawer();
176173
177 Vec3f color = sd->indexToColor(BvToColorIndex(bV))*0.75f;174 const Vec3f color = sd->indexToColor(BvToColorIndex(bV))*0.75f;
178 Vec3f dcolor = Vec3f(1.2f,0.5f,0.4f);175 Vec3f dcolor = Vec3f(1.2f,0.5f,0.4f);
179 if (StelApp::getInstance().getVisionModeNight())176 if (StelApp::getInstance().getVisionModeNight())
180 dcolor = StelUtils::getNightColor(dcolor);177 dcolor = StelUtils::getNightColor(dcolor);
@@ -183,42 +180,42 @@
183 double mag;180 double mag;
184181
185 StelUtils::spheToRect(qRA, qDE, XYZ);182 StelUtils::spheToRect(qRA, qDE, XYZ);
186 mag = getVMagnitude(core, true); 183 mag = getVMagnitude(core, true);
187184
188 if (GETSTELMODULE(Quasars)->getDisplayMode())185 if (GETSTELMODULE(Quasars)->getDisplayMode())
189 {186 {
190 glEnable(GL_BLEND);187 renderer->setBlendMode(BlendMode_Add);
191 glBlendFunc(GL_ONE, GL_ONE);188 renderer->setGlobalColor(dcolor[0], dcolor[1], dcolor[2], 1);
192 painter.setColor(dcolor[0], dcolor[1], dcolor[2], 1);189 size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
193
194 Quasar::markerTexture->bind();
195 size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
196 shift = 5.f + size/1.6f;190 shift = 5.f + size/1.6f;
191 markerTexture->bind();
197 if (labelsFader.getInterstate()<=0.f)192 if (labelsFader.getInterstate()<=0.f)
198 {193 {
199 painter.drawSprite2dMode(XYZ, 4);194 Vec3d win;
200 painter.drawText(XYZ, " ", 0, shift, shift, false);195 if(projector->project(XYZ, win))
196 {
197 renderer->drawTexturedRect(win[0] - 4, win[1] - 4, 8, 8);
198 }
201 }199 }
202 }200 }
203 else201 else
204 {202 {
205 sd->preDrawPointSource(&painter);203 sd->preDrawPointSource();
206 204
207 if (mag <= sd->getLimitMagnitude())205 if (mag <= sd->getLimitMagnitude())
208 {206 {
209 sd->computeRCMag(mag, rcMag);207 sd->computeRCMag(mag, rcMag);
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);
211 sd->drawPointSource(&painter, XYZ, rcMag, sd->indexToColor(BvToColorIndex(bV)), false);209 renderer->setGlobalColor(color[0], color[1], color[2], 1.0f);
212 painter.setColor(color[0], color[1], color[2], 1);210 size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
213 size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
214 shift = 6.f + size/1.8f;211 shift = 6.f + size/1.8f;
215 if (labelsFader.getInterstate()<=0.f)212 if (labelsFader.getInterstate()<=0.f)
216 {213 {
217 painter.drawText(XYZ, designation, 0, shift, shift, false);214 renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
218 }215 }
219 }216 }
220217
221 sd->postDrawPointSource(&painter);218 sd->postDrawPointSource(projector);
222 }219 }
223}220}
224221
225222
=== modified file 'plugins/Quasars/src/Quasar.hpp'
--- plugins/Quasars/src/Quasar.hpp 2012-06-17 08:33:36 +0000
+++ plugins/Quasars/src/Quasar.hpp 2012-08-30 16:29:19 +0000
@@ -27,11 +27,9 @@
27#include <QDateTime>27#include <QDateTime>
2828
29#include "StelObject.hpp"29#include "StelObject.hpp"
30#include "StelTextureTypes.hpp"
31#include "StelPainter.hpp"
32#include "StelFader.hpp"30#include "StelFader.hpp"
31#include "StelProjectorType.hpp"
3332
34class StelPainter;
3533
36//! @class Quasar34//! @class Quasar
37//! A Quasar object represents one Quasar on the sky.35//! A Quasar object represents one Quasar on the sky.
@@ -83,10 +81,9 @@
8381
84 Vec3d XYZ; // holds J2000 position82 Vec3d XYZ; // holds J2000 position
8583
86 static StelTextureSP hintTexture;84 void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector,
87 static StelTextureSP markerTexture;85 class StelTextureNew* markerTexture);
8886
89 void draw(StelCore* core, StelPainter& painter);
90 //! Calculate a color of quasar87 //! Calculate a color of quasar
91 //! @param b_v value of B-V color index88 //! @param b_v value of B-V color index
92 unsigned char BvToColorIndex(float b_v);89 unsigned char BvToColorIndex(float b_v);
9390
=== modified file 'plugins/Quasars/src/Quasars.cpp'
--- plugins/Quasars/src/Quasars.cpp 2012-06-17 08:33:36 +0000
+++ plugins/Quasars/src/Quasars.cpp 2012-08-30 16:29:19 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelGui.hpp"22#include "StelGui.hpp"
@@ -25,7 +24,6 @@
25#include "StelLocaleMgr.hpp"24#include "StelLocaleMgr.hpp"
26#include "StelModuleMgr.hpp"25#include "StelModuleMgr.hpp"
27#include "StelObjectMgr.hpp"26#include "StelObjectMgr.hpp"
28#include "StelTextureMgr.hpp"
29#include "StelJsonParser.hpp"27#include "StelJsonParser.hpp"
30#include "StelFileMgr.hpp"28#include "StelFileMgr.hpp"
31#include "StelUtils.hpp"29#include "StelUtils.hpp"
@@ -33,6 +31,7 @@
33#include "LabelMgr.hpp"31#include "LabelMgr.hpp"
34#include "Quasar.hpp"32#include "Quasar.hpp"
35#include "Quasars.hpp"33#include "Quasars.hpp"
34#include "renderer/StelRenderer.hpp"
36#include "QuasarsDialog.hpp"35#include "QuasarsDialog.hpp"
3736
38#include <QNetworkAccessManager>37#include <QNetworkAccessManager>
@@ -41,14 +40,15 @@
41#include <QAction>40#include <QAction>
42#include <QProgressBar>41#include <QProgressBar>
43#include <QDebug>42#include <QDebug>
43#include <QFile>
44#include <QFileInfo>44#include <QFileInfo>
45#include <QFile>
46#include <QTimer>45#include <QTimer>
47#include <QVariantMap>
48#include <QVariant>
49#include <QList>46#include <QList>
47#include <QSettings>
50#include <QSharedPointer>48#include <QSharedPointer>
51#include <QStringList>49#include <QStringList>
50#include <QVariant>
51#include <QVariantMap>
5252
53#define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */53#define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */
5454
@@ -81,7 +81,9 @@
81 Constructor81 Constructor
82*/82*/
83Quasars::Quasars()83Quasars::Quasars()
84 : progressBar(NULL)84 : texPointer(NULL)
85 , markerTexture(NULL)
86 , progressBar(NULL)
85{87{
86 setObjectName("Quasars");88 setObjectName("Quasars");
87 configDialog = new QuasarsDialog();89 configDialog = new QuasarsDialog();
@@ -99,9 +101,10 @@
99101
100void Quasars::deinit()102void Quasars::deinit()
101{103{
104 if(NULL != texPointer) {delete texPointer;}
105 if(NULL != markerTexture) {delete markerTexture;}
106 texPointer = markerTexture = NULL;
102 QSO.clear();107 QSO.clear();
103 Quasar::markerTexture.clear();
104 texPointer.clear();
105}108}
106109
107/*110/*
@@ -136,9 +139,6 @@
136139
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";
138141
139 texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
140 Quasar::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Quasars/quasar.png");
141
142 // key bindings and other actions142 // key bindings and other actions
143 // TRANSLATORS: Title of a group of key bindings in the Help window143 // TRANSLATORS: Title of a group of key bindings in the Help window
144 QString groupName = N_("Plugin Key Bindings");144 QString groupName = N_("Plugin Key Bindings");
@@ -195,45 +195,55 @@
195/*195/*
196 Draw our module. This should print name of first QSO in the main window196 Draw our module. This should print name of first QSO in the main window
197*/197*/
198void Quasars::draw(StelCore* core)198void Quasars::draw(StelCore* core, class StelRenderer* renderer)
199{199{
200 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);200 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
201 StelPainter painter(prj);201 renderer->setFont(font);
202 painter.setFont(font);202
203 if(NULL == markerTexture)
204 {
205 markerTexture = renderer->createTexture(":/Quasars/quasar.png");
206 }
203 207
204 foreach (const QuasarP& quasar, QSO)208 foreach (const QuasarP& quasar, QSO)
205 {209 {
206 if (quasar && quasar->initialized)210 if (quasar && quasar->initialized)
207 quasar->draw(core, painter);211 {
212 quasar->draw(core, renderer, prj, markerTexture);
213 }
208 }214 }
209215
210 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())216 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
211 drawPointer(core, painter);217 {
212218 drawPointer(core, renderer, prj);
219 }
213}220}
214221
215void Quasars::drawPointer(StelCore* core, StelPainter& painter)222void Quasars::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
216{223{
217 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
218
219 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Quasar");224 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Quasar");
220 if (!newSelected.empty())225 if (!newSelected.empty())
221 {226 {
222 const StelObjectP obj = newSelected[0];227 const StelObjectP obj = newSelected[0];
223 Vec3d pos=obj->getJ2000EquatorialPos(core);228 Vec3d pos=obj->getJ2000EquatorialPos(core);
224229
225 Vec3d screenpos;230 Vec3d screenPos;
226 // Compute 2D pos and return if outside screen231 // Compute 2D pos and return if outside screen
227 if (!painter.getProjector()->project(pos, screenpos))232 if (!projector->project(pos, screenPos))
233 {
228 return;234 return;
235 }
236 if(NULL == texPointer)
237 {
238 texPointer = renderer->createTexture("textures/pointeur2.png");
239 }
229240
230 const Vec3f& c(obj->getInfoColor());241 const Vec3f& c(obj->getInfoColor());
231 painter.setColor(c[0],c[1],c[2]);242 renderer->setGlobalColor(c[0], c[1], c[2]);
232 texPointer->bind();243 texPointer->bind();
233 painter.enableTexture2d(true);244 renderer->setBlendMode(BlendMode_Alpha);
234 glEnable(GL_BLEND);245 renderer->drawTexturedRect(screenPos[0] - 13.0f, screenPos[1] - 13.0f, 26.0f, 26.0f,
235 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode246 StelApp::getInstance().getTotalRunTime() * 40.0f);
236 painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
237 }247 }
238}248}
239249
240250
=== modified file 'plugins/Quasars/src/Quasars.hpp'
--- plugins/Quasars/src/Quasars.hpp 2012-06-17 08:33:36 +0000
+++ plugins/Quasars/src/Quasars.hpp 2012-08-30 16:29:19 +0000
@@ -21,8 +21,6 @@
2121
22#include "StelObjectModule.hpp"22#include "StelObjectModule.hpp"
23#include "StelObject.hpp"23#include "StelObject.hpp"
24#include "StelTextureTypes.hpp"
25#include "StelPainter.hpp"
26#include "Quasar.hpp"24#include "Quasar.hpp"
27#include <QFont>25#include <QFont>
28#include <QVariantMap>26#include <QVariantMap>
@@ -30,7 +28,6 @@
30#include <QList>28#include <QList>
31#include <QSharedPointer>29#include <QSharedPointer>
3230
33class StelPainter;
3431
35class QNetworkAccessManager;32class QNetworkAccessManager;
36class QNetworkReply;33class QNetworkReply;
@@ -64,8 +61,8 @@
64 virtual void init();61 virtual void init();
65 virtual void deinit();62 virtual void deinit();
66 virtual void update(double) {;}63 virtual void update(double) {;}
67 virtual void draw(StelCore* core);64 virtual void draw(StelCore* core, class StelRenderer* renderer);
68 virtual void drawPointer(StelCore* core, StelPainter& painter);65 virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
69 virtual double getCallOrder(StelModuleActionName actionName) const;66 virtual double getCallOrder(StelModuleActionName actionName) const;
7067
71 ///////////////////////////////////////////////////////////////////////////68 ///////////////////////////////////////////////////////////////////////////
@@ -179,7 +176,8 @@
179176
180 QString catalogJsonPath;177 QString catalogJsonPath;
181178
182 StelTextureSP texPointer;179 class StelTextureNew* texPointer;
180 class StelTextureNew* markerTexture;
183 QList<QuasarP> QSO;181 QList<QuasarP> QSO;
184182
185 // variables and functions for the updater183 // variables and functions for the updater
186184
=== modified file 'plugins/Satellites/src/Satellite.cpp'
--- plugins/Satellites/src/Satellite.cpp 2012-08-25 10:58:23 +0000
+++ plugins/Satellites/src/Satellite.cpp 2012-08-30 16:29:19 +0000
@@ -19,20 +19,21 @@
1919
20#include "Satellite.hpp"20#include "Satellite.hpp"
21#include "StelObject.hpp"21#include "StelObject.hpp"
22#include "StelPainter.hpp"
23#include "StelApp.hpp"22#include "StelApp.hpp"
24#include "StelLocation.hpp"23#include "StelLocation.hpp"
25#include "StelCore.hpp"24#include "StelCore.hpp"
26#include "StelTexture.hpp"
27#include "VecMath.hpp"25#include "VecMath.hpp"
28#include "StelUtils.hpp"26#include "StelUtils.hpp"
29#include "StelTranslator.hpp"27#include "StelTranslator.hpp"
28#include "renderer/StelCircleArcRenderer.hpp"
29#include "renderer/StelRenderer.hpp"
30#include "renderer/StelTextureNew.hpp"
31
3032
31#include <QTextStream>33#include <QTextStream>
32#include <QRegExp>34#include <QRegExp>
33#include <QDebug>35#include <QDebug>
34#include <QVariant>36#include <QVariant>
35#include <QtOpenGL>
36#include <QSettings>37#include <QSettings>
37#include <QByteArray>38#include <QByteArray>
3839
@@ -41,7 +42,6 @@
41#include <cmath>42#include <cmath>
4243
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)
44StelTextureSP Satellite::hintTexture;
45float Satellite::showLabels = true;45float Satellite::showLabels = true;
46float Satellite::hintBrightness = 0.0;46float Satellite::hintBrightness = 0.0;
47float Satellite::hintScale = 1.f;47float Satellite::hintScale = 1.f;
@@ -476,47 +476,45 @@
476 return year + 1900;476 return year + 1900;
477}477}
478478
479void Satellite::draw(const StelCore* core, StelPainter& painter, float)479void Satellite::draw(const StelCore* core, StelRenderer* renderer,
480 StelProjectorP projector, StelTextureNew* hintTexture)
480{481{
481 if (core->getJDay() < jdLaunchYearJan1) return;482 if (core->getJDay() < jdLaunchYearJan1) return;
482483
483 XYZ = getJ2000EquatorialPos(core);484 XYZ = getJ2000EquatorialPos(core);
484 Vec3f drawColor;485 Vec3f drawColor;
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;
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()
487488 ? renderer->setGlobalColor(0.6,0.0,0.0,1.0)
488 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);489 : renderer->setGlobalColor(drawColor[0],drawColor[1],drawColor[2], Satellite::hintBrightness);
489490
490 Vec3d xy;491 Vec3d xy;
491 if (prj->project(XYZ,xy))492 if (core->getProjection(StelCore::FrameJ2000)->project(XYZ,xy))
492 {493 {
493 if (Satellite::showLabels)494 if (Satellite::showLabels)
494 {495 {
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());
496 Satellite::hintTexture->bind();
497 }497 }
498 painter.drawSprite2dMode(xy[0], xy[1], 11);498 renderer->drawTexturedRect(xy[0] - 11, xy[1] - 11, 22, 22);
499499
500 if (orbitVisible && Satellite::orbitLinesFlag) drawOrbit(painter);500 if (orbitVisible && Satellite::orbitLinesFlag) {drawOrbit(renderer, projector);}
501 }501 }
502}502}
503503
504504
505void Satellite::drawOrbit(StelPainter& painter)505void Satellite::drawOrbit(StelRenderer* renderer, StelProjectorP projector)
506{506{
507 Vec3d position,previousPosition;507 Vec3d position,previousPosition;
508508
509 glDisable(GL_TEXTURE_2D);
510
511 QList<Vec3d>::iterator it= orbitPoints.begin();509 QList<Vec3d>::iterator it= orbitPoints.begin();
512510
513 //First point projection calculation511 //First point projection calculation
514 previousPosition.set(it->operator [](0), it->operator [](1), it->operator [](2));512 previousPosition.set(it->operator [](0), it->operator [](1), it->operator [](2));
515513
516 it++;514 it++;
517 StelVertexArray vertexArray;
518 vertexArray.primitiveType=StelVertexArray::Lines;
519515
516 QVector<Vec3d> orbitArcPoints;
517 StelCircleArcRenderer circleArcRenderer(renderer, projector);
520 //Rest of points518 //Rest of points
521 for (int i=1; i<orbitPoints.size(); i++)519 for (int i=1; i<orbitPoints.size(); i++)
522 {520 {
@@ -528,21 +526,21 @@
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.
529 if (i<=orbitLineFadeSegments || orbitLineSegments-i < orbitLineFadeSegments)527 if (i<=orbitLineFadeSegments || orbitLineSegments-i < orbitLineFadeSegments)
530 {528 {
531 painter.setColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], hintBrightness * calculateOrbitSegmentIntensity(i));529 renderer->setGlobalColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2],
532 painter.drawGreatCircleArc(previousPosition, position, &viewportHalfspace);530 hintBrightness * calculateOrbitSegmentIntensity(i));
531 circleArcRenderer.drawGreatCircleArc(previousPosition, position, &viewportHalfspace);
533 }532 }
534 else533 else
535 {534 {
536 vertexArray.vertex << previousPosition << position;535 orbitArcPoints << previousPosition << position;
537 }536 }
538 previousPosition = position;537 previousPosition = position;
539 }538 }
540539
541 // Draw center section of orbit in one go540 // Draw center section of orbit in one go
542 painter.setColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], hintBrightness);541 renderer->setGlobalColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2],
543 painter.drawGreatCircleArcs(vertexArray, &viewportHalfspace);542 hintBrightness);
544543 circleArcRenderer.drawGreatCircleArcs(orbitArcPoints, PrimitiveType_Lines, &viewportHalfspace);
545 glEnable(GL_TEXTURE_2D);
546}544}
547545
548546
549547
=== modified file 'plugins/Satellites/src/Satellite.hpp'
--- plugins/Satellites/src/Satellite.hpp 2012-08-25 10:58:23 +0000
+++ plugins/Satellites/src/Satellite.hpp 2012-08-30 16:29:19 +0000
@@ -28,14 +28,12 @@
28#include <QDateTime>28#include <QDateTime>
2929
30#include "StelObject.hpp"30#include "StelObject.hpp"
31#include "StelTextureTypes.hpp"
32#include "StelSphereGeometry.hpp"31#include "StelSphereGeometry.hpp"
32#include "StelProjectorType.hpp"
3333
34#include "StelPainter.hpp"
35#include "gSatWrapper.hpp"34#include "gSatWrapper.hpp"
3635
3736
38class StelPainter;
39class StelLocation;37class StelLocation;
4038
41typedef struct39typedef struct
@@ -120,7 +118,7 @@
120private:118private:
121 //draw orbits methods119 //draw orbits methods
122 void computeOrbitPoints();120 void computeOrbitPoints();
123 void drawOrbit(StelPainter& painter);121 void drawOrbit(class StelRenderer* renderer, StelProjectorP projector);
124 //! returns 0 - 1.0 for the DRAWORBIT_FADE_NUMBER segments at122 //! returns 0 - 1.0 for the DRAWORBIT_FADE_NUMBER segments at
125 //! each end of an orbit, with 1 in the middle.123 //! each end of an orbit, with 1 in the middle.
126 float calculateOrbitSegmentIntensity(int segNum);124 float calculateOrbitSegmentIntensity(int segNum);
@@ -155,7 +153,6 @@
155 QStringList groupIDs;153 QStringList groupIDs;
156 QDateTime lastUpdated;154 QDateTime lastUpdated;
157155
158 static StelTextureSP hintTexture;
159 static SphericalCap viewportHalfspace;156 static SphericalCap viewportHalfspace;
160 static float hintBrightness;157 static float hintBrightness;
161 static float hintScale;158 static float hintScale;
@@ -164,15 +161,16 @@
164 static int orbitLineSegmentDuration; //measured in seconds161 static int orbitLineSegmentDuration; //measured in seconds
165 static bool orbitLinesFlag;162 static bool orbitLinesFlag;
166163
167 void draw(const StelCore* core, StelPainter& painter, float maxMagHints);164 void draw(const StelCore* core, class StelRenderer* renderer,
165 StelProjectorP projector, class StelTextureNew* hintTexture);
168166
169 //Satellite Orbit Position calculation167 //Satellite Orbit Position calculation
170 gSatWrapper *pSatWrapper;168 gSatWrapper *pSatWrapper;
171 Vec3d position;169 Vec3d position;
172 Vec3d velocity;170 Vec3d velocity;
173 Vec3d latLongSubPointPosition;171 Vec3d latLongSubPointPosition;
174 Vec3d elAzPosition;172 Vec3d elAzPosition;
175 int visibility;173 int visibility;
176174
177 //Satellite Orbit Draw175 //Satellite Orbit Draw
178 QFont font;176 QFont font;
179177
=== modified file 'plugins/Satellites/src/Satellites.cpp'
--- plugins/Satellites/src/Satellites.cpp 2012-08-25 09:46:49 +0000
+++ plugins/Satellites/src/Satellites.cpp 2012-08-30 16:29:19 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelGui.hpp"22#include "StelGui.hpp"
@@ -27,7 +26,6 @@
27#include "StelModuleMgr.hpp"26#include "StelModuleMgr.hpp"
28#include "StelLocaleMgr.hpp"27#include "StelLocaleMgr.hpp"
29#include "StelFileMgr.hpp"28#include "StelFileMgr.hpp"
30#include "StelTextureMgr.hpp"
31#include "StelIniParser.hpp"29#include "StelIniParser.hpp"
32#include "Satellites.hpp"30#include "Satellites.hpp"
33#include "Satellite.hpp"31#include "Satellite.hpp"
@@ -37,6 +35,7 @@
37#include "SatellitesDialog.hpp"35#include "SatellitesDialog.hpp"
38#include "LabelMgr.hpp"36#include "LabelMgr.hpp"
39#include "StelTranslator.hpp"37#include "StelTranslator.hpp"
38#include "renderer/StelRenderer.hpp"
4039
41#include <QNetworkAccessManager>40#include <QNetworkAccessManager>
42#include <QNetworkReply>41#include <QNetworkReply>
@@ -72,9 +71,16 @@
72Q_EXPORT_PLUGIN2(Satellites, SatellitesStelPluginInterface)71Q_EXPORT_PLUGIN2(Satellites, SatellitesStelPluginInterface)
7372
74Satellites::Satellites()73Satellites::Satellites()
75 : pxmapGlow(NULL), pxmapOnIcon(NULL), pxmapOffIcon(NULL), toolbarButton(NULL),74 : hintTexture(NULL)
76 earth(NULL), defaultHintColor(0.0, 0.4, 0.6), defaultOrbitColor(0.0, 0.3, 0.6),75 , texPointer(NULL)
77 progressBar(NULL)76 , pxmapGlow(NULL)
77 , pxmapOnIcon(NULL)
78 , pxmapOffIcon(NULL)
79 , toolbarButton(NULL)
80 , earth(NULL)
81 , defaultHintColor(0.0, 0.4, 0.6)
82 , defaultOrbitColor(0.0, 0.3, 0.6)
83 , progressBar(NULL)
78{84{
79 setObjectName("Satellites");85 setObjectName("Satellites");
80 configDialog = new SatellitesDialog();86 configDialog = new SatellitesDialog();
@@ -82,8 +88,14 @@
8288
83void Satellites::deinit()89void Satellites::deinit()
84{90{
85 Satellite::hintTexture.clear();91 if(NULL != hintTexture)
86 texPointer.clear();92 {
93 delete hintTexture;
94 }
95 if(NULL != texPointer)
96 {
97 delete texPointer;
98 }
87}99}
88100
89Satellites::~Satellites()101Satellites::~Satellites()
@@ -120,8 +132,6 @@
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";
121133
122 // Load and find resources used in the plugin134 // Load and find resources used in the plugin
123 texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur5.png");
124 Satellite::hintTexture = StelApp::getInstance().getTextureManager().createTexture(":/satellites/hint.png");
125135
126 // key bindings and other actions136 // key bindings and other actions
127 // TRANSLATORS: Title of a group of key bindings in the Help window137 // TRANSLATORS: Title of a group of key bindings in the Help window
@@ -1160,7 +1170,7 @@
1160 }1170 }
1161}1171}
11621172
1163void Satellites::draw(StelCore* core)1173void Satellites::draw(StelCore* core, StelRenderer* renderer)
1164{1174{
1165 if (core->getCurrentLocation().planetName != earth->getEnglishName() ||1175 if (core->getCurrentLocation().planetName != earth->getEnglishName() ||
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 ;-)
@@ -1168,26 +1178,32 @@
1168 return;1178 return;
11691179
1170 StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);1180 StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);
1171 StelPainter painter(prj);1181 renderer->setFont(labelFont);
1172 painter.setFont(labelFont);
1173 Satellite::hintBrightness = hintFader.getInterstate();1182 Satellite::hintBrightness = hintFader.getInterstate();
11741183
1175 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);1184 renderer->setBlendMode(BlendMode_Alpha);
1176 glEnable(GL_BLEND);1185
1177 glEnable(GL_TEXTURE_2D);1186 if(NULL == hintTexture)
1178 Satellite::hintTexture->bind();1187 {
1179 Satellite::viewportHalfspace = painter.getProjector()->getBoundingCap();1188 hintTexture = renderer->createTexture(":/satellites/hint.png");
1189 }
1190 hintTexture->bind();
1191 Satellite::viewportHalfspace = prj->getBoundingCap();
1180 foreach (const SatelliteP& sat, satellites)1192 foreach (const SatelliteP& sat, satellites)
1181 {1193 {
1182 if (sat && sat->initialized && sat->visible)1194 if (sat && sat->initialized && sat->visible)
1183 sat->draw(core, painter, 1.0);1195 {
1196 sat->draw(core, renderer, prj, hintTexture);
1197 }
1184 }1198 }
11851199
1186 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())1200 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
1187 drawPointer(core, painter);1201 {
1202 drawPointer(core, renderer);
1203 }
1188}1204}
11891205
1190void Satellites::drawPointer(StelCore* core, StelPainter& painter)1206void Satellites::drawPointer(StelCore* core, StelRenderer* renderer)
1191{1207{
1192 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);1208 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
11931209
@@ -1200,25 +1216,33 @@
12001216
1201 // Compute 2D pos and return if outside screen1217 // Compute 2D pos and return if outside screen
1202 if (!prj->project(pos, screenpos))1218 if (!prj->project(pos, screenpos))
1219 {
1203 return;1220 return;
1221 }
1222 if(NULL == texPointer)
1223 {
1224 texPointer = renderer->createTexture("textures/pointeur5.png");
1225 }
1204 if (StelApp::getInstance().getVisionModeNight())1226 if (StelApp::getInstance().getVisionModeNight())
1205 glColor3f(0.8f,0.0f,0.0f);1227 renderer->setGlobalColor(0.8f,0.0f,0.0f);
1206 else1228 else
1207 glColor3f(0.4f,0.5f,0.8f);1229 renderer->setGlobalColor(0.4f,0.5f,0.8f);
1208 texPointer->bind();1230 texPointer->bind();
12091231
1210 glEnable(GL_TEXTURE_2D);1232 renderer->setBlendMode(BlendMode_Alpha);
1211 glEnable(GL_BLEND);
1212 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
12131233
1214 // Size on screen1234 // Size on screen
1215 float size = obj->getAngularSize(core)*M_PI/180.*prj->getPixelPerRadAtCenter();1235 float size = obj->getAngularSize(core)*M_PI/180.*prj->getPixelPerRadAtCenter();
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());
1217 // size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getTotalRunTime());1237 const float halfSize = size * 0.5;
1218 painter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]-size/2, 20, 90);1238 const float left = screenpos[0] - halfSize - 20;
1219 painter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]+size/2, 20, 0);1239 const float right = screenpos[0] + halfSize - 20;
1220 painter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]+size/2, 20, -90);1240 const float top = screenpos[1] - halfSize - 20;
1221 painter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]-size/2, 20, -180);1241 const float bottom = screenpos[1] + halfSize - 20;
1242 renderer->drawTexturedRect(left, top, 40, 40, 90);
1243 renderer->drawTexturedRect(left, bottom, 40, 40, 0);
1244 renderer->drawTexturedRect(right, bottom, 40, 40, -90);
1245 renderer->drawTexturedRect(right, top, 40, 40, -180);
1222 }1246 }
1223}1247}
12241248
12251249
=== modified file 'plugins/Satellites/src/Satellites.hpp'
--- plugins/Satellites/src/Satellites.hpp 2012-07-29 19:00:03 +0000
+++ plugins/Satellites/src/Satellites.hpp 2012-08-30 16:29:19 +0000
@@ -93,8 +93,8 @@
93 virtual void init();93 virtual void init();
94 virtual void deinit();94 virtual void deinit();
95 virtual void update(double deltaTime);95 virtual void update(double deltaTime);
96 virtual void draw(StelCore* core);96 virtual void draw(StelCore* core, class StelRenderer* renderer);
97 virtual void drawPointer(StelCore* core, StelPainter& painter);97 virtual void drawPointer(StelCore* core, class StelRenderer* renderer);
98 virtual double getCallOrder(StelModuleActionName actionName) const;98 virtual double getCallOrder(StelModuleActionName actionName) const;
9999
100 ///////////////////////////////////////////////////////////////////////////100 ///////////////////////////////////////////////////////////////////////////
@@ -298,7 +298,8 @@
298 QString satellitesJsonPath;298 QString satellitesJsonPath;
299 QList<SatelliteP> satellites;299 QList<SatelliteP> satellites;
300 LinearFader hintFader;300 LinearFader hintFader;
301 StelTextureSP texPointer;301 class StelTextureNew* hintTexture;
302 class StelTextureNew* texPointer;
302 QPixmap* pxmapGlow;303 QPixmap* pxmapGlow;
303 QPixmap* pxmapOnIcon;304 QPixmap* pxmapOnIcon;
304 QPixmap* pxmapOffIcon;305 QPixmap* pxmapOffIcon;
305306
=== modified file 'plugins/SolarSystemEditor/src/SolarSystemEditor.cpp'
--- plugins/SolarSystemEditor/src/SolarSystemEditor.cpp 2012-01-11 10:50:37 +0000
+++ plugins/SolarSystemEditor/src/SolarSystemEditor.cpp 2012-08-30 16:29:19 +0000
@@ -127,7 +127,7 @@
127 //127 //
128}128}
129129
130void SolarSystemEditor::draw(StelCore*) //core130void SolarSystemEditor::draw(StelCore*, class StelRenderer*) //core
131{131{
132 //132 //
133}133}
134134
=== modified file 'plugins/SolarSystemEditor/src/SolarSystemEditor.hpp'
--- plugins/SolarSystemEditor/src/SolarSystemEditor.hpp 2012-01-11 10:50:37 +0000
+++ plugins/SolarSystemEditor/src/SolarSystemEditor.hpp 2012-08-30 16:29:19 +0000
@@ -77,7 +77,7 @@
77 //! Dialog windows don't need explicit drawing, it's done automatically.77 //! Dialog windows don't need explicit drawing, it's done automatically.
78 //! If a plug-in draws on the screen, it should be able to respect78 //! If a plug-in draws on the screen, it should be able to respect
79 //! the night vision mode.79 //! the night vision mode.
80 virtual void draw(StelCore * core);80 virtual void draw(StelCore * core, class StelRenderer* renderer);
81 virtual double getCallOrder(StelModuleActionName actionName) const;81 virtual double getCallOrder(StelModuleActionName actionName) const;
82 //! called when the "configure" button in the "Plugins" tab is pressed82 //! called when the "configure" button in the "Plugins" tab is pressed
83 virtual bool configureGui(bool show);83 virtual bool configureGui(bool show);
8484
=== modified file 'plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp'
--- plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp 2012-02-13 18:59:16 +0000
+++ plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp 2012-08-30 16:29:19 +0000
@@ -31,6 +31,7 @@
31#include "StelApp.hpp"31#include "StelApp.hpp"
32#include "StelFileMgr.hpp"32#include "StelFileMgr.hpp"
33#include "StelModuleMgr.hpp"33#include "StelModuleMgr.hpp"
34#include "StelUtils.hpp"
34//#include "StelTranslator.hpp"35//#include "StelTranslator.hpp"
3536
3637
@@ -235,13 +236,13 @@
235 return false;236 return false;
236 }237 }
237238
238 if (!verifyPowerOfTwo(texture.height()))239 if (!StelUtils::isPowerOfTwo(texture.height()))
239 {240 {
240 qDebug() << "Invalid texure height:" << texture.height()241 qDebug() << "Invalid texure height:" << texture.height()
241 << "for file" << filePath;242 << "for file" << filePath;
242 return false;243 return false;
243 }244 }
244 if (!verifyPowerOfTwo(texture.width()))245 if (!StelUtils::isPowerOfTwo(texture.width()))
245 {246 {
246 qDebug() << "Invalid texture width:" << texture.width()247 qDebug() << "Invalid texture width:" << texture.width()
247 << "for file" << filePath;248 << "for file" << filePath;
@@ -250,11 +251,3 @@
250251
251 return true;252 return true;
252}253}
253
254bool ManualImportWindow::verifyPowerOfTwo(int value)
255{
256 if (value > 0 && (value & (value-1)) == 0)
257 return true;
258 else
259 return false;
260}
261254
=== modified file 'plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp'
--- plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp 2012-02-13 18:59:16 +0000
+++ plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp 2012-08-30 16:29:19 +0000
@@ -68,10 +68,9 @@
68 void setColorButtonColor(QColor newColor);68 void setColorButtonColor(QColor newColor);
6969
70 void selectTextureFile(QLineEdit * filePathLineEdit);70 void selectTextureFile(QLineEdit * filePathLineEdit);
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.
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.)
73 bool verifyTextureFile(QString filePath);73 bool verifyTextureFile(QString filePath);
74 bool verifyPowerOfTwo(int value);
7574
76protected:75protected:
77 virtual void createDialogContent();76 virtual void createDialogContent();
7877
=== modified file 'plugins/Supernovae/src/Supernova.cpp'
--- plugins/Supernovae/src/Supernova.cpp 2012-08-08 10:11:01 +0000
+++ plugins/Supernovae/src/Supernova.cpp 2012-08-30 16:29:19 +0000
@@ -18,19 +18,17 @@
1818
19#include "Supernova.hpp"19#include "Supernova.hpp"
20#include "StelObject.hpp"20#include "StelObject.hpp"
21#include "StelPainter.hpp"
22#include "StelApp.hpp"21#include "StelApp.hpp"
23#include "StelCore.hpp"22#include "StelCore.hpp"
24#include "StelTexture.hpp"
25#include "StelUtils.hpp"23#include "StelUtils.hpp"
26#include "StelTranslator.hpp"24#include "StelTranslator.hpp"
27#include "StelModuleMgr.hpp"25#include "StelModuleMgr.hpp"
28#include "StelSkyDrawer.hpp"26#include "StelSkyDrawer.hpp"
27#include "StelRenderer.hpp"
2928
30#include <QTextStream>29#include <QTextStream>
31#include <QDebug>30#include <QDebug>
32#include <QVariant>31#include <QVariant>
33#include <QtOpenGL>
34#include <QVariantMap>32#include <QVariantMap>
35#include <QVariant>33#include <QVariant>
36#include <QList>34#include <QList>
@@ -202,7 +200,7 @@
202 labelsFader.update((int)(deltaTime*1000));200 labelsFader.update((int)(deltaTime*1000));
203}201}
204202
205void Supernova::draw(StelCore* core, StelPainter& painter)203void Supernova::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
206{204{
207 StelSkyDrawer* sd = core->getSkyDrawer();205 StelSkyDrawer* sd = core->getSkyDrawer();
208206
@@ -215,21 +213,20 @@
215213
216 StelUtils::spheToRect(snra, snde, XYZ);214 StelUtils::spheToRect(snra, snde, XYZ);
217 mag = getVMagnitude(core, true);215 mag = getVMagnitude(core, true);
218 sd->preDrawPointSource(&painter);216 sd->preDrawPointSource();
219 217
220 if (mag <= sd->getLimitMagnitude())218 if (mag <= sd->getLimitMagnitude())
221 {219 {
222 sd->computeRCMag(mag, rcMag); 220 sd->computeRCMag(mag, rcMag);
223// sd->drawPointSource(&painter, Vec3f(XYZ[0], XYZ[1], XYZ[2]), rcMag, color, false);221 sd->drawPointSource(projector, XYZ, rcMag, color, false);
224 sd->drawPointSource(&painter, XYZ, rcMag, color, false);222 renderer->setGlobalColor(color[0], color[1], color[2], 1);
225 painter.setColor(color[0], color[1], color[2], 1);223 size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
226 size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
227 shift = 6.f + size/1.8f;224 shift = 6.f + size/1.8f;
228 if (labelsFader.getInterstate()<=0.f)225 if (labelsFader.getInterstate()<=0.f)
229 {226 {
230 painter.drawText(XYZ, designation, 0, shift, shift, false);227 renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
231 }228 }
232 }229 }
233230
234 sd->postDrawPointSource(&painter);231 sd->postDrawPointSource(projector);
235}232}
236233
=== modified file 'plugins/Supernovae/src/Supernova.hpp'
--- plugins/Supernovae/src/Supernova.hpp 2012-01-11 10:50:37 +0000
+++ plugins/Supernovae/src/Supernova.hpp 2012-08-30 16:29:19 +0000
@@ -27,11 +27,9 @@
27#include <QDateTime>27#include <QDateTime>
2828
29#include "StelObject.hpp"29#include "StelObject.hpp"
30#include "StelTextureTypes.hpp"
31#include "StelPainter.hpp"
32#include "StelFader.hpp"30#include "StelFader.hpp"
31#include "StelProjectorType.hpp"
3332
34class StelPainter;
3533
36//! @class Supernova34//! @class Supernova
37//! A Supernova object represents one supernova on the sky.35//! A Supernova object represents one supernova on the sky.
@@ -83,9 +81,7 @@
8381
84 Vec3d XYZ; // holds J2000 position82 Vec3d XYZ; // holds J2000 position
8583
86 static StelTextureSP hintTexture;84 void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
87
88 void draw(StelCore* core, StelPainter& painter);
8985
90 // Supernova86 // Supernova
91 QString designation; //! The ID of the supernova87 QString designation; //! The ID of the supernova
9288
=== modified file 'plugins/Supernovae/src/Supernovae.cpp'
--- plugins/Supernovae/src/Supernovae.cpp 2012-07-29 09:54:59 +0000
+++ plugins/Supernovae/src/Supernovae.cpp 2012-08-30 16:29:19 +0000
@@ -17,7 +17,6 @@
17 */17 */
1818
19#include "StelProjector.hpp"19#include "StelProjector.hpp"
20#include "StelPainter.hpp"
21#include "StelApp.hpp"20#include "StelApp.hpp"
22#include "StelCore.hpp"21#include "StelCore.hpp"
23#include "StelGui.hpp"22#include "StelGui.hpp"
@@ -25,7 +24,6 @@
25#include "StelLocaleMgr.hpp"24#include "StelLocaleMgr.hpp"
26#include "StelModuleMgr.hpp"25#include "StelModuleMgr.hpp"
27#include "StelObjectMgr.hpp"26#include "StelObjectMgr.hpp"
28#include "StelTextureMgr.hpp"
29#include "StelJsonParser.hpp"27#include "StelJsonParser.hpp"
30#include "StelFileMgr.hpp"28#include "StelFileMgr.hpp"
31#include "StelUtils.hpp"29#include "StelUtils.hpp"
@@ -33,6 +31,8 @@
33#include "LabelMgr.hpp"31#include "LabelMgr.hpp"
34#include "Supernova.hpp"32#include "Supernova.hpp"
35#include "Supernovae.hpp"33#include "Supernovae.hpp"
34#include "renderer/StelRenderer.hpp"
35#include "renderer/StelTextureNew.hpp"
36#include "SupernovaeDialog.hpp"36#include "SupernovaeDialog.hpp"
3737
38#include <QNetworkAccessManager>38#include <QNetworkAccessManager>
@@ -41,14 +41,15 @@
41#include <QAction>41#include <QAction>
42#include <QProgressBar>42#include <QProgressBar>
43#include <QDebug>43#include <QDebug>
44#include <QFile>
44#include <QFileInfo>45#include <QFileInfo>
45#include <QFile>
46#include <QTimer>46#include <QTimer>
47#include <QVariantMap>
48#include <QVariant>
49#include <QList>47#include <QList>
48#include <QSettings>
50#include <QSharedPointer>49#include <QSharedPointer>
51#include <QStringList>50#include <QStringList>
51#include <QVariant>
52#include <QVariantMap>
5253
53#define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */54#define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */
5455
@@ -81,7 +82,8 @@
81 Constructor82 Constructor
82*/83*/
83Supernovae::Supernovae()84Supernovae::Supernovae()
84 : progressBar(NULL)85 : texPointer(NULL)
86 , progressBar(NULL)
85{87{
86 setObjectName("Supernovae");88 setObjectName("Supernovae");
87 configDialog = new SupernovaeDialog();89 configDialog = new SupernovaeDialog();
@@ -99,7 +101,10 @@
99101
100void Supernovae::deinit()102void Supernovae::deinit()
101{103{
102 texPointer.clear();104 if(NULL != texPointer)
105 {
106 delete texPointer;
107 }
103}108}
104109
105/*110/*
@@ -133,9 +138,6 @@
133 readSettingsFromConfig();138 readSettingsFromConfig();
134139
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";
136
137 texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
138
139 // key bindings and other actions141 // key bindings and other actions
140 // TRANSLATORS: Title of a group of key bindings in the Help window142 // TRANSLATORS: Title of a group of key bindings in the Help window
141 QString groupName = N_("Plugin Key Bindings");143 QString groupName = N_("Plugin Key Bindings");
@@ -192,27 +194,27 @@
192/*194/*
193 Draw our module. This should print name of first SNe in the main window195 Draw our module. This should print name of first SNe in the main window
194*/196*/
195void Supernovae::draw(StelCore* core)197void Supernovae::draw(StelCore* core, StelRenderer* renderer)
196{198{
197 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);199 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
198 StelPainter painter(prj);200 renderer->setFont(font);
199 painter.setFont(font);
200 201
201 foreach (const SupernovaP& sn, snstar)202 foreach (const SupernovaP& sn, snstar)
202 {203 {
203 if (sn && sn->initialized)204 if (sn && sn->initialized)
204 sn->draw(core, painter);205 {
206 sn->draw(core, renderer, prj);
207 }
205 }208 }
206209
207 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())210 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
208 drawPointer(core, painter);211 {
209212 drawPointer(core, renderer, prj);
213 }
210}214}
211215
212void Supernovae::drawPointer(StelCore* core, StelPainter& painter)216void Supernovae::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
213{217{
214 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
215
216 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Supernova");218 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Supernova");
217 if (!newSelected.empty())219 if (!newSelected.empty())
218 {220 {
@@ -221,16 +223,21 @@
221223
222 Vec3d screenpos;224 Vec3d screenpos;
223 // Compute 2D pos and return if outside screen225 // Compute 2D pos and return if outside screen
224 if (!painter.getProjector()->project(pos, screenpos))226 if (!projector->project(pos, screenpos))
227 {
225 return;228 return;
229 }
226230
227 const Vec3f& c(obj->getInfoColor());231 const Vec3f& c(obj->getInfoColor());
228 painter.setColor(c[0],c[1],c[2]);232 renderer->setGlobalColor(c[0],c[1],c[2]);
233 if(NULL == texPointer)
234 {
235 texPointer = renderer->createTexture("textures/pointeur2.png");
236 }
229 texPointer->bind();237 texPointer->bind();
230 painter.enableTexture2d(true);238 renderer->setBlendMode(BlendMode_Alpha);
231 glEnable(GL_BLEND);239 renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, 26.0f,
232 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode240 StelApp::getInstance().getTotalRunTime() * 40.0f);
233 painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
234 }241 }
235}242}
236243
237244
=== modified file 'plugins/Supernovae/src/Supernovae.hpp'
--- plugins/Supernovae/src/Supernovae.hpp 2012-07-29 09:54:59 +0000
+++ plugins/Supernovae/src/Supernovae.hpp 2012-08-30 16:29:19 +0000
@@ -22,8 +22,6 @@
22#include "StelObjectModule.hpp"22#include "StelObjectModule.hpp"
23#include "StelObject.hpp"23#include "StelObject.hpp"
24#include "StelFader.hpp"24#include "StelFader.hpp"
25#include "StelTextureTypes.hpp"
26#include "StelPainter.hpp"
27#include "Supernova.hpp"25#include "Supernova.hpp"
28#include <QFont>26#include <QFont>
29#include <QVariantMap>27#include <QVariantMap>
@@ -39,8 +37,6 @@
39class QTimer;37class QTimer;
40class SupernovaeDialog;38class SupernovaeDialog;
4139
42class StelPainter;
43
44typedef QSharedPointer<Supernova> SupernovaP;40typedef QSharedPointer<Supernova> SupernovaP;
4541
46//! This is an example of a plug-in which can be dynamically loaded into stellarium42//! This is an example of a plug-in which can be dynamically loaded into stellarium
@@ -66,8 +62,8 @@
66 virtual void init();62 virtual void init();
67 virtual void deinit();63 virtual void deinit();
68 virtual void update(double) {;}64 virtual void update(double) {;}
69 virtual void draw(StelCore* core);65 virtual void draw(StelCore* core, class StelRenderer* renderer);
70 virtual void drawPointer(StelCore* core, StelPainter& painter);66 virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
71 virtual double getCallOrder(StelModuleActionName actionName) const;67 virtual double getCallOrder(StelModuleActionName actionName) const;
7268
73 ///////////////////////////////////////////////////////////////////////////69 ///////////////////////////////////////////////////////////////////////////
@@ -181,7 +177,7 @@
181177
182 QString sneJsonPath;178 QString sneJsonPath;
183179
184 StelTextureSP texPointer;180 class StelTextureNew* texPointer;
185 QList<SupernovaP> snstar;181 QList<SupernovaP> snstar;
186 QHash<QString, double> snlist;182 QHash<QString, double> snlist;
187183
188184
=== modified file 'plugins/TelescopeControl/src/TelescopeControl.cpp'
--- plugins/TelescopeControl/src/TelescopeControl.cpp 2012-01-11 10:50:37 +0000
+++ plugins/TelescopeControl/src/TelescopeControl.cpp 2012-08-30 16:29:19 +0000
@@ -42,10 +42,11 @@
42#include "StelMovementMgr.hpp"42#include "StelMovementMgr.hpp"
43#include "StelObject.hpp"43#include "StelObject.hpp"
44#include "StelObjectMgr.hpp"44#include "StelObjectMgr.hpp"
45#include "StelPainter.hpp"
46#include "StelProjector.hpp"45#include "StelProjector.hpp"
47#include "StelStyle.hpp"46#include "StelStyle.hpp"
48#include "StelTextureMgr.hpp"47#include "renderer/StelGeometryBuilder.hpp"
48#include "renderer/StelRenderer.hpp"
49#include "renderer/StelTextureNew.hpp"
4950
50#include <QAction>51#include <QAction>
51#include <QDateTime>52#include <QDateTime>
@@ -85,6 +86,13 @@
85////////////////////////////////////////////////////////////////////////////////86////////////////////////////////////////////////////////////////////////////////
86// Constructor and destructor87// Constructor and destructor
87TelescopeControl::TelescopeControl()88TelescopeControl::TelescopeControl()
89 : pixmapHover(NULL)
90 , pixmapOnIcon(NULL)
91 , pixmapOffIcon(NULL)
92 , reticleTexture(NULL)
93 , selectionTexture(NULL)
94 , telescopeDialog(NULL)
95 , slewDialog(NULL)
88{96{
89 setObjectName("TelescopeControl");97 setObjectName("TelescopeControl");
9098
@@ -138,10 +146,6 @@
138 //Load and start all telescope clients146 //Load and start all telescope clients
139 loadTelescopes();147 loadTelescopes();
140 148
141 //Load OpenGL textures
142 reticleTexture = StelApp::getInstance().getTextureManager().createTexture(":/telescopeControl/telescope_reticle.png");
143 selectionTexture = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
144
145 StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());149 StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
146 150
147 //Create telescope key bindings151 //Create telescope key bindings
@@ -165,7 +169,7 @@
165 connect(gui->getGuiActions(name), SIGNAL(triggered()), this, SLOT(slewTelescopeToViewDirection()));169 connect(gui->getGuiActions(name), SIGNAL(triggered()), this, SLOT(slewTelescopeToViewDirection()));
166 }170 }
167 171
168 //Create and initialize dialog windows172 //Create and initialize dialog windows
169 telescopeDialog = new TelescopeDialog();173 telescopeDialog = new TelescopeDialog();
170 slewDialog = new SlewDialog();174 slewDialog = new SlewDialog();
171 175
@@ -175,10 +179,10 @@
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)));
176 180
177 //Create toolbar button181 //Create toolbar button
178 pixmapHover = new QPixmap(":/graphicGui/glow32x32.png");182 pixmapHover = new QPixmap(":/graphicGui/glow32x32.png");
179 pixmapOnIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_on.png");183 pixmapOnIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_on.png");
180 pixmapOffIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_off.png");184 pixmapOffIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_off.png");
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"));
182 gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup");186 gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup");
183 }187 }
184 catch (std::runtime_error &e)188 catch (std::runtime_error &e)
@@ -216,6 +220,18 @@
216 ++iterator;220 ++iterator;
217 }221 }
218222
223 if(NULL != reticleTexture) {delete reticleTexture;}
224 if(NULL != selectionTexture) {delete selectionTexture;}
225 if(NULL != telescopeDialog) {delete telescopeDialog;}
226 if(NULL != slewDialog) {delete slewDialog;}
227 if(NULL != pixmapHover) {delete pixmapHover;}
228 if(NULL != pixmapOnIcon) {delete pixmapOnIcon;}
229 if(NULL != pixmapOffIcon) {delete pixmapOffIcon;}
230 reticleTexture = selectionTexture = NULL;
231 telescopeDialog = NULL;
232 slewDialog = NULL;
233 pixmapHover = pixmapOnIcon = pixmapOffIcon;
234
219 //TODO: Decide if it should be saved on change235 //TODO: Decide if it should be saved on change
220 //Save the configuration on exit236 //Save the configuration on exit
221 saveConfiguration();237 saveConfiguration();
@@ -230,15 +246,17 @@
230 communicate();246 communicate();
231}247}
232248
233void TelescopeControl::draw(StelCore* core)249void TelescopeControl::draw(StelCore* core, StelRenderer* renderer)
234{250{
235 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);251 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
236 StelPainter sPainter(prj);
237 sPainter.setFont(labelFont);
238 glEnable(GL_TEXTURE_2D);
239 glEnable(GL_BLEND);
The diff has been truncated for viewing.