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

Proposed by Ferdinand Majerech on 2012-08-29
Status: Merged
Approved by: treaves on 2012-08-31
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 2012-08-29 Needs Fixing on 2012-08-30
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.
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
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.
>

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...

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.

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.
>

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 on 2012-08-30

Fixed a compilation bug (RGBA_32F/_ARB) on Mac (needs testing).

5577. By Ferdinand Majerech on 2012-08-30

Fixed a release-mode compiler warning.

5578. By Ferdinand Majerech on 2012-08-30

Another release mode compiler warning fix.

5579. By Ferdinand Majerech on 2012-08-30

Fixed strict aliasing issues found in release mode.

5580. By Ferdinand Majerech on 2012-08-30

Fixed shadows compiler bug on Mac. (Needs testing!)

Ferdinand Majerech (kiithsacmp) wrote :

I've finally tested it on Catalyst - shadows work fine.
The last thing that needs testing is Mac compilation.

So right now I have it tested on:

AMD open source
AMD Catalyst
NVidia Nouveau
Intel open source

All of them work fine.
Intel open source is about same speed as AMD open source, even though on a much crappier GPU.
Nouveau is about 50% of that (30-35FPS zoomed out no atmosphere/ground)
Catalyst is way faster (120-140FPS, the bottleneck here is most likely CPU)

Catalyst became laggy on very close zoom to a planet with GL2 - but that was on 2560x1440 -
most likely shadow fragment shader overhead

Sorry, did no precise measurements. I'd be more interested in measurements
on stuff that is almost too slow so I can improve performance there
(i.e. improving 80 FPS to 120 is not as good as 20 FPS to 30)

Also; one possible source of slowdown on your Mac (but again, not that huge slowdown):
Viewport effects (i.e. spherical mirror distortion) now work even if FBOs are not used,
(previously they would simply be disabled), but with a round-about, slow implementation.

I also disabled FBO for now because there seems to be a bug in GL2 Qt paint engine,
where the paint engine expects certain state to be set to certain values and I wasn't
able to work around that.

So if you have spherical mirror distortion enabled, you're using the fallback
viewport texture implementation instead of FBOs, which is slow. But again,
not 75-to-15 slow, so I'm not sure.

treaves (treaves) wrote :

O.K. Compiles fine. In RELEASE mode, I still get only 20 FPS. My machine:
- SSD (NO HDD)
- 16 GB memory
- NVidia GeForece GT 650M with 1G memory
- 2.6 GHz Intel Core i7

This is pushing a Retina display which is 2880x1800 and a 27" Thunderbolt display at 2560x1440, so, it is pushing a lot of pixels. I'm still surprised at the difference. We'll get it into trunk and see what happens.

Opening in safe mode allows for up to 25 FPS; so your code, even in GL 1.0, is three times slower.

I did run in Instruments. There are about 30 parameters that I can monitor, but unfortunately my ignorance of OpenGL doesn't allow for understanding what I'm seeing.

There are no log messages about shader issues (or other issues).

Ferdinand Majerech (kiithsacmp) wrote :

That is... really weird. It would make sense if it would be fragment shader on so many pixels, but
GL1 would be fast then (unless the driver emulates GL1 with a non-cheap fragment shader - but then trunk would be slow, too).

The largest resolution I can test with is 2560x1440, and the AMD open source drivers have no problem with
60 FPS with that resolution. My GPU is probably a bit faster (non-mobile), but it still doesn't explain trunk-vs-refactored difference.

I might try to APITrace pre- and post- change code to see what different calls are emitted, but not right now
(working on statistics right now, want to have that before optimization work).

If your profiler only records GL calls (which is what APITrace does), it's not that useful; you need to know
about how the driver works with which calls to figure out what is slow. It would be awesome to have a profiler
that actually, well, profiles, which is complicated as the GPU is working asynchronously. Afaik AMD gDebugger does something like that, once Catalyst supports 12.10 I might try that.

It would be useful to have a Mac profile with an Intel GPU (afaik there are no Macs with AMD GPUs?), especially trunk-vs-refactored difference. If the problem is still there, it's Mac specific. If not, NVidia specific (or NVidia+Mac specific). Does the Mac have Optimus, and if so, is there some way to force the Intel GPU to be used?

Also, it'd be good to have some Windows numbers. Don't have a Windows box, though, nor any experience with
compiling a C++ project on Windows.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2012-07-22 14:33:23 +0000
3+++ .bzrignore 2012-08-30 16:29:19 +0000
4@@ -4,5 +4,6 @@
5 CMakeLists.txt.user
6 Stellarium.bat
7 stellarium.iss
8+*.kdev4
9 ./doc/qt.tag
10 ./locale
11
12=== modified file 'CMakeLists.txt'
13--- CMakeLists.txt 2012-08-25 15:21:39 +0000
14+++ CMakeLists.txt 2012-08-30 16:29:19 +0000
15@@ -423,6 +423,7 @@
16 ${CMAKE_BINARY_DIR}
17 ${CMAKE_SOURCE_DIR}/src
18 ${CMAKE_SOURCE_DIR}/src/core
19+ ${CMAKE_SOURCE_DIR}/src/core/renderer
20 ${CMAKE_SOURCE_DIR}/src/core/modules
21 ${CMAKE_SOURCE_DIR}/src/core/planetsephems
22 ${CMAKE_SOURCE_DIR}/src/core/external
23
24=== modified file 'Doxyfile.cmake'
25--- Doxyfile.cmake 2012-05-09 04:30:26 +0000
26+++ Doxyfile.cmake 2012-08-30 16:29:19 +0000
27@@ -423,7 +423,7 @@
28
29 # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
30
31-SORT_MEMBERS_CTORS_1ST = NO
32+SORT_MEMBERS_CTORS_1ST = YES
33
34 # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
35 # hierarchy of group names into alphabetical order. If set to NO (the default)
36@@ -484,13 +484,13 @@
37 # at the bottom of the documentation of classes and structs. If set to YES the
38 # list will mention the files that were used to generate the documentation.
39
40-SHOW_USED_FILES = NO
41+SHOW_USED_FILES = YES
42
43 # If the sources in your project are distributed over multiple directories
44 # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
45 # in the documentation. The default is NO.
46
47-SHOW_DIRECTORIES = NO
48+SHOW_DIRECTORIES = YES
49
50 # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
51 # This will remove the Files entry from the Quick Index and from the
52@@ -703,7 +703,7 @@
53 # Note: To get rid of all source code in the generated output, make sure also
54 # VERBATIM_HEADERS is set to NO.
55
56-SOURCE_BROWSER = NO
57+SOURCE_BROWSER = YES
58
59 # Setting the INLINE_SOURCES tag to YES will include the body
60 # of functions and classes directly in the documentation.
61
62=== modified file 'data/default_config.ini'
63--- data/default_config.ini 2012-08-28 17:10:57 +0000
64+++ data/default_config.ini 2012-08-30 16:29:19 +0000
65@@ -18,7 +18,8 @@
66 vertical_offset = 0
67 minimum_fps = 18
68 maximum_fps = 10000
69-viewport_effect = none
70+viewport_effect = sphericMirrorDistorter
71+#viewport_effect = none
72
73 [projection]
74 type = ProjectionStereographic
75
76=== modified file 'data/shaders/xyYToRGB.glsl'
77--- data/shaders/xyYToRGB.glsl 2010-03-04 18:55:22 +0000
78+++ data/shaders/xyYToRGB.glsl 2012-08-30 16:29:19 +0000
79@@ -16,45 +16,47 @@
80 uniform mediump mat4 projectionMatrix;
81
82 // Contains the 2d position of the point on the screen (before multiplication by the projection matrix)
83-attribute mediump vec2 skyVertex;
84+attribute mediump vec2 vertex;
85
86 // Contains the r,g,b,Y (luminosity) components.
87-attribute highp vec4 skyColor;
88+attribute highp vec4 color;
89
90 // The output variable passed to the fragment shader
91 varying mediump vec4 resultSkyColor;
92
93 void main()
94 {
95- gl_Position = projectionMatrix*vec4(skyVertex, 0., 1.);
96- highp vec4 color = skyColor;
97+ gl_Position = projectionMatrix*vec4(vertex, 0., 1.);
98+
99+ // Must be a separate variable due to Intel drivers
100+ vec4 tempColor = color;
101
102 ///////////////////////////////////////////////////////////////////////////
103 // First compute the xy color component
104 // color contains the unprojected vertex position in r,g,b
105 // + the Y (luminance) component of the color in the alpha channel
106- if (color[3]>0.01)
107+ if (tempColor[3]>0.01)
108 {
109- highp float cosDistSunq = sunPos[0]*color[0] + sunPos[1]*color[1] + sunPos[2]*color[2];
110+ highp float cosDistSunq = sunPos[0]*tempColor[0] + sunPos[1]*tempColor[1] + sunPos[2]*tempColor[2];
111 highp float distSun=acos(cosDistSunq);
112- highp float oneOverCosZenithAngle = (color[2]==0.) ? 9999999999999. : 1. / color[2];
113+ highp float oneOverCosZenithAngle = (tempColor[2]==0.) ? 9999999999999. : 1. / tempColor[2];
114
115 cosDistSunq*=cosDistSunq;
116- color[0] = term_x * (1. + Ax * exp(Bx*oneOverCosZenithAngle))* (1. + Cx * exp(Dx*distSun) + Ex * cosDistSunq);
117- color[1] = term_y * (1. + Ay * exp(By*oneOverCosZenithAngle))* (1. + Cy * exp(Dy*distSun) + Ey * cosDistSunq);
118- if (color[0] < 0. || color[1] < 0.)
119+ tempColor[0] = term_x * (1. + Ax * exp(Bx*oneOverCosZenithAngle))* (1. + Cx * exp(Dx*distSun) + Ex * cosDistSunq);
120+ tempColor[1] = term_y * (1. + Ay * exp(By*oneOverCosZenithAngle))* (1. + Cy * exp(Dy*distSun) + Ey * cosDistSunq);
121+ if (tempColor[0] < 0. || tempColor[1] < 0.)
122 {
123- color[0] = 0.25;
124- color[1] = 0.25;
125+ tempColor[0] = 0.25;
126+ tempColor[1] = 0.25;
127 }
128 }
129 else
130 {
131- color[0] = 0.25;
132- color[1] = 0.25;
133+ tempColor[0] = 0.25;
134+ tempColor[1] = 0.25;
135 }
136- color[2]=color[3];
137- color[3]=1.;
138+ tempColor[2]=tempColor[3];
139+ tempColor[3]=1.;
140
141
142 ///////////////////////////////////////////////////////////////////////////
143@@ -64,39 +66,39 @@
144 // if log10Y>0.6, photopic vision only (with the cones, colors are seen)
145 // else scotopic vision if log10Y<-2 (with the rods, no colors, everything blue),
146 // else mesopic vision (with rods and cones, transition state)
147- if (color[2] <= 0.01)
148+ if (tempColor[2] <= 0.01)
149 {
150 // special case for s = 0 (x=0.25, y=0.25)
151- color[2] *= 0.5121445;
152- color[2] = pow(color[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;
153- color[0] = 0.787077*color[2];
154- color[1] = 0.9898434*color[2];
155- color[2] *= 1.9256125;
156- resultSkyColor = color*brightnessScale;
157+ tempColor[2] *= 0.5121445;
158+ tempColor[2] = pow(tempColor[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;
159+ tempColor[0] = 0.787077*tempColor[2];
160+ tempColor[1] = 0.9898434*tempColor[2];
161+ tempColor[2] *= 1.9256125;
162+ resultSkyColor = tempColor*brightnessScale;
163 }
164 else
165 {
166- if (color[2]<3.9810717055349722)
167+ if (tempColor[2]<3.9810717055349722)
168 {
169 // Compute s, ratio between scotopic and photopic vision
170- float op = (log(color[2])/ln10 + 2.)/2.6;
171+ float op = (log(tempColor[2])/ln10 + 2.)/2.6;
172 float s = op * op *(3. - 2. * op);
173 // Do the blue shift for scotopic vision simulation (night vision) [3]
174 // The "night blue" is x,y(0.25, 0.25)
175- color[0] = (1. - s) * 0.25 + s * color[0]; // Add scotopic + photopic components
176- color[1] = (1. - s) * 0.25 + s * color[1]; // Add scotopic + photopic components
177+ tempColor[0] = (1. - s) * 0.25 + s * tempColor[0]; // Add scotopic + photopic components
178+ tempColor[1] = (1. - s) * 0.25 + s * tempColor[1]; // Add scotopic + photopic components
179 // Take into account the scotopic luminance approximated by V [3] [4]
180- float V = color[2] * (1.33 * (1. + color[1] / color[0] + color[0] * (1. - color[0] - color[1])) - 1.68);
181- color[2] = 0.4468 * (1. - s) * V + s * color[2];
182+ float V = tempColor[2] * (1.33 * (1. + tempColor[1] / tempColor[0] + tempColor[0] * (1. - tempColor[0] - tempColor[1])) - 1.68);
183+ tempColor[2] = 0.4468 * (1. - s) * V + s * tempColor[2];
184 }
185
186 // 2. Adapt the luminance value and scale it to fit in the RGB range [2]
187- // color[2] = std::pow(adaptLuminanceScaled(color[2]), oneOverGamma);
188- color[2] = pow(color[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;
189+ // tempColor[2] = std::pow(adaptLuminanceScaled(tempColor[2]), oneOverGamma);
190+ tempColor[2] = pow(tempColor[2]*pi*0.0001, alphaWaOverAlphaDa*oneOverGamma)* term2TimesOneOverMaxdLpOneOverGamma;
191
192 // Convert from xyY to XZY
193 // Use a XYZ to Adobe RGB (1998) matrix which uses a D65 reference white
194- mediump vec3 tmp = vec3(color[0] * color[2] / color[1], color[2], (1. - color[0] - color[1]) * color[2] / color[1]);
195+ mediump vec3 tmp = vec3(tempColor[0] * tempColor[2] / tempColor[1], tempColor[2], (1. - tempColor[0] - tempColor[1]) * tempColor[2] / tempColor[1]);
196 resultSkyColor = vec4(2.04148*tmp.x-0.564977*tmp.y-0.344713*tmp.z, -0.969258*tmp.x+1.87599*tmp.y+0.0415557*tmp.z, 0.0134455*tmp.x-0.118373*tmp.y+1.01527*tmp.z, 1.);
197 resultSkyColor*=brightnessScale;
198 }
199
200=== modified file 'doc/codingConventions.doxygen'
201--- doc/codingConventions.doxygen 2012-04-29 12:13:30 +0000
202+++ doc/codingConventions.doxygen 2012-08-30 16:29:19 +0000
203@@ -20,9 +20,7 @@
204 /*!
205
206 @page codingStyle Coding Style Conventions in Stellarium
207-
208 @tableofcontents
209-
210 The increasing number of contributors require that we clearly define coding rules and guidelines. Although for historical reasons the current code of Stellarium does not always comply to these rules, they should now be respected for any addition or modification of the code.
211
212 @section stylistic_conventions_sec Stylistic Conventions
213
214=== modified file 'doc/doc-header.html'
215--- doc/doc-header.html 2011-08-03 17:51:45 +0000
216+++ doc/doc-header.html 2012-08-30 16:29:19 +0000
217@@ -19,6 +19,7 @@
218 <a href="codingStyle.html">Coding Style</a>&nbsp;&middot;
219 <a href="scripting.html">Scripting</a>&nbsp;&middot;
220 <a href="plugins.html">Plugins</a>&nbsp;&middot;
221+ <a href="renderer.html">Renderer</a>&nbsp;&middot;
222 <a href="fileStructure.html">File Structure</a>
223 </td>
224 </tr>
225
226=== added file 'doc/images/renderer-api-overview.png'
227Binary files doc/images/renderer-api-overview.png 1970-01-01 00:00:00 +0000 and doc/images/renderer-api-overview.png 2012-08-30 16:29:19 +0000 differ
228=== added file 'doc/images/renderer-implementation-overview.png'
229Binary files doc/images/renderer-implementation-overview.png 1970-01-01 00:00:00 +0000 and doc/images/renderer-implementation-overview.png 2012-08-30 16:29:19 +0000 differ
230=== modified file 'doc/images/stellarium-architecture.png'
231Binary files doc/images/stellarium-architecture.png 2010-04-18 21:00:25 +0000 and doc/images/stellarium-architecture.png 2012-08-30 16:29:19 +0000 differ
232=== modified file 'doc/mainpage.doxygen'
233--- doc/mainpage.doxygen 2012-04-29 12:13:30 +0000
234+++ doc/mainpage.doxygen 2012-08-30 16:29:19 +0000
235@@ -28,13 +28,39 @@
236
237 @section architecture_sec Program Architecture
238
239-The code of Stellarium is split into several main blocks:
240-<ul>
241-<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>
242-<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>
243-<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>
244-<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>
245-<li>the script engine (StelScriptMgr) allows scripts to calls slots from the core and StelModules slots.</li>
246+The code of Stellarium is split into several main blocks: <ul>
247+
248+<li> the main loop and main widget classes StelMainWindow, StelMainGraphicsView and
249+StelAppGraphicsWidget. Those classes have a single instance created at startup by the ::main()
250+function. They perform tasks such as creating of the main window and renderer, creating the
251+stellarium core, creating the GUI. After initialization, they manage user's input event
252+propagation and event loop. They are heavily based on %Qt features. </li>
253+
254+<li> the core which provides generic services and features to the other components. The main
255+class is the StelApp singleton which is used everywhere in the code to access other elements.
256+The StelApp instance creates all the main core services and modules at initialization. Example
257+services are sky layer management (e.g. images which have a fixed position in the sky) with the
258+StelSkyLayerMgr, drawing with StelRenderer etc. . Two especially important manager classes are
259+the StelModuleMgr and StelCore: the former manages the collection of StelModule instances
260+registered in the program (see next point for more info on what a StelModule is). The latter
261+provides performance critical features for computing coordinate transformation and other
262+mathematical services. </li>
263+
264+<li> a collection of StelModule instances which display the main elements of the program such as
265+planets and stars. Each StelModule should be registered to the StelModuleMgr. Because many
266+Stellarium components derive from the StelModule class, the main loop is able to treat them
267+generically by calling their standard methods such StelModule::update() and StelModule::draw()
268+at each program iteration. This also allows other program components to access them by name.
269+StelModule can also be loaded dynamically by Stellarium, which is the standard way of creating
270+@ref plugins. </li>
271+
272+<li> the Graphical User Interface (StelGui). It is based on styled %Qt widgets which are
273+rendered directly in the graphics window. User actions trigger signals connected to core and
274+StelModules slots. </li>
275+
276+<li> the script engine (StelScriptMgr) allows scripts to calls slots from the core and
277+StelModule slots. </li>
278+
279 </ul>
280 @image html stellarium-architecture.png
281
282
283=== added file 'doc/renderer-api-overview.svg'
284--- doc/renderer-api-overview.svg 1970-01-01 00:00:00 +0000
285+++ doc/renderer-api-overview.svg 2012-08-30 16:29:19 +0000
286@@ -0,0 +1,658 @@
287+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
288+<!-- Created with Inkscape (http://www.inkscape.org/) -->
289+
290+<svg
291+ xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
292+ xmlns:dc="http://purl.org/dc/elements/1.1/"
293+ xmlns:cc="http://creativecommons.org/ns#"
294+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
295+ xmlns:svg="http://www.w3.org/2000/svg"
296+ xmlns="http://www.w3.org/2000/svg"
297+ xmlns:xlink="http://www.w3.org/1999/xlink"
298+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
299+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
300+ width="1052.3622"
301+ height="744.09448"
302+ id="svg3265"
303+ version="1.1"
304+ inkscape:version="0.48.3.1 r9886"
305+ sodipodi:docname="api-overview.svg"
306+ inkscape:export-filename="/home/kiith-sa/Programming/stellarium/doc/images/api-overview.png"
307+ inkscape:export-xdpi="90"
308+ inkscape:export-ydpi="90">
309+ <defs
310+ id="defs3267">
311+ <marker
312+ inkscape:stockid="EmptyDiamondL"
313+ orient="auto"
314+ refY="0.0"
315+ refX="0.0"
316+ id="EmptyDiamondL"
317+ style="overflow:visible">
318+ <path
319+ id="path9879"
320+ d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z "
321+ style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
322+ transform="scale(0.8)" />
323+ </marker>
324+ <linearGradient
325+ id="linearGradient9420"
326+ osb:paint="solid">
327+ <stop
328+ style="stop-color:#000000;stop-opacity:1;"
329+ offset="0"
330+ id="stop9422" />
331+ </linearGradient>
332+ <linearGradient
333+ id="linearGradient8650"
334+ osb:paint="solid">
335+ <stop
336+ style="stop-color:#000000;stop-opacity:1;"
337+ offset="0"
338+ id="stop8652" />
339+ </linearGradient>
340+ <marker
341+ inkscape:stockid="Tail"
342+ orient="auto"
343+ refY="0.0"
344+ refX="0.0"
345+ id="Tail"
346+ style="overflow:visible">
347+ <g
348+ id="g4852"
349+ transform="scale(-1.2)">
350+ <path
351+ id="path4854"
352+ d="M -3.8048674,-3.9585227 L 0.54352094,0"
353+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
354+ <path
355+ id="path4856"
356+ d="M -1.2866832,-3.9585227 L 3.0617053,0"
357+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
358+ <path
359+ id="path4858"
360+ d="M 1.3053582,-3.9585227 L 5.6537466,0"
361+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
362+ <path
363+ id="path4860"
364+ d="M -3.8048674,4.1775838 L 0.54352094,0.21974226"
365+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
366+ <path
367+ id="path4862"
368+ d="M -1.2866832,4.1775838 L 3.0617053,0.21974226"
369+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
370+ <path
371+ id="path4864"
372+ d="M 1.3053582,4.1775838 L 5.6537466,0.21974226"
373+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.8;stroke-linecap:round" />
374+ </g>
375+ </marker>
376+ <marker
377+ inkscape:stockid="EmptyTriangleInL"
378+ orient="auto"
379+ refY="0.0"
380+ refX="0.0"
381+ id="EmptyTriangleInL"
382+ style="overflow:visible">
383+ <path
384+ id="path4967"
385+ d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
386+ style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
387+ transform="scale(-0.8) translate(-6,0)" />
388+ </marker>
389+ <marker
390+ inkscape:stockid="EmptyTriangleOutL"
391+ orient="auto"
392+ refY="0.0"
393+ refX="0.0"
394+ id="EmptyTriangleOutL"
395+ style="overflow:visible">
396+ <path
397+ id="path4976"
398+ d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
399+ style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
400+ transform="scale(0.8) translate(-6,0)" />
401+ </marker>
402+ <marker
403+ inkscape:stockid="SemiCircleOut"
404+ orient="auto"
405+ refY="0.0"
406+ refX="0.0"
407+ id="SemiCircleOut"
408+ style="overflow:visible">
409+ <path
410+ id="path4997"
411+ d="M -2.5,-0.80913858 C -2.5,1.9508614 -4.7400000,4.1908614 -7.5,4.1908614 L -7.5,-5.8091386 C -4.7400000,-5.8091386 -2.5,-3.5691386 -2.5,-0.80913858 z "
412+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
413+ transform="scale(0.6) translate(7.125493,0.763446)" />
414+ </marker>
415+ <marker
416+ inkscape:stockid="CurveOut"
417+ orient="auto"
418+ refY="0.0"
419+ refX="0.0"
420+ id="CurveOut"
421+ style="overflow:visible">
422+ <path
423+ id="path5003"
424+ d="M -5.4129913,-5.0456926 C -2.6529913,-5.0456926 -0.41299131,-2.8056926 -0.41299131,-0.045692580 C -0.41299131,2.7143074 -2.6529913,4.9543074 -5.4129913,4.9543074"
425+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
426+ transform="scale(0.6)" />
427+ </marker>
428+ <marker
429+ inkscape:stockid="Scissors"
430+ orient="auto"
431+ refY="0.0"
432+ refX="0.0"
433+ id="Scissors"
434+ style="overflow:visible">
435+ <path
436+ id="schere"
437+ d="M 9.0898857,-3.6061018 C 8.1198849,-4.7769976 6.3697607,-4.7358294 5.0623558,-4.2327734 L -3.1500488,-1.1548705 C -5.5383421,-2.4615840 -7.8983361,-2.0874077 -7.8983361,-2.7236578 C -7.8983361,-3.2209742 -7.4416699,-3.1119800 -7.5100293,-4.4068519 C -7.5756648,-5.6501286 -8.8736064,-6.5699315 -10.100428,-6.4884954 C -11.327699,-6.4958500 -12.599867,-5.5553341 -12.610769,-4.2584343 C -12.702194,-2.9520479 -11.603560,-1.7387447 -10.304005,-1.6532027 C -8.7816644,-1.4265411 -6.0857470,-2.3487593 -4.8210600,-0.082342643 C -5.7633447,1.6559151 -7.4350844,1.6607341 -8.9465707,1.5737277 C -10.201445,1.5014928 -11.708664,1.8611256 -12.307219,3.0945882 C -12.885586,4.2766744 -12.318421,5.9591904 -10.990470,6.3210002 C -9.6502788,6.8128279 -7.8098011,6.1912892 -7.4910978,4.6502760 C -7.2454393,3.4624530 -8.0864637,2.9043186 -7.7636052,2.4731223 C -7.5199917,2.1477623 -5.9728246,2.3362771 -3.2164999,1.0982979 L 5.6763468,4.2330688 C 6.8000164,4.5467672 8.1730685,4.5362646 9.1684433,3.4313614 L -0.051640930,-0.053722219 L 9.0898857,-3.6061018 z M -9.2179159,-5.5066058 C -7.9233569,-4.7838060 -8.0290767,-2.8230356 -9.3743431,-2.4433169 C -10.590861,-2.0196559 -12.145370,-3.2022863 -11.757521,-4.5207817 C -11.530373,-5.6026336 -10.104134,-6.0014137 -9.2179159,-5.5066058 z M -9.1616516,2.5107591 C -7.8108215,3.0096239 -8.0402087,5.2951947 -9.4138723,5.6023681 C -10.324932,5.9187072 -11.627422,5.4635705 -11.719569,4.3902287 C -11.897178,3.0851737 -10.363484,1.9060805 -9.1616516,2.5107591 z "
438+ style="fill:#000000;" />
439+ </marker>
440+ <marker
441+ inkscape:stockid="Legs"
442+ orient="auto"
443+ refY="0.0"
444+ refX="0.0"
445+ id="Legs"
446+ style="overflow:visible">
447+ <g
448+ id="g5015"
449+ transform="scale(-0.7)">
450+ <g
451+ id="g5017"
452+ transform="matrix(0,-1.000000,-1.000000,0,20.70862,21.31391)">
453+ <path
454+ id="path5019"
455+ d="M 21.221250,20.675360 C 14.311099,25.396517 18.766725,27.282204 15.380179,34.118595"
456+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt" />
457+ <path
458+ id="path5021"
459+ d="M 21.398110,20.548120 C 20.037601,28.895644 24.934182,29.318060 25.903151,34.373078"
460+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt" />
461+ </g>
462+ <path
463+ id="path5023"
464+ d="M -14.090070,-6.7318716 L -15.012238,-2.6884886 L -11.049487,-3.9115586 L -14.090070,-6.7318716 z "
465+ style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt" />
466+ <path
467+ id="path5025"
468+ d="M -15.215679,4.5567534 L -13.341552,8.2563664 L -11.074678,4.7835114 L -15.215679,4.5567534 z "
469+ style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt" />
470+ </g>
471+ </marker>
472+ <marker
473+ inkscape:stockid="CurveIn"
474+ orient="auto"
475+ refY="0.0"
476+ refX="0.0"
477+ id="CurveIn"
478+ style="overflow:visible">
479+ <path
480+ id="path5000"
481+ d="M 4.6254930,-5.0456926 C 1.8654930,-5.0456926 -0.37450702,-2.8056926 -0.37450702,-0.045692580 C -0.37450702,2.7143074 1.8654930,4.9543074 4.6254930,4.9543074"
482+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;fill:none"
483+ transform="scale(0.6)" />
484+ </marker>
485+ <marker
486+ inkscape:stockid="EmptyDiamondLstart"
487+ orient="auto"
488+ refY="0.0"
489+ refX="0.0"
490+ id="EmptyDiamondLstart"
491+ style="overflow:visible">
492+ <path
493+ id="path4931"
494+ d="M 0,-7.0710768 L -7.0710894,0 L 0,7.0710589 L 7.0710462,0 L 0,-7.0710768 z "
495+ style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt"
496+ transform="scale(0.8) translate(7,0)" />
497+ </marker>
498+ <marker
499+ inkscape:stockid="Arrow2Lstart"
500+ orient="auto"
501+ refY="0.0"
502+ refX="0.0"
503+ id="Arrow2Lstart"
504+ style="overflow:visible">
505+ <path
506+ id="path4834"
507+ style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round"
508+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
509+ transform="scale(1.1) translate(1,0)" />
510+ </marker>
511+ <marker
512+ inkscape:stockid="Arrow1Lstart"
513+ orient="auto"
514+ refY="0.0"
515+ refX="0.0"
516+ id="Arrow1Lstart"
517+ style="overflow:visible">
518+ <path
519+ id="path4816"
520+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
521+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
522+ transform="scale(0.8) translate(12.5,0)" />
523+ </marker>
524+ <marker
525+ inkscape:stockid="Arrow1Lend"
526+ orient="auto"
527+ refY="0.0"
528+ refX="0.0"
529+ id="Arrow1Lend"
530+ style="overflow:visible;">
531+ <path
532+ id="path4819"
533+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
534+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
535+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
536+ </marker>
537+ </defs>
538+ <sodipodi:namedview
539+ id="base"
540+ pagecolor="#ffffff"
541+ bordercolor="#666666"
542+ borderopacity="1.0"
543+ inkscape:pageopacity="0.0"
544+ inkscape:pageshadow="2"
545+ inkscape:zoom="1.4142136"
546+ inkscape:cx="611.81556"
547+ inkscape:cy="403.85116"
548+ inkscape:document-units="px"
549+ inkscape:current-layer="layer1"
550+ showgrid="true"
551+ inkscape:window-width="2560"
552+ inkscape:window-height="1385"
553+ inkscape:window-x="-2"
554+ inkscape:window-y="-3"
555+ inkscape:window-maximized="1">
556+ <inkscape:grid
557+ type="xygrid"
558+ id="grid4630"
559+ empspacing="5"
560+ visible="true"
561+ enabled="true"
562+ snapvisiblegridlinesonly="true" />
563+ </sodipodi:namedview>
564+ <metadata
565+ id="metadata3270">
566+ <rdf:RDF>
567+ <cc:Work
568+ rdf:about="">
569+ <dc:format>image/svg+xml</dc:format>
570+ <dc:type
571+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
572+ <dc:title></dc:title>
573+ </cc:Work>
574+ </rdf:RDF>
575+ </metadata>
576+ <g
577+ inkscape:label="Layer 1"
578+ inkscape:groupmode="layer"
579+ id="layer1"
580+ transform="translate(0,-308.2677)">
581+ <rect
582+ style="fill:#000000;fill-opacity:0.1254902"
583+ id="rect8829"
584+ width="1050"
585+ height="570"
586+ x="0"
587+ y="482.36218" />
588+ <rect
589+ style="fill:#00ff00;fill-opacity:0.1254902"
590+ id="rect8771"
591+ width="460"
592+ height="120"
593+ x="10"
594+ y="522.36218" />
595+ <rect
596+ style="fill:#00ff00;fill-opacity:0.1254902"
597+ id="rect8773"
598+ width="460"
599+ height="30"
600+ x="10"
601+ y="522.36218" />
602+ <text
603+ xml:space="preserve"
604+ style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
605+ x="70"
606+ y="549.36169"
607+ id="text8775"
608+ sodipodi:linespacing="125%"><tspan
609+ sodipodi:role="line"
610+ x="70"
611+ y="549.36169"
612+ id="tspan8779">Renderer API extensions</tspan></text>
613+ <rect
614+ id="rect7204"
615+ width="1030"
616+ height="390"
617+ x="10"
618+ y="652.36218"
619+ style="fill:#0000ff;fill-opacity:0.1254902" />
620+ <rect
621+ style="fill:#0000ff;fill-opacity:0.1254902"
622+ id="rect8749"
623+ width="1030"
624+ height="30"
625+ x="10"
626+ y="652.36218" />
627+ <text
628+ xml:space="preserve"
629+ style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
630+ x="400"
631+ y="679.36169"
632+ id="text8751"
633+ sodipodi:linespacing="125%"><tspan
634+ sodipodi:role="line"
635+ id="tspan8753"
636+ x="400"
637+ y="679.36169">Main Renderer API</tspan></text>
638+ <g
639+ id="g4775"
640+ transform="translate(-290,280)">
641+ <rect
642+ y="692.36218"
643+ x="380"
644+ height="30"
645+ width="190"
646+ id="rect4693"
647+ style="fill:#000000;fill-opacity:0.15686275" />
648+ <flowRoot
649+ xml:space="preserve"
650+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
651+ id="flowRoot8908"><flowRegion
652+ id="flowRegion8910"><use
653+ x="0"
654+ y="0"
655+ xlink:href="#rect4693"
656+ id="use8912"
657+ width="1052.3622"
658+ height="744.09448" /></flowRegion><flowPara
659+ id="flowPara8914">StelIndexBuffer</flowPara></flowRoot> </g>
660+ <g
661+ id="g4782"
662+ transform="translate(320,170)">
663+ <rect
664+ y="802.36218"
665+ x="440"
666+ height="30"
667+ width="200"
668+ id="rect4695"
669+ style="fill:#000000;fill-opacity:0.15686275" />
670+ <flowRoot
671+ xml:space="preserve"
672+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
673+ id="flowRoot8900"><flowRegion
674+ id="flowRegion8902"><use
675+ x="0"
676+ y="0"
677+ xlink:href="#rect4695"
678+ id="use8904"
679+ width="1052.3622"
680+ height="744.09448" /></flowRegion><flowPara
681+ id="flowPara8906">StelGLSLShader</flowPara></flowRoot> </g>
682+ <g
683+ id="g4789"
684+ transform="translate(190,-130)">
685+ <rect
686+ y="892.36218"
687+ x="520"
688+ height="30"
689+ width="190"
690+ id="rect4697"
691+ style="fill:#000000;fill-opacity:0.15686275" />
692+ <flowRoot
693+ xml:space="preserve"
694+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
695+ id="flowRoot8892"><flowRegion
696+ id="flowRegion8894"><use
697+ x="0"
698+ y="0"
699+ xlink:href="#rect4697"
700+ id="use8896"
701+ width="1052.3622"
702+ height="744.09448" /></flowRegion><flowPara
703+ id="flowPara8898">StelTextureNew</flowPara></flowRoot> </g>
704+ <g
705+ id="g4796"
706+ transform="translate(-670,70)">
707+ <rect
708+ y="492.36218"
709+ x="770"
710+ height="30"
711+ width="260"
712+ id="rect4699"
713+ style="fill:#000000;fill-opacity:0.15686275" />
714+ <flowRoot
715+ xml:space="preserve"
716+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
717+ id="flowRoot8951"><flowRegion
718+ id="flowRegion8953"><use
719+ x="0"
720+ y="0"
721+ xlink:href="#rect4699"
722+ id="use8955"
723+ width="1052.3622"
724+ height="744.09448" /></flowRegion><flowPara
725+ id="flowPara8957">StelGeometryBuilder</flowPara></flowRoot> </g>
726+ <g
727+ id="g4803"
728+ transform="translate(-690,200)">
729+ <rect
730+ y="402.36218"
731+ x="790"
732+ height="30"
733+ width="270"
734+ id="rect4701"
735+ style="fill:#000000;fill-opacity:0.15686275" />
736+ <flowRoot
737+ xml:space="preserve"
738+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
739+ id="flowRoot8916"><flowRegion
740+ id="flowRegion8918"><use
741+ x="0"
742+ y="0"
743+ xlink:href="#rect4701"
744+ id="use8920"
745+ width="1052.3622"
746+ height="744.09448" /></flowRegion><flowPara
747+ id="flowPara8922">StelCircleArcRenderer</flowPara></flowRoot> </g>
748+ <g
749+ id="g4761"
750+ transform="translate(100,280)">
751+ <rect
752+ y="432.36218"
753+ x="340"
754+ height="30"
755+ width="160"
756+ id="rect4751"
757+ style="fill:#000000;fill-opacity:0.15686275" />
758+ <flowRoot
759+ xml:space="preserve"
760+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
761+ id="flowRoot8876"><flowRegion
762+ id="flowRegion8878"><use
763+ x="0"
764+ y="0"
765+ xlink:href="#rect4751"
766+ id="use8880"
767+ width="1052.3622"
768+ height="744.09448" /></flowRegion><flowPara
769+ id="flowPara8882">StelRenderer</flowPara></flowRoot> </g>
770+ <path
771+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow1Lstart);marker-mid:none;marker-end:none"
772+ d="m 230,762.36218 0,-40 210,0"
773+ id="path4810"
774+ inkscape:connector-curvature="0" />
775+ <flowRoot
776+ xml:space="preserve"
777+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
778+ id="flowRoot8055"
779+ transform="translate(20,158.1017)"><flowRegion
780+ id="flowRegion8057"><use
781+ x="0"
782+ y="0"
783+ xlink:href="#path4810"
784+ id="use8059"
785+ width="1052.3622"
786+ height="744.09448"
787+ transform="translate(-10,-154.0392)" /></flowRegion><flowPara
788+ id="flowPara8061">constructs</flowPara></flowRoot> <path
789+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 8;stroke-dashoffset:0;marker-start:url(#Arrow1Lstart);marker-end:none"
790+ d="m 860,972.36218 0,-40 -330,0 0,-190 0,0"
791+ id="path8283"
792+ inkscape:connector-curvature="0"
793+ sodipodi:nodetypes="ccccc" />
794+ <path
795+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-mid:none;marker-end:url(#Arrow1Lend)"
796+ d="m 600,722.36218 200,0 0,40"
797+ id="path5668"
798+ inkscape:connector-curvature="0" />
799+ <text
800+ xml:space="preserve"
801+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
802+ x="710"
803+ y="742.36218"
804+ id="text5670"
805+ sodipodi:linespacing="125%"><tspan
806+ sodipodi:role="line"
807+ id="tspan5672"
808+ x="710"
809+ y="742.36218">constructs</tspan></text>
810+ <text
811+ xml:space="preserve"
812+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
813+ x="420"
814+ y="922.36218"
815+ id="text5686"
816+ sodipodi:linespacing="125%"><tspan
817+ sodipodi:role="line"
818+ x="420"
819+ y="922.36218"
820+ id="tspan5690">constructs</tspan></text>
821+ <path
822+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
823+ d="m 510,434.09448 0,190 -330,0 0,40"
824+ id="path6987"
825+ inkscape:connector-curvature="0"
826+ transform="translate(0,308.2677)"
827+ sodipodi:nodetypes="cccc" />
828+ <rect
829+ style="fill:#000000;fill-opacity:0.1254902"
830+ id="rect8852"
831+ width="1050"
832+ height="30"
833+ x="0"
834+ y="482.36218" />
835+ <text
836+ xml:space="preserve"
837+ style="font-size:32.00026321px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
838+ x="420.00293"
839+ y="509.35849"
840+ id="text8854"
841+ sodipodi:linespacing="125%"
842+ transform="scale(0.999993,1.000007)"><tspan
843+ sodipodi:role="line"
844+ x="420.00293"
845+ y="509.35849"
846+ id="tspan8858">Renderer API</tspan></text>
847+ <g
848+ id="g8943"
849+ transform="translate(110,20)">
850+ <rect
851+ y="742.36218"
852+ x="20"
853+ height="30"
854+ width="200"
855+ id="rect4659"
856+ style="fill:#000000;fill-opacity:0.15686275" />
857+ <g
858+ id="g8937">
859+ <flowRoot
860+ xml:space="preserve"
861+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
862+ id="flowRoot8929"><flowRegion
863+ id="flowRegion8931"><use
864+ x="0"
865+ y="0"
866+ xlink:href="#rect4659"
867+ id="use8933"
868+ width="1052.3622"
869+ height="744.09448" /></flowRegion><flowPara
870+ id="flowPara8935">StelVertexBuffer</flowPara></flowRoot> </g>
871+ </g>
872+ <path
873+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
874+ d="m 470,274.09448 50,0 0,70"
875+ id="path8978"
876+ inkscape:connector-curvature="0"
877+ transform="translate(0,308.2677)" />
878+ <text
879+ xml:space="preserve"
880+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
881+ x="480"
882+ y="602.36218"
883+ id="text9410"
884+ sodipodi:linespacing="125%"><tspan
885+ sodipodi:role="line"
886+ x="480"
887+ y="602.36218"
888+ id="tspan9414">uses</tspan></text>
889+ <rect
890+ style="fill:#ffff00;fill-opacity:0.1254902;stroke:none"
891+ id="rect9530"
892+ width="1050"
893+ height="120"
894+ x="0"
895+ y="312.36218" />
896+ <rect
897+ style="fill:none;stroke:#000000;stroke-width:25.90816879000000128;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none"
898+ id="rect9418"
899+ width="1024.092"
900+ height="94.091827"
901+ x="12.954084"
902+ y="325.31625" />
903+ <flowRoot
904+ xml:space="preserve"
905+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
906+ id="flowRoot9544"
907+ transform="translate(0,31.796903)"><flowRegion
908+ id="flowRegion9546"><use
909+ x="0"
910+ y="0"
911+ xlink:href="#rect9530"
912+ id="use9548"
913+ width="1052.3622"
914+ height="744.09448" /></flowRegion><flowPara
915+ id="flowPara9550">User code (plugins, modules, core)</flowPara></flowRoot> <path
916+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
917+ d="m 520,124.09448 0,50"
918+ id="path9552"
919+ inkscape:connector-curvature="0"
920+ transform="translate(0,308.2677)" />
921+ <text
922+ xml:space="preserve"
923+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
924+ x="530"
925+ y="462.36218"
926+ id="text10684"
927+ sodipodi:linespacing="125%"><tspan
928+ sodipodi:role="line"
929+ x="530"
930+ y="462.36218"
931+ id="tspan10688">uses</tspan></text>
932+ <text
933+ xml:space="preserve"
934+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
935+ x="540"
936+ y="922.36218"
937+ id="text10894"
938+ sodipodi:linespacing="125%"><tspan
939+ sodipodi:role="line"
940+ id="tspan10896"
941+ x="540"
942+ y="922.36218">constructs (if isGLSLSupported() is true)</tspan></text>
943+ </g>
944+</svg>
945
946=== added file 'doc/renderer-implementation-overview.svg'
947--- doc/renderer-implementation-overview.svg 1970-01-01 00:00:00 +0000
948+++ doc/renderer-implementation-overview.svg 2012-08-30 16:29:19 +0000
949@@ -0,0 +1,835 @@
950+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
951+<!-- Created with Inkscape (http://www.inkscape.org/) -->
952+
953+<svg
954+ xmlns:dc="http://purl.org/dc/elements/1.1/"
955+ xmlns:cc="http://creativecommons.org/ns#"
956+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
957+ xmlns:svg="http://www.w3.org/2000/svg"
958+ xmlns="http://www.w3.org/2000/svg"
959+ xmlns:xlink="http://www.w3.org/1999/xlink"
960+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
961+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
962+ width="297mm"
963+ height="210mm"
964+ id="svg11050"
965+ version="1.1"
966+ inkscape:version="0.48.3.1 r9886"
967+ sodipodi:docname="implementation-overview-2.svg">
968+ <defs
969+ id="defs11052">
970+ <marker
971+ inkscape:stockid="Arrow1Lstart"
972+ orient="auto"
973+ refY="0.0"
974+ refX="0.0"
975+ id="Arrow1Lstart"
976+ style="overflow:visible">
977+ <path
978+ id="path4071"
979+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
980+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
981+ transform="scale(0.8) translate(12.5,0)" />
982+ </marker>
983+ <marker
984+ inkscape:stockid="Arrow2Lend"
985+ orient="auto"
986+ refY="0.0"
987+ refX="0.0"
988+ id="Arrow2Lend"
989+ style="overflow:visible;">
990+ <path
991+ id="path4092"
992+ style="fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
993+ d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
994+ transform="scale(1.1) rotate(180) translate(1,0)" />
995+ </marker>
996+ <marker
997+ inkscape:stockid="Arrow1Mstart"
998+ orient="auto"
999+ refY="0.0"
1000+ refX="0.0"
1001+ id="Arrow1Mstart"
1002+ style="overflow:visible">
1003+ <path
1004+ id="path4077"
1005+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
1006+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
1007+ transform="scale(0.4) translate(10,0)" />
1008+ </marker>
1009+ <marker
1010+ inkscape:stockid="Arrow1Lend"
1011+ orient="auto"
1012+ refY="0.0"
1013+ refX="0.0"
1014+ id="Arrow1Lend"
1015+ style="overflow:visible;">
1016+ <path
1017+ id="path3885"
1018+ d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
1019+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;"
1020+ transform="scale(0.8) rotate(180) translate(12.5,0)" />
1021+ </marker>
1022+ </defs>
1023+ <sodipodi:namedview
1024+ inkscape:document-units="mm"
1025+ pagecolor="#ffffff"
1026+ bordercolor="#666666"
1027+ borderopacity="1.0"
1028+ inkscape:pageopacity="0.0"
1029+ inkscape:pageshadow="2"
1030+ inkscape:zoom="1.2279853"
1031+ inkscape:cx="380.33865"
1032+ inkscape:cy="386.971"
1033+ inkscape:current-layer="layer1"
1034+ id="namedview11054"
1035+ showgrid="false"
1036+ units="mm"
1037+ inkscape:window-width="2560"
1038+ inkscape:window-height="1385"
1039+ inkscape:window-x="-2"
1040+ inkscape:window-y="-3"
1041+ inkscape:window-maximized="1">
1042+ <inkscape:grid
1043+ type="xygrid"
1044+ id="grid11083"
1045+ empspacing="5"
1046+ visible="true"
1047+ enabled="true"
1048+ snapvisiblegridlinesonly="true" />
1049+ </sodipodi:namedview>
1050+ <metadata
1051+ id="metadata11056">
1052+ <rdf:RDF>
1053+ <cc:Work
1054+ rdf:about="">
1055+ <dc:format>image/svg+xml</dc:format>
1056+ <dc:type
1057+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
1058+ <dc:title></dc:title>
1059+ </cc:Work>
1060+ </rdf:RDF>
1061+ </metadata>
1062+ <g
1063+ inkscape:label="Layer 1"
1064+ inkscape:groupmode="layer"
1065+ id="layer1">
1066+ <g
1067+ id="g11633"
1068+ transform="translate(160,270)">
1069+ <rect
1070+ y="194.09448"
1071+ x="250"
1072+ height="30"
1073+ width="230"
1074+ id="rect11595"
1075+ style="fill:#ff0000;fill-opacity:0.25098039;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" />
1076+ <flowRoot
1077+ id="flowRoot11601"
1078+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1079+ xml:space="preserve"><flowRegion
1080+ id="flowRegion11603"><use
1081+ id="use11605"
1082+ xlink:href="#rect11595"
1083+ y="0"
1084+ x="0"
1085+ width="1052.3622"
1086+ height="744.09448" /></flowRegion><flowPara
1087+ id="flowPara11607">StelQGL1Renderer</flowPara></flowRoot> </g>
1088+ <g
1089+ id="g11647"
1090+ transform="translate(30,170)">
1091+ <rect
1092+ y="84.094482"
1093+ x="390"
1094+ height="30"
1095+ width="210"
1096+ id="rect11085"
1097+ style="fill:#ff0000;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1098+ <flowRoot
1099+ id="flowRoot11617"
1100+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1101+ xml:space="preserve"><flowRegion
1102+ id="flowRegion11619"><use
1103+ id="use11621"
1104+ xlink:href="#rect11085"
1105+ y="0"
1106+ x="0"
1107+ width="1052.3622"
1108+ height="744.09448" /></flowRegion><flowPara
1109+ id="flowPara11623">StelQGLRenderer</flowPara></flowRoot> </g>
1110+ <g
1111+ id="g11654"
1112+ transform="translate(30,0)">
1113+ <rect
1114+ y="24.094482"
1115+ x="410"
1116+ height="30"
1117+ width="160"
1118+ id="rect11599"
1119+ style="fill:#ff0000;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1120+ <flowRoot
1121+ id="flowRoot11625"
1122+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1123+ xml:space="preserve"><flowRegion
1124+ id="flowRegion11627"><use
1125+ id="use11629"
1126+ xlink:href="#rect11599"
1127+ y="0"
1128+ x="0"
1129+ width="1052.3622"
1130+ height="744.09448" /></flowRegion><flowPara
1131+ id="flowPara11631">StelRenderer</flowPara></flowRoot> <path
1132+ style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend);stroke-dashoffset:0;marker-start:none"
1133+ d="m 520,54.094482 0,199.999998"
1134+ id="path3108"
1135+ inkscape:connector-curvature="0"
1136+ transform="translate(-30,0)" />
1137+ <path
1138+ style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1139+ d="m 630,274.09448 10,0 0,170 -120,0 0,20"
1140+ id="path4883"
1141+ inkscape:connector-curvature="0"
1142+ transform="translate(-30,0)"
1143+ sodipodi:nodetypes="ccccc" />
1144+ </g>
1145+ <g
1146+ id="g12057"
1147+ transform="translate(-580,-200)">
1148+ <g
1149+ id="g11923">
1150+ <rect
1151+ style="fill:#00ff00;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none"
1152+ id="rect11874"
1153+ width="200"
1154+ height="30"
1155+ x="590"
1156+ y="264.09448" />
1157+ <g
1158+ id="g11909">
1159+ <flowRoot
1160+ id="flowRoot11901"
1161+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1162+ xml:space="preserve"><flowRegion
1163+ id="flowRegion11903"><use
1164+ id="use11905"
1165+ xlink:href="#rect11874"
1166+ y="0"
1167+ x="0"
1168+ width="1052.3622"
1169+ height="744.09448" /></flowRegion><flowPara
1170+ id="flowPara11907">StelGLSLShader</flowPara></flowRoot> </g>
1171+ </g>
1172+ </g>
1173+ <g
1174+ id="g12066"
1175+ transform="translate(-580,290)">
1176+ <rect
1177+ y="324.09448"
1178+ x="600"
1179+ height="30"
1180+ width="250"
1181+ id="rect11876"
1182+ style="fill:#00ff00;fill-opacity:0.25098039;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" />
1183+ <flowRoot
1184+ id="flowRoot11931"
1185+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1186+ xml:space="preserve"><flowRegion
1187+ id="flowRegion11933"><use
1188+ id="use11935"
1189+ xlink:href="#rect11876"
1190+ y="0"
1191+ x="0"
1192+ width="1052.3622"
1193+ height="744.09448" /></flowRegion><flowPara
1194+ id="flowPara11937">StelQGLGLSLShader</flowPara></flowRoot> </g>
1195+ <g
1196+ id="g12073"
1197+ transform="translate(-10,-300)">
1198+ <rect
1199+ y="364.09448"
1200+ x="630"
1201+ height="30"
1202+ width="190"
1203+ id="rect11878"
1204+ style="fill:#00ffff;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1205+ <flowRoot
1206+ id="flowRoot11939"
1207+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1208+ xml:space="preserve"><flowRegion
1209+ id="flowRegion11941"><use
1210+ id="use11943"
1211+ xlink:href="#rect11878"
1212+ y="0"
1213+ x="0"
1214+ width="1052.3622"
1215+ height="744.09448" /></flowRegion><flowPara
1216+ id="flowPara11945">StelIndexBuffer</flowPara></flowRoot> </g>
1217+ <g
1218+ id="g12080"
1219+ transform="translate(30,-100)">
1220+ <rect
1221+ y="394.09448"
1222+ x="620"
1223+ height="30"
1224+ width="240"
1225+ id="rect11880"
1226+ style="fill:#00ffff;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1227+ <flowRoot
1228+ id="flowRoot11947"
1229+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1230+ xml:space="preserve"><flowRegion
1231+ id="flowRegion11949"><use
1232+ id="use11951"
1233+ xlink:href="#rect11880"
1234+ y="0"
1235+ x="0"
1236+ width="1052.3622"
1237+ height="744.09448" /></flowRegion><flowPara
1238+ id="flowPara11953">StelQGLIndexBuffer</flowPara></flowRoot> </g>
1239+ <g
1240+ id="g12087"
1241+ transform="translate(-400,-360)">
1242+ <rect
1243+ y="424.09448"
1244+ x="630"
1245+ height="30"
1246+ width="190"
1247+ id="rect11882"
1248+ style="fill:#0000ff;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1249+ <flowRoot
1250+ id="flowRoot11955"
1251+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1252+ xml:space="preserve"><flowRegion
1253+ id="flowRegion11957"><use
1254+ id="use11959"
1255+ xlink:href="#rect11882"
1256+ y="0"
1257+ x="0"
1258+ width="1052.3622"
1259+ height="744.09448" /></flowRegion><flowPara
1260+ id="flowPara11961">StelTextureNew</flowPara></flowRoot> </g>
1261+ <g
1262+ id="g12094"
1263+ transform="translate(-440,-330)">
1264+ <rect
1265+ y="474.09448"
1266+ x="640"
1267+ height="30"
1268+ width="240"
1269+ id="rect11884"
1270+ style="fill:#0000ff;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1271+ <flowRoot
1272+ id="flowRoot11963"
1273+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1274+ xml:space="preserve"><flowRegion
1275+ id="flowRegion11965"><use
1276+ id="use11967"
1277+ xlink:href="#rect11884"
1278+ y="0"
1279+ x="0"
1280+ width="1052.3622"
1281+ height="744.09448" /></flowRegion><flowPara
1282+ id="flowPara11969">StelTextureBackend</flowPara></flowRoot> </g>
1283+ <g
1284+ id="g12101"
1285+ transform="translate(-570,-250)">
1286+ <rect
1287+ y="544.09448"
1288+ x="680"
1289+ height="30"
1290+ width="290"
1291+ id="rect11886"
1292+ style="fill:#0000ff;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1293+ <flowRoot
1294+ id="flowRoot11971"
1295+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1296+ xml:space="preserve"><flowRegion
1297+ id="flowRegion11973"><use
1298+ id="use11975"
1299+ xlink:href="#rect11886"
1300+ y="0"
1301+ x="0"
1302+ width="1052.3622"
1303+ height="744.09448" /></flowRegion><flowPara
1304+ id="flowPara11977">StelQGLTextureBackend</flowPara></flowRoot> </g>
1305+ <g
1306+ id="g12108"
1307+ transform="translate(630,-460)">
1308+ <g
1309+ id="g12050">
1310+ <rect
1311+ style="fill:#ffff00;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none"
1312+ id="rect11888"
1313+ width="200"
1314+ height="30"
1315+ x="200"
1316+ y="524.09448" />
1317+ <flowRoot
1318+ xml:space="preserve"
1319+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1320+ id="flowRoot11979"><flowRegion
1321+ id="flowRegion11981"><use
1322+ x="0"
1323+ y="0"
1324+ xlink:href="#rect11888"
1325+ id="use11983"
1326+ width="1052.3622"
1327+ height="744.09448" /></flowRegion><flowPara
1328+ id="flowPara11985">StelVertexBuffer</flowPara></flowRoot> </g>
1329+ </g>
1330+ <g
1331+ id="g12043"
1332+ transform="translate(270,-60)">
1333+ <rect
1334+ y="394.09448"
1335+ x="150"
1336+ height="30"
1337+ width="210"
1338+ id="rect11872"
1339+ style="fill:#ff6000;fill-opacity:0.25098041;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1340+ <flowRoot
1341+ id="flowRoot11987"
1342+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1343+ xml:space="preserve"><flowRegion
1344+ id="flowRegion11989"><use
1345+ id="use11991"
1346+ xlink:href="#rect11872"
1347+ y="0"
1348+ x="0"
1349+ width="1052.3622"
1350+ height="744.09448" /></flowRegion><flowPara
1351+ id="flowPara11993">StelQGLViewport</flowPara></flowRoot> </g>
1352+ <g
1353+ id="g12116"
1354+ transform="translate(510,-430)">
1355+ <rect
1356+ y="574.09448"
1357+ x="220"
1358+ height="30"
1359+ width="300"
1360+ id="rect11893"
1361+ style="fill:#ffff00;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1362+ <flowRoot
1363+ id="flowRoot11995"
1364+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1365+ xml:space="preserve"><flowRegion
1366+ id="flowRegion11997"><use
1367+ id="use11999"
1368+ xlink:href="#rect11893"
1369+ y="0"
1370+ x="0"
1371+ width="1052.3622"
1372+ height="744.09448" /></flowRegion><flowPara
1373+ id="flowPara12001">StelVertexBufferBackend</flowPara></flowRoot> </g>
1374+ <g
1375+ id="g12123"
1376+ transform="translate(430,-260)">
1377+ <rect
1378+ y="614.09448"
1379+ x="250"
1380+ height="30"
1381+ width="350"
1382+ id="rect11895"
1383+ style="fill:#ffff00;fill-opacity:0.37647059;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" />
1384+ <flowRoot
1385+ id="flowRoot12003"
1386+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1387+ xml:space="preserve"><flowRegion
1388+ id="flowRegion12005"><use
1389+ id="use12007"
1390+ xlink:href="#rect11895"
1391+ y="0"
1392+ x="0"
1393+ width="1052.3622"
1394+ height="744.09448" /></flowRegion><flowPara
1395+ id="flowPara12009">StelQGLVertexBufferBackend</flowPara></flowRoot> </g>
1396+ <g
1397+ id="g12130"
1398+ transform="translate(370,-150)">
1399+ <rect
1400+ y="664.09448"
1401+ x="290"
1402+ height="30"
1403+ width="370"
1404+ id="rect11897"
1405+ style="fill:#ffff00;fill-opacity:0.3764706;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.12549020000000000;stroke-dasharray:none" />
1406+ <flowRoot
1407+ id="flowRoot12011"
1408+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1409+ xml:space="preserve"><flowRegion
1410+ id="flowRegion12013"><use
1411+ id="use12015"
1412+ xlink:href="#rect11897"
1413+ y="0"
1414+ x="0"
1415+ width="1052.3622"
1416+ height="744.09448" /></flowRegion><flowPara
1417+ id="flowPara12017">StelQGL1VertexBufferBackend</flowPara></flowRoot> </g>
1418+ <g
1419+ id="g12137"
1420+ transform="translate(330,-90)">
1421+ <rect
1422+ y="704.09448"
1423+ x="330"
1424+ height="30"
1425+ width="370"
1426+ id="rect11899"
1427+ style="fill:#ffff00;fill-opacity:0.37647059;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" />
1428+ <flowRoot
1429+ id="flowRoot12019"
1430+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1431+ xml:space="preserve"><flowRegion
1432+ id="flowRegion12021"><use
1433+ id="use12023"
1434+ xlink:href="#rect11899"
1435+ y="0"
1436+ x="0"
1437+ width="1052.3622"
1438+ height="744.09448" /></flowRegion><flowPara
1439+ id="flowPara12025">StelQGL2VertexBufferBackend</flowPara></flowRoot> </g>
1440+ <g
1441+ id="g12217"
1442+ transform="translate(0,-50)">
1443+ <rect
1444+ y="614.09448"
1445+ x="410"
1446+ height="30"
1447+ width="230"
1448+ id="rect11597"
1449+ style="fill:#ff0000;fill-opacity:0.25098039;stroke:#000000;stroke-width:0.97894502;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.1254902;stroke-dasharray:none" />
1450+ <g
1451+ id="g12211">
1452+ <flowRoot
1453+ xml:space="preserve"
1454+ style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1455+ id="flowRoot12203"><flowRegion
1456+ id="flowRegion12205"><use
1457+ x="0"
1458+ y="0"
1459+ xlink:href="#rect11597"
1460+ id="use12207"
1461+ width="1052.3622"
1462+ height="744.09448" /></flowRegion><flowPara
1463+ id="flowPara12209">StelQGL2Renderer</flowPara></flowRoot> </g>
1464+ </g>
1465+ <path
1466+ style="fill:none;stroke:#ff0001;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1467+ d="m 420,274.09448 -10,0 0,180 -10,0 0,90 120,0 0,20"
1468+ id="path5069"
1469+ inkscape:connector-curvature="0"
1470+ sodipodi:nodetypes="ccccccc" />
1471+ <path
1472+ style="fill:none;stroke:#000000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1473+ d="m 410,584.09448 -270,0 0,30"
1474+ id="path5255"
1475+ inkscape:connector-curvature="0"
1476+ sodipodi:nodetypes="ccc" />
1477+ <path
1478+ style="fill:none;stroke:#ff0000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1479+ d="m 310,174.09448 0,120"
1480+ id="path5445"
1481+ inkscape:connector-curvature="0" />
1482+ <path
1483+ style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1484+ d="m 900,174.09448 0,180"
1485+ id="path5635"
1486+ inkscape:connector-curvature="0"
1487+ sodipodi:nodetypes="cc" />
1488+ <path
1489+ style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1490+ d="m 900,384.09448 0,130"
1491+ id="path5823"
1492+ inkscape:connector-curvature="0"
1493+ sodipodi:nodetypes="cc" />
1494+ <path
1495+ style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow1Lend)"
1496+ d="m 1030,374.09448 10,0 0,220 -200,0 0,20"
1497+ id="path6011"
1498+ inkscape:connector-curvature="0"
1499+ sodipodi:nodetypes="ccccc" />
1500+ <path
1501+ style="fill:none;stroke:#ff0000;stroke-width:0.99921260000000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1502+ d="m 710,94.094482 0,199.999998"
1503+ id="path6571"
1504+ inkscape:connector-curvature="0" />
1505+ <path
1506+ style="fill:none;stroke:#ff0000;stroke-width:0.99921262;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-end:url(#Arrow1Lend)"
1507+ d="m 190,94.094482 0,179.999998 -90,0 0,340"
1508+ id="path6759"
1509+ inkscape:connector-curvature="0"
1510+ sodipodi:nodetypes="cccc" />
1511+ <path
1512+ style="fill:none;stroke:#ff0000;stroke-width:0.99921260000000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1513+ d="m 20,704.09448 60,0"
1514+ id="path7133"
1515+ inkscape:connector-curvature="0" />
1516+ <path
1517+ style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1518+ d="m 20,724.09448 60,0"
1519+ id="path7321"
1520+ inkscape:connector-curvature="0" />
1521+ <text
1522+ xml:space="preserve"
1523+ style="font-size:16.0001049px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1524+ x="89.99939"
1525+ y="707.01392"
1526+ id="text7509"
1527+ sodipodi:linespacing="125%"
1528+ transform="scale(1.0000065,0.99999346)"><tspan
1529+ sodipodi:role="line"
1530+ x="89.99939"
1531+ y="707.01392"
1532+ id="tspan7513">is parent class of</tspan></text>
1533+ <text
1534+ xml:space="preserve"
1535+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1536+ x="90"
1537+ y="727.00885"
1538+ id="text7517"
1539+ sodipodi:linespacing="125%"><tspan
1540+ sodipodi:role="line"
1541+ id="tspan7519"
1542+ x="90"
1543+ y="727.00885">constructs</tspan></text>
1544+ <path
1545+ style="fill:none;stroke:#0000ff;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1546+ d="m 250,704.09448 60,0"
1547+ id="path7540"
1548+ inkscape:connector-curvature="0" />
1549+ <path
1550+ style="fill:none;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1551+ d="m 250,724.09448 60,0"
1552+ id="path7728"
1553+ inkscape:connector-curvature="0" />
1554+ <text
1555+ xml:space="preserve"
1556+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1557+ x="320"
1558+ y="707.00928"
1559+ id="text8288"
1560+ sodipodi:linespacing="125%"><tspan
1561+ sodipodi:role="line"
1562+ x="320"
1563+ y="707.00928"
1564+ id="tspan8292">wraps (tight wrapper)</tspan></text>
1565+ <text
1566+ xml:space="preserve"
1567+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1568+ x="320"
1569+ y="727.00885"
1570+ id="text8296"
1571+ sodipodi:linespacing="125%"><tspan
1572+ sodipodi:role="line"
1573+ id="tspan8298"
1574+ x="320"
1575+ y="727.00885">includes (part of functionality separated into a class)</tspan></text>
1576+ <path
1577+ style="fill:none;stroke:#0000ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1578+ d="m 320,94.094482 0,49.999998"
1579+ id="path8319"
1580+ inkscape:connector-curvature="0" />
1581+ <path
1582+ style="fill:none;stroke:#0000ff;stroke-width:0.99921260000000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1583+ d="m 920,94.094482 0,49.999998"
1584+ id="path8507"
1585+ inkscape:connector-curvature="0" />
1586+ <path
1587+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:none;marker-end:url(#Arrow1Lend)"
1588+ d="m 640,584.09448 190,0 0,30"
1589+ id="path8695"
1590+ inkscape:connector-curvature="0" />
1591+ <path
1592+ style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1593+ d="m 640,484.09448 190,0 0,30"
1594+ id="path9069"
1595+ inkscape:connector-curvature="0" />
1596+ <path
1597+ style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1598+ d="m 420,264.09448 -40,0 0,30"
1599+ id="path9259"
1600+ inkscape:connector-curvature="0" />
1601+ <path
1602+ style="fill:none;stroke:#000000;stroke-width:0.9992126;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow1Lend)"
1603+ d="m 630,264.09448 40,0 0,30"
1604+ id="path9447"
1605+ inkscape:connector-curvature="0" />
1606+ <path
1607+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1608+ d="m 440,44.094482 -120,0 0,20"
1609+ id="path9635"
1610+ inkscape:connector-curvature="0" />
1611+ <path
1612+ style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1613+ d="m 600,44.094482 320,0 0,20"
1614+ id="path9823"
1615+ inkscape:connector-curvature="0" />
1616+ <path
1617+ style="fill:none;stroke:#00ff00;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Lend)"
1618+ d="m 520,284.09448 0,50"
1619+ id="path10767"
1620+ inkscape:connector-curvature="0" />
1621+ <path
1622+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:8,1;stroke-dashoffset:0;marker-end:none;marker-mid:none"
1623+ d="m 0,4.0944824 1050,0"
1624+ id="path12409"
1625+ inkscape:connector-curvature="0" />
1626+ <path
1627+ inkscape:connector-curvature="0"
1628+ id="path12975"
1629+ d="m 0,184.09448 1050,0"
1630+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" />
1631+ <path
1632+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none"
1633+ d="m 0,394.09448 1050,0"
1634+ id="path12977"
1635+ inkscape:connector-curvature="0" />
1636+ <path
1637+ inkscape:connector-curvature="0"
1638+ id="path12979"
1639+ d="m 0,554.09448 1050,0"
1640+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" />
1641+ <path
1642+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none"
1643+ d="m 0,654.09448 1050,0"
1644+ id="path12981"
1645+ inkscape:connector-curvature="0" />
1646+ <path
1647+ inkscape:connector-curvature="0"
1648+ id="path12983"
1649+ d="m 0,104.09448 1050,0"
1650+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0;marker-mid:none;marker-end:none" />
1651+ <g
1652+ id="g13106"
1653+ transform="translate(-10,0.0657492)">
1654+ <rect
1655+ y="654.09448"
1656+ x="10"
1657+ height="30"
1658+ width="80"
1659+ id="rect13005"
1660+ style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" />
1661+ <flowRoot
1662+ id="flowRoot13007"
1663+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1664+ xml:space="preserve"><flowRegion
1665+ id="flowRegion13009"><use
1666+ id="use13011"
1667+ xlink:href="#rect13005"
1668+ y="0"
1669+ x="0"
1670+ width="1052.3622"
1671+ height="744.09448" /></flowRegion><flowPara
1672+ id="flowPara13013">Legend</flowPara></flowRoot> </g>
1673+ <g
1674+ id="g13099"
1675+ transform="translate(-10,0.0657492)">
1676+ <rect
1677+ y="554.09448"
1678+ x="10"
1679+ height="30"
1680+ width="50"
1681+ id="rect12997"
1682+ style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" />
1683+ <flowRoot
1684+ id="flowRoot13015"
1685+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1686+ xml:space="preserve"><flowRegion
1687+ id="flowRegion13017"><use
1688+ id="use13019"
1689+ xlink:href="#rect12997"
1690+ y="0"
1691+ x="0"
1692+ width="1052.3622"
1693+ height="744.09448" /></flowRegion><flowPara
1694+ id="flowPara13021">GL2</flowPara></flowRoot> </g>
1695+ <g
1696+ id="g13092"
1697+ transform="translate(-10,0)">
1698+ <rect
1699+ y="394.09448"
1700+ x="10"
1701+ height="30"
1702+ width="50"
1703+ id="rect12993"
1704+ style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" />
1705+ <flowRoot
1706+ id="flowRoot13023"
1707+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1708+ xml:space="preserve"><flowRegion
1709+ id="flowRegion13025"><use
1710+ id="use13027"
1711+ xlink:href="#rect12993"
1712+ y="0"
1713+ x="0"
1714+ width="1052.3622"
1715+ height="744.09448" /></flowRegion><flowPara
1716+ id="flowPara13029">GL1 </flowPara></flowRoot> </g>
1717+ <g
1718+ id="g13085"
1719+ transform="translate(-10,0.0657492)">
1720+ <rect
1721+ y="184.09448"
1722+ x="10"
1723+ height="30"
1724+ width="130"
1725+ id="rect12999"
1726+ style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" />
1727+ <flowRoot
1728+ id="flowRoot13031"
1729+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1730+ xml:space="preserve"><flowRegion
1731+ id="flowRegion13033"><use
1732+ id="use13035"
1733+ xlink:href="#rect12999"
1734+ y="0"
1735+ x="0"
1736+ width="1052.3622"
1737+ height="744.09448" /></flowRegion><flowPara
1738+ id="flowPara13037">GL common</flowPara></flowRoot> </g>
1739+ <g
1740+ id="g13078"
1741+ transform="translate(-10,0.0657492)">
1742+ <rect
1743+ y="104.09448"
1744+ x="10"
1745+ height="30"
1746+ width="180"
1747+ id="rect13001"
1748+ style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" />
1749+ <flowRoot
1750+ id="flowRoot13039"
1751+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1752+ xml:space="preserve"><flowRegion
1753+ id="flowRegion13041"><use
1754+ id="use13043"
1755+ xlink:href="#rect13001"
1756+ y="0"
1757+ x="0"
1758+ width="1052.3622"
1759+ height="744.09448" /></flowRegion><flowPara
1760+ id="flowPara13045">Abstract backend</flowPara></flowRoot> </g>
1761+ <g
1762+ id="g13071"
1763+ transform="translate(-10,0.0657492)">
1764+ <rect
1765+ y="4.0944824"
1766+ x="10"
1767+ height="30"
1768+ width="40"
1769+ id="rect13003"
1770+ style="fill:#000000;fill-opacity:0.0627451;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:8, 1;stroke-dashoffset:0" />
1771+ <flowRoot
1772+ id="flowRoot13047"
1773+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
1774+ xml:space="preserve"><flowRegion
1775+ id="flowRegion13049"><use
1776+ id="use13051"
1777+ xlink:href="#rect13003"
1778+ y="0"
1779+ x="0"
1780+ width="1052.3622"
1781+ height="744.09448" /></flowRegion><flowPara
1782+ id="flowPara13053">API</flowPara></flowRoot> </g>
1783+ </g>
1784+</svg>
1785
1786=== added file 'doc/renderer.doxygen'
1787--- doc/renderer.doxygen 1970-01-01 00:00:00 +0000
1788+++ doc/renderer.doxygen 2012-08-30 16:29:19 +0000
1789@@ -0,0 +1,421 @@
1790+/*
1791+ * Stellarium
1792+ * Copyright (c) 2012 Ferdinand Majerech
1793+ *
1794+ * This program is free software; you can redistribute it and/or
1795+ * modify it under the terms of the GNU General Public License
1796+ * as published by the Free Software Foundation; either version 2
1797+ * of the License, or (at your option) any later version.
1798+ *
1799+ * This program is distributed in the hope that it will be useful,
1800+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1801+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1802+ * GNU General Public License for more details.
1803+ *
1804+ * You should have received a copy of the GNU General Public License
1805+ * along with this program; if not, write to the Free Software
1806+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1807+ */
1808+
1809+/*!
1810+
1811+@page renderer Renderer
1812+
1813+
1814+
1815+@section introduction Introduction
1816+
1817+During Google Summer of Code 2012, graphics code was separated into a subsystem
1818+called Renderer (<code>src/core/renderer</code>).
1819+
1820+Renderer is composed of interface classes abstracting away low-level graphics
1821+work, and backend classes either derived from or used by the interface classes.
1822+
1823+This allows to change underlying implementation without rewriting drawing code.
1824+For example, we now have two sets of backend classes: GL1 and GL2. Which one
1825+us used is decided at startup without affecting drawing code.
1826+
1827+
1828+
1829+@section outline API outline
1830+
1831+@image html renderer-api-overview.png
1832+
1833+@subsection stelrenderer StelRenderer
1834+
1835+The central class of the Renderer subsystem is StelRenderer. It constructs
1836+other graphics classes (textures, vertex and index buffers, etc.) and sets
1837+graphics state (global color, depth test mode, etc.). It also handles drawing.
1838+There is always only one StelRenderer instance, though it's not a singleton (no
1839+global access). While the graphics classes are constructed by StelRenderer,
1840+it's the caller's responsibility to delete them. Also, they must be destroyed
1841+before StelRenderer (which is destroyed right before the program exits).
1842+
1843+For example, to construct a texture (StelTextureNew), call
1844+StelRenderer::createTexture(), to construct a vertex buffer (StelVertexBuffer),
1845+call StelRenderer::createVertexBuffer(), and so on.
1846+
1847+Handling construction of graphics classes in StelRenderer allows different
1848+backends (e.g. GL1, GL2) to construct their own implementations.
1849+
1850+@subsection stelvertexbuffer StelVertexBuffer
1851+
1852+StelVertexBuffer is a templated array-like container constructed by
1853+StelRenderer that stores vertices. A vertex is a struct specified by user
1854+through the template argument; it has to fulfill some requirements (see
1855+StelVertexBuffer documentation), e.g. it can't have data members that don't
1856+make sense in a vertex. Various vertex types are possible; vertex type
1857+specifies what attributes to use (position, texcoord, color, normal) as well as
1858+their dimensions.
1859+
1860+Before drawing, a vertex buffer must be locked, allowing things like uploading
1861+vertices to the GPU. Vertex buffers are drawn using StelRenderer. If possible,
1862+they should be filled once, locked, and never unlocked again. Backend might
1863+then move the vertex data to the GPU, greatly improving performance even if
1864+some extra vertices are drawn.
1865+
1866+@subsection stelindexbuffer StelIndexBuffer
1867+
1868+Index buffers can be used with vertex buffers to specify which vertices to
1869+draw. For example, a vertex buffer containing a 2D grid might be used with
1870+many index buffers (one draw per index buffer), each specifying a row of the
1871+grid as a triangle strip. StelIndexBuffer API is similar to StelVertexBuffer,
1872+but it's not templated. There are 2 index types (specified at construction);
1873+16bit and 32bit. 16bit is faster but only usable with with up to 65535
1874+vertices. Again, the buffer must be locked before drawing, and it's best to
1875+keep it locked for a long time without modifications.
1876+
1877+@subsection steltexturenew StelTextureNew
1878+
1879+Textures are bound to texture units to be used in following draws. Textures
1880+are used only with vertex types that have texture coordinates. By default, only
1881+the texture bound to the first texture unit is drawn, interpreted as color.
1882+Shaders can also use other texture units and interpret the texture differently
1883+(as normals, specularity, etc.).
1884+
1885+StelTextureNew is the interface class for textures. StelRenderer never fails to
1886+construct a texture, but the new texture might be in various states. If loading
1887+fails, the texture is in "Error" state, and, when bound, a placeholder texture
1888+is used instead. Depending on creation parameters, a texture might still be
1889+loading in background when constructed. It might even wait to start loading
1890+until the first time it's bound. In this case the placeholder is used until
1891+loading finishes.
1892+
1893+@subsection stelglslshader StelGLSLShader
1894+
1895+Shaders are programs running on the GPU that can override default graphics
1896+functionality. They are usually used for advanced effects such as normal
1897+mapping, shadows, and so on. Some backends (GL2) might draw everything with
1898+shaders internally, but default graphics functionality is unchanged. Graphics
1899+APIs have different shader languages; for OpenGL, GLSL is used. There is no
1900+simple way to abstract this behind a backend-independent interface, so instead
1901+of a generic "Shader" class, GLSL is used as an optional StelRenderer feature
1902+that might not be supported by a backend. If ever needed, support for HLSL
1903+(used by Direct3D) might be implemented in a similar way.
1904+
1905+StelGLSLShader is a GLSL shader program class constructed by StelRenderer. The
1906+program is composed of vertex and fragment shaders, equivalent to .c files in
1907+a C program. There must be at least one vertex and one fragment shader. There
1908+might be more, which is useful for more complex shaders. There can only be one
1909+main() function for vertex shader and one for fragment shader. Shaders can be
1910+named, and enabled or disabled by name, allowing for exchangeable modules.
1911+
1912+Vertex shaders run once per vertex while fragment shaders run at least once per
1913+pixel. Keep this in mind; a graphics scene might have 100000 vertices but it
1914+will likely have many more pixels, e.g. 1920x1080 is roughly 2000000 pixels.
1915+
1916+Code using GLSL must be optional as the renderer might not support it. The code
1917+must first ask StelRenderer if GLSL is supported, if so, use the GLSL-based
1918+code, and otherwise use a fallback implemented without shaders. For
1919+non-essential effects, like shadows, disabling the effect without a fallback
1920+might be enough.
1921+
1922+
1923+@subsection extensions Renderer extension classes
1924+
1925+Some graphics functionality is commonly used but can be implemented using
1926+existing Renderer API. Unless heavy optimizations are needed , this
1927+functionality should be built on top of other Renderer classes. I call this
1928+"extensions". The advantage of extensions is that they only depend on the
1929+public Renderer API, reducing work needed to be done in each backend.
1930+
1931+An example is sphere drawing. While StelRenderer could have a "drawSphere"
1932+member function, adding such functions might result in a difficult to implement
1933+API. So instead we have a class that builds sphere vertex/index buffers using
1934+existing API.
1935+
1936+Current extension classes are StelGeometryBuilder and StelCircleArcRenderer.
1937+The former builds vertex buffers with various geometry to be drawn. The latter
1938+draws circle arcs, used to display various lines in the sky with correct
1939+curvature.
1940+
1941+
1942+@section api_philosophy API design philosophy
1943+
1944+Renderer is designed with five priorities, in this order:
1945+
1946+<ol>
1947+<li> ease of use (code using Renderer) </li>
1948+<li> portability (ease of backend implementation) </li>
1949+<li> maintainability (avoid bug creep, avoid API breaking) </li>
1950+<li> speed (FPS) </li>
1951+<li> power (features) </li>
1952+</ol>
1953+
1954+This is not absolute. Portability can trump ease of use; otherwise we'd use
1955+a plain GL2+ wrapper. Same is true for speed; otherwise we'd have an
1956+immediate mode style API.
1957+
1958+Ease of use is rather obvious. Drawing code should be as simple as possible.
1959+While some graphics knowledge is required, we should not require mastery of
1960+OpenGL.
1961+
1962+Portability matters as Stellarium runs not only on the PC OS's, but also on
1963+mobile platforms and maybe even some embedded systems. Getting a basic backend
1964+for a new platform to work should be a straightforward, one-week task.
1965+Eventually, Stellarium will need backends for OpenGL 4+ and OpenGL ES 3.
1966+A backend should not need to implement hundreds of functions.
1967+
1968+Maintainability is close to portability. To be portable, an API should be
1969+simple, and a simple API will also be more maintainable. Features should not be
1970+added because they are cool; they should be added when needed. They should be
1971+well documented, both API and implementation. Documentation should include code
1972+examples if possible, and be updated immediately when a feature changes, not
1973+"when time allows it". Tests should be added when possible; we still need to
1974+improve this. Code should be simple first. Unless it absolutely needs to be
1975+powerful and/or optimized, it should be easy to read. 100-line functions are
1976+bad. 1000-line files are unacceptable.
1977+
1978+Speed is important as Stellarium is a real-time app. It's not Crysis, so speed
1979+isn't the main priority, but it's not Crysis, so it shouldn't require high-end
1980+hardware. Old GPUs should work, as should modern integrated GPUs. With
1981+Stellarium's graphics it's viable to support mainstream hardware up to 10 years
1982+old. That said, speed often conflicts with maintainability. Optimization should
1983+only be done based on careful profiling and measurable gains. Adding 1000
1984+lines to get 0.1 FPS will result in bugs and maybe even slowdown as code rots
1985+and hardware changes.
1986+
1987+The API must be powerful to draw everything Stellarium needs. However, we
1988+don't compete in the demoscene; if not adding a feature Stellarium does not
1989+need will make the API simpler or more portable, we shouldn't add it. For
1990+example, StelRenderer depth buffer functionality doesn't match OpenGL; it only
1991+covers the cases we use (with a mechanism to add more if needed). This
1992+disallows creating some effects possible with OpenGL, but it is simpler, and
1993+much easier to emulate on a backend that does not support these particular
1994+OpenGL features.
1995+
1996+
1997+@section implementation Implementation
1998+
1999+@subsection impl_overview Overview
2000+
2001+@image html renderer-implementation-overview.png
2002+
2003+Currently there are two Renderer backends: QGL1 and QGL2, based on OpenGL 1.1
2004+and OpenGL 2.1 respectively. They use Qt's QGL classes for things like context
2005+management and texture upload. Code common for both versions, like some GL
2006+state, textures, viewport and vertex array manipulation, is shared between
2007+these, while code such as fixed-function/shaders and drawing is separate.
2008+
2009+The QGL1 backend is designed for compatibility with old hardware; it doesn't
2010+usually use new features brought by extensions or later GL 1.x versions. It
2011+requires GL 1.1 for vertex array support. After Qt5 removes GL 1.x support this
2012+backend should still work as GL 2.x is backwards compatible with GL 1.x; but
2013+only on drivers that support GL 2.x . It provides better compatibility/speed
2014+for older GPUs and buggy drivers.
2015+
2016+The QGL2 backend should use GL 2.1 to its fullest, and might even have
2017+optionally use features from GL 3.x and extensions, but never require them. An
2018+example is float texture support, which requires GL 3.0 . It's required for
2019+advanced effects such as shadows, and obviously for any GLSL based effects.
2020+It's also likely to be slower than the QGL1 backend.
2021+
2022+
2023+@subsection viewport StelQGLViewport
2024+
2025+Manages the viewport. It handles capturing the screen to a texture, screenshots
2026+and so on. If FBOs are supported and not disabled, custom double buffering
2027+logic is used allowing to interrupt a frame in progress to increase
2028+responsiveness, finishing the drawing later.
2029+
2030+@subsection vertexbufferbackend StelVertexBufferBackend and implementations
2031+
2032+In C++, a templated function can never be virtual; so
2033+<strong>createVertexBuffer()</strong> functions of StelRenderer implementations
2034+can't construct objects derived from
2035+<strong>StelVertexBuffer<SomeVertexType></strong> . To work around this
2036+limitation without sacrificing its safe templated API StelVertexBuffer wraps
2037+a non-templated class, StelVertexBufferBackend, from which backend vertex
2038+buffers are derived. StelRenderer has an internal virtual function that allows
2039+its implementations to return a custom vertex buffer backend type.
2040+
2041+StelVertexBufferBackend doesn't know the vertex type directly; it uses metadata
2042+from the VERTEX_ATTRIBUTES macro in the vertex type describing its layout and
2043+vertex attributes (data members).
2044+
2045+Currently, only one vertex buffer backend exists;
2046+StelQGLArrayVertexBufferBackend, based on vertex arrays where each vertex
2047+attribute is in a separate array. GL version specific backends
2048+StelQGL1ArrayVertexBufferBackend and StelQGL2ArrayVertexBufferBackend, used by
2049+StelQGL1Renderer and StelQGL2Renderer respectively, derive from it, specifying
2050+drawing logic (fixed function for QGL1 and shaders for QGL2).
2051+
2052+@subsection texturebackend StelTextureBackend and implementations
2053+
2054+Like StelVertexBuffer, StelTextureNew wraps a backend class;
2055+StelTextureBackend, from which the each backend derives. The reason is not
2056+templating; the API class and backend are separate so the former is owned by
2057+user code, while the latter might be owned by the renderer backend. This
2058+allows for features like texture caching; deleting the frontend decreases
2059+a reference count of the backend in cache. Caching is used internally to avoid
2060+loading the same texture twice. If creating a texture from a previously loaded
2061+file we can return a cached texture instead, wrapping the same
2062+StelTextureBackend in a different StelTextureNew. Caching is not mandatory, so
2063+there might be backends that don't use it.
2064+
2065+The only backend right now is StelQGLTextureBackend, used both for GL1 and GL2
2066+(it's managed by StelQGLRenderer). It uses Qt functions to load textures with
2067+some exceptions like loading textures from raw data, when plain GL texture
2068+functions are used.
2069+
2070+@subsection qglglslshader StelQGLGLSLShader
2071+
2072+This is the shader backend used by StelQGL2Renderer. It uses QGL to manage
2073+shaders. All shaders added are stored in compiled form. When
2074+<strong>build()</strong> is called, enabled shaders are linked into a shader
2075+program, but the program is only bound inside StelQGL2Renderer's draw code.
2076+Linked programs are cached so we never link the same program twice. Any
2077+uniforms set are stored in temporary storage and only passed when the
2078+underlying program is bound.
2079+
2080+@subsection rendererbackend StelQGLRenderer, StelQGL1Renderer, StelQGL2Renderer
2081+
2082+The GL1 and GL2 backends share much code; this code is in the StelQGLRenderer
2083+class. This includes text and rectangle drawing, texture management,
2084+viewport (StelQGLViewport), and so on.
2085+
2086+StelQGL1Renderer contains GL1 specific code. This is mostly pre-draw setup
2087+(drawing is done by StelQGL1ArrayVertexBufferBackend) and various GL1 specific
2088+state.
2089+
2090+StelQGL2Renderer is more complicated. Along with functionality equivalent to
2091+StelQGL1Renderer, it also manages shaders. Especially important is swapping of
2092+default shaders, which emulate a simplified fixed function pipeline with
2093+specific vertex formats, and custom shaders specified by the user by binding
2094+a StelGLSLShader.
2095+
2096+
2097+@section implementation_philosophy Implementation philosophy
2098+
2099+Implementation is usually secondary to the API (ease of use); it needs to work
2100+within its constraints. It's not acceptable to break the API just to make
2101+implementation a bit more convenient. The main priorities of the implementation
2102+are maintainability and speed. Portability is not much of a concern - we might
2103+e.g. have a Windows-only Direct3D implementation, as long as we have
2104+implementations to cover other platforms. Power and ease of use are determined
2105+by the API.
2106+
2107+Maintainability is often in direct conflict with speed; highly optimized code
2108+is hard to maintain. There is one way we can deal with this; for any part of
2109+the subsystem, a simple and readable, not necessarily fast, implementation
2110+should exist. This can then be used as a reference when writing other
2111+implementations (for different platforms or for speed) and for testing.
2112+StelQGLArrayVertexBufferBackend, StelQGLIndexBuffer, StelQGLGLSLShader and
2113+StelQGLTextureBackend can be considered such references, but they could
2114+probably be simpler if they should serve exclusively this purpose.
2115+
2116+We can also have implementations designed for speed, optimized as much as
2117+possible. For example, a vertex buffer implementation could internally switch
2118+between vertex arrays and VBOs based on last time the buffer was updated.
2119+Complexity is acceptable here as long as it brings speed gains.
2120+
2121+The advantage of this approach is that we always have an implementation that
2122+works and is maintainable. Optimized implementations might be thrown out and
2123+replaced if maintainability is a problem, but we still have something that
2124+works.
2125+
2126+
2127+@section usage_patterns Why not singleton & Usage patterns
2128+
2129+Unlike other core services, StelRenderer is not directly accessible through
2130+StelCore, nor is there any way to access it globally. Only one StelRenderer
2131+exists, but it's not a singleton. Drawing code usually gets a StelRenderer
2132+through a parameter. This has more to do with maintainability than ease of
2133+use; a globally accessible StelRenderer might be easier to use, removing need
2134+for lazy initialization.
2135+
2136+Initialization and destruction of StelRenderer backend happens at well defined
2137+times and when a StelRenderer pointer is passed to drawing code, it's
2138+guaranteed to be initialized. Graphics accessing a StelRenderer globally might
2139+end up using an uninitialized StelRenderer, or, if it was a lazily initialized
2140+singleton, trigger premature initialization.
2141+
2142+In future Renderer could be enhanced to allow switching backends
2143+post-initialization, even for single frames (e.g. export to document formats).
2144+This would be more complicated with a global renderer, although the main
2145+problem here is different - allowing API objects constructed by one renderer to
2146+work with another.
2147+
2148+Finally, the main reason why StelRenderer is not globally accessible is making
2149+any future (however distant) major rewrites less complicated. Refactoring
2150+previous drawing code was made difficult by circular dependencies of various
2151+parts of code; not in the "include" sense, but in "classes using each other"
2152+sense. There was no clear point to start - many things had to be refactored
2153+simultaneously. Removing global accessibility makes dependencies more similar
2154+to a directed acyclic graph and there are clear points to start changes.
2155+
2156+The disadvantage of a non-global StelRenderer is that we can't access it when
2157+initializing drawing code (unless it's explicitly passed). I.e. we can't load
2158+our textures when a class using StelRenderer is constructed. However, we don't
2159+need to initialize at construction; we only need the drawing objects to be
2160+ready before drawing. We can initialize them lazily. One way to do this is
2161+initializing drawing data in a function called during the first draw,setting an
2162+"initialized" flag, and only letting destructor destroy this data if this flag
2163+is set. This is less convenient, but it might actually improve performance as
2164+we only initialize drawing data once we need it.
2165+
2166+
2167+@section future Future development
2168+
2169+
2170+The Renderer API is quite complete and should be sufficient for some time;
2171+especially the shader support can be used for various new graphics features.
2172+However, backend performance, especially the GL2 backend, leaves something to
2173+be desired. Also, now that all drawing is separated, new debugging and
2174+profiling features are possible.
2175+
2176+One near-term goal is collection of statistics about the backend's operation.
2177+We should be able to collect data about things such as the number of calls of
2178+specific functions per frame, triangles/vertices/indices per frame, underlying
2179+OpenGL draw calls, state changes, etc. . In combination with profiling data
2180+this should make finding bottlenecks easier. More importantly, it should help
2181+find inefficiencies in user code, such as plugins, and help plugin authors
2182+improve performance of their code.
2183+
2184+Currently, Renderer backend classes are implemented in a mostly straightforward
2185+way. We should be able to improve performance by optimizing or adding
2186+alternative high-performance backends.
2187+
2188+A major optimization would be a VBO (vertex buffer object) vertex buffer
2189+backend. With VBOs, vertex data is in GPU memory, freeing the bus. This can
2190+result in massive performance increase, even an order of magnitude. As the data
2191+must be stored on the GPU instead of being permanently re-uploaded, this is
2192+only useful if we have a lot of graphics data that never changes. Otherwise
2193+performance is likely to drop instead of increasing. Right now VBOs could help
2194+with things like planets and models, but the majority of drawing is done by
2195+StelSkyDrawer (point sources, mostly stars), where vertex data is regenerated
2196+every frame. Rewriting some StelSkyDrawer users, especially
2197+BigStarCatalogExtension::ZoneArray, to use static vertex buffers initialized
2198+once and never modified, would result in more vertices per frame, but it might
2199+make VBOs viable which would likely bring massive performance boost. Other
2200+work currently done on the CPU, such as vertex projection, would also have to
2201+be done on GPU (this is already done for stereographic projection).
2202+
2203+A non-essential, but useful future addition would be the ability to switch
2204+backends at any time. This would require all StelRenderer constructed classes
2205+to have separate frontend and backend objects, as StelVertexBuffer and
2206+StelTextureNew already have, and the frontends would need to store all data
2207+needed to reconstruct the backends - probably duplicating a lot of data. If
2208+a StelRenderer backend would be passed an object constructed by a different
2209+backend, it would delete the object's backend and replace it with its own.
2210+*/
2211
2212=== modified file 'doc/scripting.doxygen'
2213--- doc/scripting.doxygen 2012-03-16 22:11:30 +0000
2214+++ doc/scripting.doxygen 2012-08-30 16:29:19 +0000
2215@@ -29,7 +29,7 @@
2216 This makes it possible to write small programs within Stellarium to produce
2217 presentations, set up custom configurations, and to automate repetitive
2218 tasks. Prior to version 0.10.0, Stellarium used a different scripting engine
2219-called @ref StratoScript.
2220+called @ref stratoscript.
2221
2222 The core scripting language is
2223 <a href="http://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a>, giving users
2224@@ -38,7 +38,7 @@
2225 is done via a collection of objects which represent components of Stellarium
2226 itself. See @ref scripting_api for more details.
2227
2228-@section scratoscript StratoScript
2229+@section stratoscript StratoScript
2230
2231 Prior to version 0.10.0, Stellarium had a simple scripting engine, known as
2232 \e StratoScript. Using \e StratoScript it was possible to record and play back
2233
2234=== modified file 'doc/stellarium-architecture.svg'
2235--- doc/stellarium-architecture.svg 2010-04-18 21:16:11 +0000
2236+++ doc/stellarium-architecture.svg 2012-08-30 16:29:19 +0000
2237@@ -13,7 +13,7 @@
2238 height="744.09448"
2239 id="svg2"
2240 sodipodi:version="0.32"
2241- inkscape:version="0.47pre4 r22446"
2242+ inkscape:version="0.48.3.1 r9886"
2243 version="1.0"
2244 sodipodi:docname="stellarium-architecture.svg"
2245 inkscape:output_extension="org.inkscape.output.svg.inkscape"
2246@@ -135,12 +135,12 @@
2247 inkscape:current-layer="layer1"
2248 width="1052.3622px"
2249 height="744.09448px"
2250- inkscape:window-width="1274"
2251- inkscape:window-height="751"
2252- inkscape:window-x="0"
2253- inkscape:window-y="0"
2254+ inkscape:window-width="2560"
2255+ inkscape:window-height="1385"
2256+ inkscape:window-x="-2"
2257+ inkscape:window-y="-3"
2258 showgrid="false"
2259- inkscape:window-maximized="0" />
2260+ inkscape:window-maximized="1" />
2261 <metadata
2262 id="metadata7">
2263 <rdf:RDF>
2264@@ -149,7 +149,7 @@
2265 <dc:format>image/svg+xml</dc:format>
2266 <dc:type
2267 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
2268- <dc:title></dc:title>
2269+ <dc:title />
2270 </cc:Work>
2271 </rdf:RDF>
2272 </metadata>
2273@@ -189,66 +189,61 @@
2274 sodipodi:role="line"
2275 x="77.209961"
2276 y="454.34995"
2277- id="tspan3142"
2278- style="font-size:16px">StelTextureMgr</tspan><tspan
2279+ id="tspan3144"
2280+ style="font-size:16px">StelRenderer</tspan><tspan
2281 sodipodi:role="line"
2282 x="77.209961"
2283 y="474.34995"
2284- id="tspan3144"
2285- style="font-size:16px">StelFontMgr</tspan><tspan
2286- sodipodi:role="line"
2287- x="77.209961"
2288- y="494.34995"
2289 id="tspan3146"
2290 style="font-size:16px">StelFileMgr</tspan><tspan
2291 sodipodi:role="line"
2292 x="77.209961"
2293- y="514.34998"
2294+ y="494.34995"
2295 id="tspan3148"
2296 style="font-size:16px">StelLocaleMgr</tspan><tspan
2297 sodipodi:role="line"
2298 x="77.209961"
2299+ y="514.34998"
2300+ style="font-size:16px"
2301+ id="tspan10494">StelAudioMgr</tspan><tspan
2302+ sodipodi:role="line"
2303+ x="77.209961"
2304 y="534.34998"
2305 style="font-size:16px"
2306- id="tspan10494">StelAudioMgr</tspan><tspan
2307+ id="tspan10498">StelSkyLayerMgr</tspan><tspan
2308 sodipodi:role="line"
2309 x="77.209961"
2310 y="554.34998"
2311 style="font-size:16px"
2312- id="tspan10498">StelSkyImageMgr</tspan><tspan
2313+ id="tspan10486">StelModuleMgr</tspan><tspan
2314 sodipodi:role="line"
2315 x="77.209961"
2316 y="574.34998"
2317- style="font-size:16px"
2318- id="tspan10486">StelModuleMgr</tspan><tspan
2319- sodipodi:role="line"
2320- x="77.209961"
2321- y="594.34998"
2322 id="tspan3152"
2323 style="font-size:16px">StelSkyCultureMgr</tspan><tspan
2324 sodipodi:role="line"
2325 x="77.209961"
2326+ y="594.34998"
2327+ style="font-size:16px"
2328+ id="tspan11513">StelObjectMgr</tspan><tspan
2329+ sodipodi:role="line"
2330+ x="77.209961"
2331 y="614.34998"
2332 style="font-size:16px"
2333- id="tspan11513">StelObjectMgr</tspan><tspan
2334+ id="tspan2609">StelDownloadMgr</tspan><tspan
2335 sodipodi:role="line"
2336 x="77.209961"
2337 y="634.34998"
2338 style="font-size:16px"
2339- id="tspan2609">StelDownloadMgr</tspan><tspan
2340+ id="tspan2611">StelLocationMgr</tspan><tspan
2341 sodipodi:role="line"
2342 x="77.209961"
2343 y="654.34998"
2344 style="font-size:16px"
2345- id="tspan2611">StelLocationMgr</tspan><tspan
2346+ id="tspan2613">...</tspan><tspan
2347 sodipodi:role="line"
2348 x="77.209961"
2349 y="674.34998"
2350- style="font-size:16px"
2351- id="tspan2613">...</tspan><tspan
2352- sodipodi:role="line"
2353- x="77.209961"
2354- y="694.34998"
2355 style="font-size:18px"
2356 id="tspan6340" /></text>
2357 <rect
2358
2359=== modified file 'plugins/AngleMeasure/src/AngleMeasure.cpp'
2360--- plugins/AngleMeasure/src/AngleMeasure.cpp 2012-08-08 09:44:23 +0000
2361+++ plugins/AngleMeasure/src/AngleMeasure.cpp 2012-08-30 16:29:19 +0000
2362@@ -17,7 +17,6 @@
2363 */
2364
2365 #include "StelProjector.hpp"
2366-#include "StelPainter.hpp"
2367 #include "StelApp.hpp"
2368 #include "StelCore.hpp"
2369 #include "StelFileMgr.hpp"
2370@@ -26,10 +25,10 @@
2371 #include "StelGui.hpp"
2372 #include "StelGuiItems.hpp"
2373 #include "StelIniParser.hpp"
2374-#include "StelVertexArray.hpp"
2375 #include "AngleMeasure.hpp"
2376+#include "renderer/StelCircleArcRenderer.hpp"
2377+#include "renderer/StelRenderer.hpp"
2378
2379-#include <QtOpenGL>
2380 #include <QDebug>
2381 #include <QTimer>
2382 #include <QAction>
2383@@ -152,63 +151,55 @@
2384 }
2385
2386 //! Draw any parts on the screen which are for our module
2387-void AngleMeasure::draw(StelCore* core)
2388+void AngleMeasure::draw(StelCore* core, StelRenderer* renderer)
2389 {
2390 if (lineVisible.getInterstate() < 0.000001f && messageFader.getInterstate() < 0.000001f)
2391 return;
2392
2393 const StelProjectorP prj = core->getProjection(StelCore::FrameEquinoxEqu);
2394- StelPainter painter(prj);
2395- painter.setFont(font);
2396- Vec3f tColor, lColor;
2397- if (StelApp::getInstance().getVisionModeNight())
2398- {
2399- tColor = StelUtils::getNightColor(textColor);
2400- lColor = StelUtils::getNightColor(lineColor);
2401- }
2402- else
2403- {
2404- tColor = textColor;
2405- lColor = lineColor;
2406- }
2407+
2408+ renderer->setFont(font);
2409+
2410+ const bool night = StelApp::getInstance().getVisionModeNight();
2411+ const Vec3f tColor = night ? StelUtils::getNightColor(textColor) : lineColor;
2412+ const Vec3f lColor = night ? StelUtils::getNightColor(lineColor) : lineColor;
2413
2414 if (lineVisible.getInterstate() > 0.000001f)
2415 {
2416- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2417- glEnable(GL_BLEND);
2418- glEnable(GL_TEXTURE_2D);
2419+ renderer->setBlendMode(BlendMode_Alpha);
2420
2421 Vec3d xy;
2422 if (prj->project(perp1EndPoint,xy))
2423 {
2424- painter.setColor(tColor[0], tColor[1], tColor[2], lineVisible.getInterstate());
2425- painter.drawText(xy[0], xy[1], angleText, 0, 15, 15);
2426+ renderer->setGlobalColor(tColor[0], tColor[1], tColor[2],
2427+ lineVisible.getInterstate());
2428+ renderer->drawText(TextParams(xy[0], xy[1], angleText).shift(15, 15));
2429 }
2430
2431- glDisable(GL_TEXTURE_2D);
2432- glEnable(GL_LINE_SMOOTH);
2433- glEnable(GL_BLEND);
2434-
2435- // main line is a great circle
2436- painter.setColor(lColor[0], lColor[1], lColor[2], lineVisible.getInterstate());
2437- painter.drawGreatCircleArc(startPoint, endPoint, NULL);
2438+ renderer->setGlobalColor(lColor[0], lColor[1], lColor[2],
2439+ lineVisible.getInterstate());
2440+
2441+ // main line is a great circle
2442+ StelCircleArcRenderer circleArcRenderer(renderer, prj);
2443+ circleArcRenderer.drawGreatCircleArc(startPoint, endPoint);
2444
2445 // End lines
2446- painter.drawGreatCircleArc(perp1StartPoint, perp1EndPoint, NULL);
2447- painter.drawGreatCircleArc(perp2StartPoint, perp2EndPoint, NULL);
2448+ circleArcRenderer.drawGreatCircleArc(perp1StartPoint, perp1EndPoint);
2449+ circleArcRenderer.drawGreatCircleArc(perp2StartPoint, perp2EndPoint);
2450 }
2451
2452 if (messageFader.getInterstate() > 0.000001f)
2453 {
2454- painter.setColor(tColor[0], tColor[1], tColor[2], messageFader.getInterstate());
2455+ renderer->setGlobalColor(tColor[0], tColor[1], tColor[2],
2456+ messageFader.getInterstate());
2457 int x = 83;
2458 int y = 120;
2459- int ls = painter.getFontMetrics().lineSpacing();
2460- painter.drawText(x, y, messageEnabled);
2461- y -= ls;
2462- painter.drawText(x, y, messageLeftButton);
2463- y -= ls;
2464- painter.drawText(x, y, messageRightButton);
2465+ const int ls = QFontMetrics(font).lineSpacing();
2466+ renderer->drawText(TextParams(x, y, messageEnabled));
2467+ y -= ls;
2468+ renderer->drawText(TextParams(x, y, messageLeftButton));
2469+ y -= ls;
2470+ renderer->drawText(TextParams(x, y, messageRightButton));
2471 }
2472 }
2473
2474
2475=== modified file 'plugins/AngleMeasure/src/AngleMeasure.hpp'
2476--- plugins/AngleMeasure/src/AngleMeasure.hpp 2012-01-11 10:50:37 +0000
2477+++ plugins/AngleMeasure/src/AngleMeasure.hpp 2012-08-30 16:29:19 +0000
2478@@ -40,7 +40,7 @@
2479 // Methods defined in the StelModule class
2480 virtual void init();
2481 virtual void update(double deltaTime);
2482- virtual void draw(StelCore* core);
2483+ virtual void draw(StelCore* core, class StelRenderer* renderer);
2484 virtual double getCallOrder(StelModuleActionName actionName) const;
2485 virtual void handleKeys(class QKeyEvent* event);
2486 virtual void handleMouseClicks(class QMouseEvent* event);
2487
2488=== modified file 'plugins/CompassMarks/src/CompassMarks.cpp'
2489--- plugins/CompassMarks/src/CompassMarks.cpp 2012-08-26 16:11:26 +0000
2490+++ plugins/CompassMarks/src/CompassMarks.cpp 2012-08-30 16:29:19 +0000
2491@@ -18,7 +18,6 @@
2492
2493 #include "VecMath.hpp"
2494 #include "StelProjector.hpp"
2495-#include "StelPainter.hpp"
2496 #include "StelApp.hpp"
2497 #include "StelCore.hpp"
2498 #include "StelLocaleMgr.hpp"
2499@@ -30,8 +29,9 @@
2500 #include "StelGui.hpp"
2501 #include "StelGuiItems.hpp"
2502 #include "StelIniParser.hpp"
2503+#include "renderer/StelCircleArcRenderer.hpp"
2504+#include "renderer/StelRenderer.hpp"
2505
2506-#include <QtOpenGL>
2507 #include <QAction>
2508 #include <QDebug>
2509 #include <QPixmap>
2510@@ -146,27 +146,23 @@
2511 }
2512
2513 //! Draw any parts on the screen which are for our module
2514-void CompassMarks::draw(StelCore* core)
2515+void CompassMarks::draw(StelCore* core, StelRenderer* renderer)
2516 {
2517 if (markFader.getInterstate() <= 0.0) { return; }
2518
2519 Vec3d pos;
2520- StelProjectorP prj = core->getProjection(StelCore::FrameAltAz, StelCore::RefractionOff); // Maybe conflict with Scenery3d branch. AW20120214 No. GZ20120826.
2521- StelPainter painter(prj);
2522- painter.setFont(font);
2523-
2524- Vec3f mColor;
2525- if (StelApp::getInstance().getVisionModeNight())
2526- mColor = StelUtils::getNightColor(markColor);
2527- else
2528- mColor = markColor;
2529-
2530- glColor4f(mColor[0], mColor[1], mColor[2], markFader.getInterstate());
2531- glDisable(GL_TEXTURE_2D);
2532- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
2533- glEnable(GL_BLEND);
2534- glEnable(GL_LINE_SMOOTH);
2535-
2536+ StelProjectorP prj = core->getProjection(StelCore::FrameAltAz, StelCore::RefractionOff); // Maybe conflict with Scenery3d branch. AW20120214 No. GZ20120826.yy
2537+
2538+ renderer->setFont(font);
2539+ const Vec3f mColor = StelApp::getInstance().getVisionModeNight()
2540+ ? StelUtils::getNightColor(markColor) : markColor;
2541+
2542+ renderer->setGlobalColor(mColor[0], mColor[1], mColor[2], markFader.getInterstate());
2543+ renderer->setBlendMode(BlendMode_Alpha);
2544+
2545+ StelCircleArcRenderer circleArcRenderer(renderer, prj);
2546+ const QFontMetrics fontMetrics(font);
2547+
2548 for(int i=0; i<360; i++)
2549 {
2550 float a = i*M_PI/180;
2551@@ -177,24 +173,17 @@
2552 h = -0.02; // the size of the mark every 15 degrees
2553
2554 QString s = QString("%1").arg((i+90)%360);
2555-
2556- float shiftx = painter.getFontMetrics().width(s) / 2.;
2557- float shifty = painter.getFontMetrics().height() / 2.;
2558- painter.drawText(pos, s, 0, -shiftx, shifty);
2559+ const float shiftx = fontMetrics.width(s) / 2.;
2560+ const float shifty = fontMetrics.height() / 2.;
2561+ renderer->drawText(TextParams(pos, prj, s).shift(-shiftx, shifty));
2562 }
2563 else if (i % 5 == 0)
2564 {
2565 h = -0.01; // the size of the mark every 5 degrees
2566 }
2567
2568- glDisable(GL_TEXTURE_2D);
2569- painter.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1], h), NULL);
2570- glEnable(GL_TEXTURE_2D);
2571+ circleArcRenderer.drawGreatCircleArc(pos, Vec3d(pos[0], pos[1], h));
2572 }
2573- glDisable(GL_LINE_SMOOTH);
2574- glDisable(GL_BLEND);
2575- glEnable(GL_TEXTURE_2D);
2576-
2577 }
2578
2579 void CompassMarks::update(double deltaTime)
2580
2581=== modified file 'plugins/CompassMarks/src/CompassMarks.hpp'
2582--- plugins/CompassMarks/src/CompassMarks.hpp 2012-01-11 10:50:37 +0000
2583+++ plugins/CompassMarks/src/CompassMarks.hpp 2012-08-30 16:29:19 +0000
2584@@ -39,7 +39,7 @@
2585 // Methods defined in the StelModule class
2586 virtual void init();
2587 virtual void update(double deltaTime);
2588- virtual void draw(StelCore* core);
2589+ virtual void draw(StelCore* core, class StelRenderer* renderer);
2590 virtual double getCallOrder(StelModuleActionName actionName) const;
2591
2592 public slots:
2593
2594=== modified file 'plugins/Exoplanets/src/Exoplanet.cpp'
2595--- plugins/Exoplanets/src/Exoplanet.cpp 2012-08-08 10:11:01 +0000
2596+++ plugins/Exoplanets/src/Exoplanet.cpp 2012-08-30 16:29:19 +0000
2597@@ -18,25 +18,22 @@
2598
2599 #include "Exoplanet.hpp"
2600 #include "StelObject.hpp"
2601-#include "StelPainter.hpp"
2602 #include "StelApp.hpp"
2603 #include "StelCore.hpp"
2604-#include "StelTexture.hpp"
2605 #include "StelUtils.hpp"
2606 #include "StelTranslator.hpp"
2607 #include "StelModuleMgr.hpp"
2608 #include "StelSkyDrawer.hpp"
2609+#include "renderer/StelRenderer.hpp"
2610+#include "renderer/StelTextureNew.hpp"
2611
2612 #include <QTextStream>
2613 #include <QDebug>
2614 #include <QVariant>
2615-#include <QtOpenGL>
2616 #include <QVariantMap>
2617 #include <QVariant>
2618 #include <QList>
2619
2620-StelTextureSP Exoplanet::markerTexture;
2621-
2622 Exoplanet::Exoplanet(const QVariantMap& map)
2623 : initialized(false)
2624 {
2625@@ -355,31 +352,33 @@
2626 labelsFader.update((int)(deltaTime*1000));
2627 }
2628
2629-void Exoplanet::draw(StelCore* core, StelPainter& painter)
2630+void Exoplanet::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector,
2631+ StelTextureNew* markerTexture)
2632 {
2633 StelSkyDrawer* sd = core->getSkyDrawer();
2634
2635 Vec3f color = Vec3f(0.4f,1.2f,0.5f);
2636 if (StelApp::getInstance().getVisionModeNight())
2637 color = StelUtils::getNightColor(color);
2638-
2639- double mag = getVMagnitude(core, true);
2640+ const double mag = getVMagnitude(core, true);
2641
2642 StelUtils::spheToRect(RA, DE, XYZ);
2643- glEnable(GL_BLEND);
2644- glBlendFunc(GL_ONE, GL_ONE);
2645- painter.setColor(color[0], color[1], color[2], 1);
2646+ renderer->setBlendMode(BlendMode_Add);
2647+ renderer->setGlobalColor(color[0], color[1], color[2]);
2648
2649 if (mag <= sd->getLimitMagnitude())
2650 {
2651-
2652- Exoplanet::markerTexture->bind();
2653- float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
2654- float shift = 5.f + size/1.6f;
2655+ markerTexture->bind();
2656+ const float size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
2657+ const float shift = 5.f + size/1.6f;
2658 if (labelsFader.getInterstate()<=0.f)
2659 {
2660- painter.drawSprite2dMode(XYZ, 5);
2661- painter.drawText(XYZ, designation, 0, shift, shift, false);
2662+ Vec3d win;
2663+ if(projector->project(XYZ, win))
2664+ {
2665+ renderer->drawTexturedRect(win[0] - 5, win[1] - 5, 10, 10);
2666+ renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
2667+ }
2668 }
2669 }
2670 }
2671
2672=== modified file 'plugins/Exoplanets/src/Exoplanet.hpp'
2673--- plugins/Exoplanets/src/Exoplanet.hpp 2012-08-05 12:24:40 +0000
2674+++ plugins/Exoplanets/src/Exoplanet.hpp 2012-08-30 16:29:19 +0000
2675@@ -27,8 +27,7 @@
2676 #include <QDateTime>
2677
2678 #include "StelObject.hpp"
2679-#include "StelTextureTypes.hpp"
2680-#include "StelPainter.hpp"
2681+#include "StelProjectorType.hpp"
2682 #include "StelFader.hpp"
2683
2684 typedef struct
2685@@ -44,7 +43,6 @@
2686 int discovered; //! Exoplanet discovered year
2687 } exoplanetData;
2688
2689-class StelPainter;
2690
2691 //! @class Exoplanet
2692 //! A exoplanet object represents one pulsar on the sky.
2693@@ -101,10 +99,8 @@
2694
2695 Vec3d XYZ; // holds J2000 position
2696
2697- static StelTextureSP hintTexture;
2698- static StelTextureSP markerTexture;
2699-
2700- void draw(StelCore* core, StelPainter& painter);
2701+ void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector,
2702+ class StelTextureNew* markerTexture);
2703
2704 //! Variables for description of properties of exoplanets
2705 QString designation; //! The designation of the host star
2706
2707=== modified file 'plugins/Exoplanets/src/Exoplanets.cpp'
2708--- plugins/Exoplanets/src/Exoplanets.cpp 2012-08-05 12:35:06 +0000
2709+++ plugins/Exoplanets/src/Exoplanets.cpp 2012-08-30 16:29:19 +0000
2710@@ -17,7 +17,6 @@
2711 */
2712
2713 #include "StelProjector.hpp"
2714-#include "StelPainter.hpp"
2715 #include "StelApp.hpp"
2716 #include "StelCore.hpp"
2717 #include "StelGui.hpp"
2718@@ -25,11 +24,12 @@
2719 #include "StelLocaleMgr.hpp"
2720 #include "StelModuleMgr.hpp"
2721 #include "StelObjectMgr.hpp"
2722-#include "StelTextureMgr.hpp"
2723 #include "StelJsonParser.hpp"
2724 #include "StelFileMgr.hpp"
2725 #include "StelUtils.hpp"
2726 #include "StelTranslator.hpp"
2727+#include "renderer/StelRenderer.hpp"
2728+#include "renderer/StelTextureNew.hpp"
2729 #include "LabelMgr.hpp"
2730 #include "Exoplanets.hpp"
2731 #include "Exoplanet.hpp"
2732@@ -47,6 +47,7 @@
2733 #include <QVariantMap>
2734 #include <QVariant>
2735 #include <QList>
2736+#include <QSettings>
2737 #include <QSharedPointer>
2738 #include <QStringList>
2739 #include <QPixmap>
2740@@ -82,7 +83,14 @@
2741 Constructor
2742 */
2743 Exoplanets::Exoplanets()
2744- : flagShowExoplanets(false), OnIcon(NULL), OffIcon(NULL), GlowIcon(NULL), toolbarButton(NULL), progressBar(NULL)
2745+ : texPointer(NULL)
2746+ , markerTexture(NULL)
2747+ , flagShowExoplanets(false)
2748+ , OnIcon(NULL)
2749+ , OffIcon(NULL)
2750+ , GlowIcon(NULL)
2751+ , toolbarButton(NULL)
2752+ , progressBar(NULL)
2753 {
2754 setObjectName("Exoplanets");
2755 exoplanetsConfigDialog = new ExoplanetsDialog();
2756@@ -108,8 +116,9 @@
2757 void Exoplanets::deinit()
2758 {
2759 ep.clear();
2760- Exoplanet::markerTexture.clear();
2761- texPointer.clear();
2762+ if(NULL != texPointer) {delete texPointer;}
2763+ if(NULL != markerTexture) {delete markerTexture;}
2764+ texPointer = markerTexture = NULL;
2765 }
2766
2767 void Exoplanets::update(double) //deltaTime
2768@@ -149,9 +158,6 @@
2769
2770 jsonCatalogPath = StelFileMgr::findFile("modules/Exoplanets", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/exoplanets.json";
2771
2772- texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
2773- Exoplanet::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Exoplanets/exoplanet.png");
2774-
2775 // key bindings and other actions
2776 // TRANSLATORS: Title of a group of key bindings in the Help window
2777 QString groupName = N_("Plugin Key Bindings");
2778@@ -218,27 +224,33 @@
2779 /*
2780 Draw our module. This should print name of first PSR in the main window
2781 */
2782-void Exoplanets::draw(StelCore* core)
2783+void Exoplanets::draw(StelCore* core, StelRenderer* renderer)
2784 {
2785 if (!flagShowExoplanets)
2786 return;
2787
2788 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
2789- StelPainter painter(prj);
2790- painter.setFont(font);
2791+ renderer->setFont(font);
2792+
2793+ if(NULL == texPointer)
2794+ {
2795+ Q_ASSERT_X(NULL == markerTexture, Q_FUNC_INFO, "Textures need to be created simultaneously");
2796+ texPointer = renderer->createTexture("textures/pointeur2.png");
2797+ markerTexture = renderer->createTexture(":/Exoplanets/exoplanet.png");
2798+ }
2799
2800 foreach (const ExoplanetP& eps, ep)
2801 {
2802 if (eps && eps->initialized)
2803- eps->draw(core, painter);
2804+ eps->draw(core, renderer, prj, markerTexture);
2805 }
2806
2807 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
2808- drawPointer(core, painter);
2809+ drawPointer(core, renderer, prj);
2810
2811 }
2812
2813-void Exoplanets::drawPointer(StelCore* core, StelPainter& painter)
2814+void Exoplanets::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
2815 {
2816 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
2817
2818@@ -250,16 +262,15 @@
2819
2820 Vec3d screenpos;
2821 // Compute 2D pos and return if outside screen
2822- if (!painter.getProjector()->project(pos, screenpos))
2823+ if (!projector->project(pos, screenpos))
2824 return;
2825
2826 const Vec3f& c(obj->getInfoColor());
2827- painter.setColor(c[0],c[1],c[2]);
2828+ renderer->setGlobalColor(c[0],c[1],c[2]);
2829 texPointer->bind();
2830- painter.enableTexture2d(true);
2831- glEnable(GL_BLEND);
2832- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
2833- painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
2834+ renderer->setBlendMode(BlendMode_Alpha);
2835+ renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f,
2836+ 26.0f, StelApp::getInstance().getTotalRunTime() * 40.0f);
2837 }
2838 }
2839
2840
2841=== modified file 'plugins/Exoplanets/src/Exoplanets.hpp'
2842--- plugins/Exoplanets/src/Exoplanets.hpp 2012-06-21 16:40:28 +0000
2843+++ plugins/Exoplanets/src/Exoplanets.hpp 2012-08-30 16:29:19 +0000
2844@@ -22,8 +22,6 @@
2845 #include "StelObjectModule.hpp"
2846 #include "StelObject.hpp"
2847 #include "StelFader.hpp"
2848-#include "StelTextureTypes.hpp"
2849-#include "StelPainter.hpp"
2850 #include "Exoplanet.hpp"
2851 #include <QFont>
2852 #include <QVariantMap>
2853@@ -37,7 +35,6 @@
2854 class QSettings;
2855 class QTimer;
2856 class ExoplanetsDialog;
2857-class StelPainter;
2858 class QPixmap;
2859 class StelButton;
2860
2861@@ -66,8 +63,9 @@
2862 virtual void init();
2863 virtual void deinit();
2864 virtual void update(double deltaTime);
2865- virtual void draw(StelCore* core);
2866- virtual void drawPointer(StelCore* core, StelPainter& painter);
2867+ virtual void draw(StelCore* core, class StelRenderer* renderer);
2868+ virtual void drawPointer(StelCore* core, class StelRenderer* renderer,
2869+ StelProjectorP projector);
2870 virtual double getCallOrder(StelModuleActionName actionName) const;
2871
2872 ///////////////////////////////////////////////////////////////////////////
2873@@ -181,7 +179,8 @@
2874
2875 QString jsonCatalogPath;
2876
2877- StelTextureSP texPointer;
2878+ StelTextureNew* texPointer;
2879+ StelTextureNew* markerTexture;
2880 QList<ExoplanetP> ep;
2881
2882 // variables and functions for the updater
2883
2884=== modified file 'plugins/HelloStelModule/src/HelloStelModule.cpp'
2885--- plugins/HelloStelModule/src/HelloStelModule.cpp 2010-01-13 11:26:18 +0000
2886+++ plugins/HelloStelModule/src/HelloStelModule.cpp 2012-08-30 16:29:19 +0000
2887@@ -17,12 +17,12 @@
2888 */
2889
2890 #include "StelProjector.hpp"
2891-#include "StelPainter.hpp"
2892 #include "StelApp.hpp"
2893 #include "StelCore.hpp"
2894 #include "StelLocaleMgr.hpp"
2895 #include "StelModuleMgr.hpp"
2896 #include "HelloStelModule.hpp"
2897+#include "renderer/StelRenderer.hpp"
2898
2899 #include <QDebug>
2900
2901@@ -87,11 +87,10 @@
2902 /*************************************************************************
2903 Draw our module. This should print "Hello world!" in the main window
2904 *************************************************************************/
2905-void HelloStelModule::draw(StelCore* core)
2906+void HelloStelModule::draw(StelCore* core, StelRenderer* renderer)
2907 {
2908- StelPainter painter(core->getProjection2d());
2909- painter.setColor(1,1,1,1);
2910- painter.setFont(font);
2911- painter.drawText(300, 300, "Hello World!");
2912+ renderer->setColor(1, 1, 1, 1);
2913+ renderer->setFont(font);
2914+ renderer->drawText(300, 300, "Hello World!")
2915 }
2916
2917
2918=== modified file 'plugins/HelloStelModule/src/HelloStelModule.hpp'
2919--- plugins/HelloStelModule/src/HelloStelModule.hpp 2010-05-09 20:49:19 +0000
2920+++ plugins/HelloStelModule/src/HelloStelModule.hpp 2012-08-30 16:29:19 +0000
2921@@ -33,7 +33,7 @@
2922 // Methods defined in the StelModule class
2923 virtual void init();
2924 virtual void update(double) {;}
2925- virtual void draw(StelCore* core);
2926+ virtual void draw(StelCore* core, class StelRenderer* renderer);
2927 virtual double getCallOrder(StelModuleActionName actionName) const;
2928 private:
2929 // Font used for displaying our text
2930
2931=== modified file 'plugins/LogBook/src/LogBook.cpp'
2932--- plugins/LogBook/src/LogBook.cpp 2010-06-08 18:21:56 +0000
2933+++ plugins/LogBook/src/LogBook.cpp 2012-08-30 16:29:19 +0000
2934@@ -34,7 +34,6 @@
2935 #include "StelObjectMgr.hpp"
2936 #include "StelObjectType.hpp"
2937 #include "StelProjector.hpp"
2938-#include "StelPainter.hpp"
2939 #include "StelStyle.hpp"
2940 #include "StelTranslator.hpp"
2941
2942@@ -51,13 +50,6 @@
2943 #include <QSqlRelationalTableModel>
2944 #include <QSqlTableModel>
2945
2946-#if defined(__APPLE__) && defined(__MACH__)
2947-#include <OpenGL/glu.h> /* Header File For The GLU Library */
2948-#else
2949-#include <GL/glu.h> /* Header File For The GLU Library */
2950-#endif
2951-
2952-
2953 /* ********************************************************************* */
2954 #if 0
2955 #pragma mark -
2956@@ -119,9 +111,8 @@
2957 return true;
2958 }
2959
2960-void LogBook::draw(StelCore* core)
2961+void LogBook::draw(StelCore* core, class StelRenderer* renderer)
2962 {
2963- StelPainter painter(core->getProjection2d());
2964 }
2965
2966 double LogBook::getCallOrder(StelModuleActionName actionName) const
2967
2968=== modified file 'plugins/LogBook/src/LogBook.hpp'
2969--- plugins/LogBook/src/LogBook.hpp 2010-06-08 18:21:56 +0000
2970+++ plugins/LogBook/src/LogBook.hpp 2012-08-30 16:29:19 +0000
2971@@ -48,7 +48,7 @@
2972 ///////////////////////////////////////////////////////////////////////////
2973 // Methods defined in the StelModule class
2974 virtual bool configureGui(bool show=true);
2975- virtual void draw(StelCore* core);
2976+ virtual void draw(StelCore* core, class StelRenderer* renderer);
2977 virtual double getCallOrder(StelModuleActionName actionName) const;
2978 //! Returns the module-specific style sheet.
2979 //! The main StelStyle instance should be passed.
2980
2981=== modified file 'plugins/Observability/src/Observability.cpp'
2982--- plugins/Observability/src/Observability.cpp 2012-08-27 13:29:14 +0000
2983+++ plugins/Observability/src/Observability.cpp 2012-08-30 16:29:19 +0000
2984@@ -19,7 +19,6 @@
2985 #include <QSettings>
2986 #include <QPixmap>
2987 #include <QTimer>
2988-#include <QtOpenGL>
2989 #include <QString>
2990 #include <QDebug>
2991 #include <QAction>
2992@@ -28,6 +27,7 @@
2993 #include <QKeyEvent>
2994 #include <QMouseEvent>
2995
2996+#include "renderer/StelRenderer.hpp"
2997 #include "StelIniParser.hpp"
2998 #include "StelProjector.hpp"
2999 #include "StarMgr.hpp"
3000@@ -42,9 +42,7 @@
3001 #include "StelGuiItems.hpp"
3002 #include "StelMovementMgr.hpp"
3003 #include "StelFileMgr.hpp"
3004-#include "StelVertexArray.hpp"
3005 #include "StelCore.hpp"
3006-#include "StelPainter.hpp"
3007 #include "ZoneArray.hpp"
3008 #include "StelSkyDrawer.hpp"
3009 #include "Observability.hpp"
3010@@ -239,7 +237,7 @@
3011
3012 /////////////////////////////////////////////
3013 // MAIN CODE:
3014-void Observability::draw(StelCore* core)
3015+void Observability::draw(StelCore* core, StelRenderer* renderer)
3016 {
3017
3018 if (!flagShowObservability) return; // Button is off.
3019@@ -255,10 +253,10 @@
3020 if (core->getCurrentLocation().planetName != "Earth") {return;};
3021
3022 // Set the painter:
3023- StelPainter paintresult(core->getProjection2d());
3024- paintresult.setColor(fontColor[0],fontColor[1],fontColor[2],1);
3025+ StelProjectorP projector = core->getProjection2d();
3026+ renderer->setGlobalColor(fontColor[0],fontColor[1],fontColor[2],1);
3027 font.setPixelSize(fontSize);
3028- paintresult.setFont(font);
3029+ renderer->setFont(font);
3030
3031
3032 // Get current date, location, and check if there is something selected.
3033@@ -675,30 +673,30 @@
3034
3035 if (show_Today)
3036 {
3037- paintresult.drawText(xLine, yLine,q_("TODAY:"));
3038- paintresult.drawText(xLine+fontSize, yLine-spacing, RS2);
3039- paintresult.drawText(xLine+fontSize, yLine-spacing*2, RS1);
3040- paintresult.drawText(xLine+fontSize, yLine-spacing*3, Cul);
3041+ renderer->drawText(TextParams(xLine, yLine,q_(" TODAY:")));
3042+ renderer->drawText(TextParams(xLine+fontSize, yLine-spacing, RS2));
3043+ renderer->drawText(TextParams(xLine+fontSize, yLine-spacing*2, RS1));
3044+ renderer->drawText(TextParams(xLine+fontSize, yLine-spacing*3, Cul));
3045 yLine -= spacing2;
3046 };
3047
3048 if ((isMoon && show_FullMoon) || (!isSun && !isMoon && show_Year))
3049 {
3050- paintresult.drawText(xLine,yLine,q_("THIS YEAR:"));
3051+ renderer->drawText(TextParams(xLine,yLine," THIS YEAR:"));
3052 if (show_Best_Night || show_FullMoon)
3053 {
3054 yLine -= spacing;
3055- paintresult.drawText(xLine+fontSize, yLine, bestNight);
3056+ renderer->drawText(TextParams(xLine+fontSize, yLine, bestNight));
3057 };
3058 if (show_Good_Nights)
3059 {
3060 yLine -= spacing;
3061- paintresult.drawText(xLine+fontSize, yLine, ObsRange);
3062+ renderer->drawText(TextParams(xLine+fontSize, yLine, ObsRange));
3063 };
3064 if (show_AcroCos)
3065 {
3066 yLine -= spacing;
3067- paintresult.drawText(xLine+fontSize, yLine, AcroCos);
3068+ renderer->drawText(TextParams(xLine+fontSize, yLine, AcroCos));
3069 };
3070
3071 };
3072
3073=== modified file 'plugins/Observability/src/Observability.hpp'
3074--- plugins/Observability/src/Observability.hpp 2012-08-23 09:21:20 +0000
3075+++ plugins/Observability/src/Observability.hpp 2012-08-30 16:29:19 +0000
3076@@ -38,7 +38,7 @@
3077 virtual ~Observability();
3078 virtual void init();
3079 virtual void update(double) {;}
3080- virtual void draw(StelCore* core);
3081+ virtual void draw(StelCore* core, class StelRenderer* renderer);
3082 virtual double getCallOrder(StelModuleActionName actionName) const;
3083
3084
3085
3086=== modified file 'plugins/Oculars/src/Oculars.cpp'
3087--- plugins/Oculars/src/Oculars.cpp 2012-07-06 17:00:39 +0000
3088+++ plugins/Oculars/src/Oculars.cpp 2012-08-30 16:29:19 +0000
3089@@ -29,13 +29,15 @@
3090 #include "StelMovementMgr.hpp"
3091 #include "StelObjectMgr.hpp"
3092 #include "StelLocaleMgr.hpp"
3093-#include "StelPainter.hpp"
3094 #include "StelProjector.hpp"
3095 #include "StelGui.hpp"
3096 #include "StelGuiItems.hpp"
3097 #include "StelMainWindow.hpp"
3098 #include "StelTranslator.hpp"
3099 #include "SkyGui.hpp"
3100+#include "renderer/GenericVertexTypes.hpp"
3101+#include "renderer/StelGeometryBuilder.hpp"
3102+#include "renderer/StelRenderer.hpp"
3103
3104 #include <QAction>
3105 #include <QGraphicsWidget>
3106@@ -49,12 +51,6 @@
3107
3108 #include <cmath>
3109
3110-#if defined(__APPLE__) && defined(__MACH__)
3111-#include <OpenGL/glu.h> /* Header File For The GLU Library */
3112-#else
3113-#include <GL/glu.h> /* Header File For The GLU Library */
3114-#endif
3115-
3116 #ifdef Q_WS_MAC
3117 extern void qt_set_sequence_auto_mnemonic(bool b);
3118 #endif
3119@@ -228,10 +224,10 @@
3120 }
3121
3122 //! Draw any parts on the screen which are for our module
3123-void Oculars::draw(StelCore* core)
3124+void Oculars::draw(StelCore* core, StelRenderer* renderer)
3125 {
3126 if (flagShowTelrad) {
3127- paintTelrad();
3128+ paintTelrad(renderer);
3129 } else if (flagShowOculars){
3130 // Ensure there is a selected ocular & telescope
3131 if (selectedCCDIndex > ccds.count()) {
3132@@ -255,37 +251,33 @@
3133
3134 if (ready) {
3135 if (selectedOcularIndex > -1) {
3136- paintOcularMask();
3137+ paintOcularMask(renderer);
3138 if (flagShowCrosshairs) {
3139- paintCrosshairs();
3140+ paintCrosshairs(renderer);
3141 }
3142 }
3143 if (guiPanelEnabled)
3144 {
3145 // Reset the state to allow the panel to be painted normally
3146- glDisable(GL_TEXTURE_2D);
3147- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
3148- glEnable(GL_BLEND);
3149+ renderer->setBlendMode(BlendMode_Alpha);
3150 }
3151 else
3152 {
3153 // Paint the information in the upper-right hand corner
3154- paintText(core);
3155+ paintText(core, renderer);
3156 }
3157 }
3158 } else if (flagShowCCD) {
3159- paintCCDBounds();
3160+ paintCCDBounds(renderer);
3161 if (guiPanelEnabled)
3162 {
3163 // Reset the state to allow the panel to be painted normally
3164- glDisable(GL_TEXTURE_2D);
3165- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
3166- glEnable(GL_BLEND);
3167+ renderer->setBlendMode(BlendMode_Alpha);
3168 }
3169 else
3170 {
3171 // Paint the information in the upper-right hand corner
3172- paintText(core);
3173+ paintText(core, renderer);
3174 }
3175 }
3176 }
3177@@ -1293,73 +1285,96 @@
3178 return binocularFound;
3179 }
3180
3181-void Oculars::paintCCDBounds()
3182+void Oculars::paintCCDBounds(StelRenderer* renderer)
3183 {
3184 StelCore *core = StelApp::getInstance().getCore();
3185 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
3186
3187- glDisable(GL_BLEND);
3188- glColor3f(0.f,0.f,0.f);
3189- glPushMatrix();
3190- glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0);
3191- glRotated(ccdRotationAngle, 0.0, 0.0, 1.0);
3192- GLdouble screenFOV = params.fov;
3193+ renderer->setBlendMode(BlendMode_None);
3194+
3195+ StelVertexBuffer<VertexP2>* vertices =
3196+ renderer->createVertexBuffer<VertexP2>(PrimitiveType_LineStrip);
3197+
3198+ double screenFOV = params.fov;
3199+ const Vec2f offset = Vec2f(params.viewportCenter[0], params.viewportCenter[1]);
3200
3201 // draw sensor rectangle
3202 if(selectedCCDIndex != -1) {
3203 CCD *ccd = ccds[selectedCCDIndex];
3204 if (ccd) {
3205- glColor4f(0.77, 0.14, 0.16, 0.5);
3206+ renderer->setGlobalColor(0.77f, 0.14f, 0.16f, 0.5f);
3207 Telescope *telescope = telescopes[selectedTelescopeIndex];
3208- double ccdXRatio = ccd->getActualFOVx(telescope) / screenFOV;
3209- double ccdYRatio = ccd->getActualFOVy(telescope) / screenFOV;
3210+ const double ccdXRatio = ccd->getActualFOVx(telescope) / screenFOV;
3211+ const double ccdYRatio = ccd->getActualFOVy(telescope) / screenFOV;
3212 // As the FOV is based on the narrow aspect of the screen, we need to calculate
3213 // height & width based soley off of that dimension.
3214 int aspectIndex = 2;
3215 if (params.viewportXywh[2] > params.viewportXywh[3]) {
3216 aspectIndex = 3;
3217 }
3218- float width = params.viewportXywh[aspectIndex] * ccdYRatio;
3219- float height = params.viewportXywh[aspectIndex] * ccdXRatio;
3220-
3221- if (width > 0.0 && height > 0.0) {
3222- glBegin(GL_LINE_LOOP);
3223- glVertex2f(-width / 2.0, height / 2.0);
3224- glVertex2f(width / 2.0, height / 2.0);
3225- glVertex2f(width / 2.0, -height / 2.0);
3226- glVertex2f(-width / 2.0, -height / 2.0);
3227- glEnd();
3228+ const float halfWidth = 0.5f * (params.viewportXywh[aspectIndex] * ccdYRatio);
3229+ const float halfHeight = 0.5f * (params.viewportXywh[aspectIndex] * ccdXRatio);
3230+
3231+ if (halfWidth > 0.0 && halfHeight > 0.0)
3232+ {
3233+ const float s = sin(-ccdRotationAngle * M_PI / 180.0f);
3234+ const float c = cos(-ccdRotationAngle * M_PI / 180.0f);
3235+ const float cosHalfWidth = c * halfWidth;
3236+ const float sinHalfWidth = s * halfWidth;
3237+ const float cosHalfHeight = c * halfHeight;
3238+ const float sinHalfHeight = s * halfHeight;
3239+ const Vec2f v1 = Vec2f(-cosHalfWidth - sinHalfHeight, -sinHalfWidth + cosHalfHeight);
3240+ const Vec2f v2 = Vec2f(cosHalfWidth - sinHalfHeight, sinHalfWidth + cosHalfHeight);
3241+ const Vec2f v3 = Vec2f(cosHalfWidth + sinHalfHeight, sinHalfWidth - cosHalfHeight);
3242+ const Vec2f v4 = Vec2f(-cosHalfWidth + sinHalfHeight, -sinHalfWidth - cosHalfHeight);
3243+ vertices->addVertex(VertexP2(offset + v1));
3244+ vertices->addVertex(VertexP2(offset + v2));
3245+ vertices->addVertex(VertexP2(offset + v3));
3246+ vertices->addVertex(VertexP2(offset + v4));
3247+ vertices->addVertex(VertexP2(offset + v1));
3248+ vertices->lock();
3249+
3250+ renderer->drawVertexBuffer(vertices);
3251 }
3252 }
3253 }
3254-
3255- glPopMatrix();
3256+ delete vertices;
3257 }
3258
3259-void Oculars::paintCrosshairs()
3260+void Oculars::paintCrosshairs(StelRenderer* renderer)
3261 {
3262 const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);
3263 StelCore *core = StelApp::getInstance().getCore();
3264 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
3265 // Center of screen
3266 Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,
3267- projector->getViewportPosY()+projector->getViewportHeight()/2);
3268- GLdouble length = 0.5 * params.viewportFovDiameter;
3269+ projector->getViewportPosY()+projector->getViewportHeight()/2);
3270+ double length = 0.5 * params.viewportFovDiameter;
3271 // See if we need to scale the length
3272 if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0) {
3273 length = oculars[selectedOcularIndex]->appearentFOV() * length / maxEyepieceAngle;
3274 }
3275
3276 // Draw the lines
3277- StelPainter painter(projector);
3278- painter.setColor(0.77, 0.14, 0.16, 1);
3279- painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0], centerScreen[1] + length);
3280- painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0], centerScreen[1] - length);
3281- painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0] + length, centerScreen[1]);
3282- painter.drawLine2d(centerScreen[0], centerScreen[1], centerScreen[0] - length, centerScreen[1]);
3283+ renderer->setGlobalColor(0.77f, 0.14f, 0.16f);
3284+ StelVertexBuffer<VertexP2>* vertices =
3285+ renderer->createVertexBuffer<VertexP2>(PrimitiveType_Lines);
3286+ const VertexP2 center(centerScreen[0], centerScreen[1]);
3287+ vertices->addVertex(center);
3288+ vertices->addVertex(VertexP2(centerScreen[0], centerScreen[1] + length));
3289+ vertices->addVertex(center);
3290+ vertices->addVertex(VertexP2(centerScreen[0], centerScreen[1] - length));
3291+ vertices->addVertex(center);
3292+ vertices->addVertex(VertexP2(centerScreen[0] + length, centerScreen[1]));
3293+ vertices->addVertex(center);
3294+ vertices->addVertex(VertexP2(centerScreen[0] - length, centerScreen[1]));
3295+ vertices->lock();
3296+
3297+ renderer->drawVertexBuffer(vertices);
3298+ delete vertices;
3299 }
3300
3301-void Oculars::paintTelrad()
3302+void Oculars::paintTelrad(StelRenderer* renderer)
3303 {
3304 if (!flagShowOculars) {
3305 const StelProjectorP projector = StelApp::getInstance().getCore()->getProjection(StelCore::FrameEquinoxEqu);
3306@@ -1367,50 +1382,61 @@
3307 // StelCore *core = StelApp::getInstance().getCore();
3308 // StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
3309
3310- // StelPainter drawing
3311- StelPainter painter(projector);
3312- painter.setColor(0.77, 0.14, 0.16, 1.0);
3313+ renderer->setGlobalColor(0.77f, 0.14f, 0.16f);
3314 Vec2i centerScreen(projector->getViewportPosX()+projector->getViewportWidth()/2,
3315- projector->getViewportPosY()+projector->getViewportHeight()/2);
3316- painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (0.5));
3317- painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (2.0));
3318- painter.drawCircle(centerScreen[0], centerScreen[1], 0.5 * projector->getPixelPerRadAtCenter() * (M_PI/180) * (4.0));
3319-
3320+ projector->getViewportPosY()+projector->getViewportHeight()/2);
3321+
3322+ // Generate and draw the circles.
3323+ StelVertexBuffer<VertexP2>* circle =
3324+ renderer->createVertexBuffer<VertexP2>(PrimitiveType_LineStrip);
3325+ const float baseRadius = 0.5f * projector->getPixelPerRadAtCenter() * (M_PI / 180.0f);
3326+ StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 0.5f);
3327+ renderer->drawVertexBuffer(circle);
3328+
3329+ circle->unlock();
3330+ circle->clear();
3331+ StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 2.0f);
3332+ renderer->drawVertexBuffer(circle);
3333+
3334+ circle->unlock();
3335+ circle->clear();
3336+ StelGeometryBuilder().buildCircle(circle, centerScreen[0], centerScreen[1], baseRadius * 4.0f);
3337+ renderer->drawVertexBuffer(circle);
3338+
3339+ delete circle;
3340 }
3341 }
3342
3343-void Oculars::paintOcularMask()
3344+
3345+void Oculars::paintOcularMask(StelRenderer* renderer)
3346 {
3347 StelCore *core = StelApp::getInstance().getCore();
3348 StelProjector::StelProjectorParams params = core->getCurrentStelProjectorParams();
3349
3350- glDisable(GL_BLEND);
3351- glColor3f(0.f,0.f,0.f);
3352- glPushMatrix();
3353- glTranslated(params.viewportCenter[0], params.viewportCenter[1], 0.0);
3354- GLUquadricObj *quadric = gluNewQuadric();
3355-
3356- GLdouble inner = 0.5 * params.viewportFovDiameter;
3357-
3358+ renderer->setBlendMode(BlendMode_None);
3359+ renderer->setGlobalColor(0.0f, 0.0f, 0.0f);
3360+
3361+ float inner = 0.5f * params.viewportFovDiameter;
3362 // See if we need to scale the mask
3363 if (useMaxEyepieceAngle && oculars[selectedOcularIndex]->appearentFOV() > 0.0 && !oculars[selectedOcularIndex]->isBinoculars()) {
3364 inner = oculars[selectedOcularIndex]->appearentFOV() * inner / maxEyepieceAngle;
3365 }
3366+ const float outer = params.viewportXywh[2] + params.viewportXywh[3];
3367+ const Vec2f offset(params.viewportCenter[0], params.viewportCenter[1]);
3368
3369- GLdouble outer = params.viewportXywh[2] + params.viewportXywh[3];
3370- // Draw the mask
3371- gluDisk(quadric, inner, outer, 256, 1);
3372+ StelGeometryRing* disc =
3373+ StelGeometryBuilder().buildRing2D(RingParams(inner, outer).resolution(128, 1), offset);
3374+ disc->draw(renderer);
3375 // the gray circle
3376- glColor3f(0.15f,0.15f,0.15f);
3377- gluDisk(quadric, inner - 1.0, inner, 256, 1);
3378- gluDeleteQuadric(quadric);
3379- glPopMatrix();
3380+ renderer->setGlobalColor(0.15f, 0.15f, 0.15f);
3381+ disc->setInnerOuterRadius(inner - 1.0f, inner);
3382+ disc->draw(renderer);
3383+ delete disc;
3384 }
3385
3386-void Oculars::paintText(const StelCore* core)
3387+void Oculars::paintText(const StelCore* core, StelRenderer* renderer)
3388 {
3389 const StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);
3390- StelPainter painter(prj);
3391
3392 // Get the current instruments
3393 CCD *ccd = NULL;
3394@@ -1420,22 +1446,20 @@
3395 Ocular *ocular = oculars[selectedOcularIndex];
3396 Telescope *telescope = telescopes[selectedTelescopeIndex];
3397
3398- // set up the color and the GL state
3399- painter.setColor(0.8, 0.48, 0.0, 1);
3400- glDisable(GL_TEXTURE_2D);
3401- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
3402- glEnable(GL_BLEND);
3403+ // set up drawing
3404+ renderer->setGlobalColor(0.8f, 0.48f, 0.0f);
3405+ renderer->setBlendMode(BlendMode_Alpha);
3406
3407 // Get the X & Y positions, and the line height
3408- painter.setFont(font);
3409+ renderer->setFont(font);
3410 QString widthString = "MMMMMMMMMMMMMMMMMMM";
3411- float insetFromRHS = painter.getFontMetrics().width(widthString);
3412+ const float insetFromRHS = QFontMetrics(font).width(widthString);
3413 StelProjector::StelProjectorParams projectorParams = core->getCurrentStelProjectorParams();
3414 int xPosition = projectorParams.viewportXywh[2];
3415 xPosition -= insetFromRHS;
3416 int yPosition = projectorParams.viewportXywh[3];
3417 yPosition -= 40;
3418- const int lineHeight = painter.getFontMetrics().height();
3419+ const int lineHeight = QFontMetrics(font).height();
3420
3421
3422 // The Ocular
3423@@ -1457,22 +1481,22 @@
3424 if (name.length() > widthString.length()) {
3425 xPosition -= (insetFromRHS / 2.0);
3426 }
3427- painter.drawText(xPosition, yPosition, ocularNumberLabel);
3428+ renderer->drawText(TextParams(xPosition, yPosition, ocularNumberLabel));
3429 yPosition-=lineHeight;
3430
3431 if (!ocular->isBinoculars()) {
3432 QString eFocalLength = QVariant(ocular->effectiveFocalLength()).toString();
3433 // TRANSLATORS: FL = Focal length
3434 QString eFocalLengthLabel = QString(q_("Ocular FL: %1 mm")).arg(eFocalLength);
3435- painter.drawText(xPosition, yPosition, eFocalLengthLabel);
3436+ renderer->drawText(TextParams(xPosition, yPosition, eFocalLengthLabel));
3437 yPosition-=lineHeight;
3438
3439 QString ocularFov = QString::number(ocular->appearentFOV());
3440 ocularFov.append(QChar(0x00B0));//Degree sign
3441 // TRANSLATORS: aFOV = apparent field of view
3442 QString ocularFOVLabel = QString(q_("Ocular aFOV: %1"))
3443- .arg(ocularFov);
3444- painter.drawText(xPosition, yPosition, ocularFOVLabel);
3445+ .arg(ocularFov);
3446+ renderer->drawText(TextParams(xPosition, yPosition, ocularFOVLabel));
3447 yPosition-=lineHeight;
3448
3449 // The telescope
3450@@ -1489,7 +1513,7 @@
3451 .arg(selectedTelescopeIndex)
3452 .arg(telescopeName);
3453 }
3454- painter.drawText(xPosition, yPosition, telescopeNumberLabel);
3455+ renderer->drawText(TextParams(xPosition, yPosition, telescopeNumberLabel));
3456 yPosition-=lineHeight;
3457
3458 // General info
3459@@ -1498,14 +1522,14 @@
3460 magString.append(QChar(0x00D7));//Multiplication sign
3461 QString magnificationLabel = QString(q_("Magnification: %1"))
3462 .arg(magString);
3463- painter.drawText(xPosition, yPosition, magnificationLabel);
3464+ renderer->drawText(TextParams(xPosition, yPosition, magnificationLabel));
3465 yPosition-=lineHeight;
3466
3467 double fov = ((int)(ocular->actualFOV(telescope) * 10000.00)) / 10000.0;
3468 QString fovString = QString::number(fov);
3469 fovString.append(QChar(0x00B0));//Degree sign
3470 QString fovLabel = QString(q_("FOV: %1")).arg(fovString);
3471- painter.drawText(xPosition, yPosition, fovLabel);
3472+ renderer->drawText(TextParams(xPosition, yPosition, fovLabel));
3473 }
3474 }
3475
3476@@ -1527,9 +1551,9 @@
3477 .arg(selectedCCDIndex)
3478 .arg(name);
3479 }
3480- painter.drawText(xPosition, yPosition, ccdSensorLabel);
3481+ renderer->drawText(TextParams(xPosition, yPosition, ccdSensorLabel));
3482 yPosition-=lineHeight;
3483- painter.drawText(xPosition, yPosition, ccdInfoLabel);
3484+ renderer->drawText(TextParams(xPosition, yPosition, ccdInfoLabel));
3485 yPosition-=lineHeight;
3486
3487 // The telescope
3488@@ -1546,7 +1570,7 @@
3489 .arg(selectedTelescopeIndex)
3490 .arg(telescopeName);
3491 }
3492- painter.drawText(xPosition, yPosition, telescopeNumberLabel);
3493+ renderer->drawText(TextParams(xPosition, yPosition, telescopeNumberLabel));
3494 }
3495
3496 }
3497
3498=== modified file 'plugins/Oculars/src/Oculars.hpp'
3499--- plugins/Oculars/src/Oculars.hpp 2012-07-06 17:00:39 +0000
3500+++ plugins/Oculars/src/Oculars.hpp 2012-08-30 16:29:19 +0000
3501@@ -62,7 +62,7 @@
3502 virtual void init();
3503 virtual void deinit();
3504 virtual bool configureGui(bool show=true);
3505- virtual void draw(StelCore* core);
3506+ virtual void draw(StelCore* core, class StelRenderer* renderer);
3507 virtual double getCallOrder(StelModuleActionName actionName) const;
3508 //! Returns the module-specific style sheet.
3509 //! The main StelStyle instance should be passed.
3510@@ -134,18 +134,18 @@
3511 bool isBinocularDefined();
3512
3513 //! Reneders the CCD bounding box on-screen. A telescope must be selected, or this call does nothing.
3514- void paintCCDBounds();
3515+ void paintCCDBounds(class StelRenderer* renderer);
3516 //! Renders crosshairs into the viewport.
3517- void paintCrosshairs();
3518+ void paintCrosshairs(class StelRenderer* renderer);
3519 //! Paint the mask into the viewport.
3520- void paintOcularMask();
3521+ void paintOcularMask(class StelRenderer* renderer);
3522 //! Renders the three Telrad circles, but only if not in ocular mode.
3523- void paintTelrad();
3524+ void paintTelrad(class StelRenderer* renderer);
3525
3526
3527 //! Paints the text about the current object selections to the upper right hand of the screen.
3528 //! Should only be called from a 'ready' state; currently from the draw() method.
3529- void paintText(const StelCore* core);
3530+ void paintText(const StelCore* core, StelRenderer* renderer);
3531
3532 //! This method is called by the zoom() method, when this plugin is toggled off; it resets to the default view.
3533 void unzoomOcular();
3534
3535=== modified file 'plugins/Pulsars/src/Pulsar.cpp'
3536--- plugins/Pulsars/src/Pulsar.cpp 2012-08-08 10:11:01 +0000
3537+++ plugins/Pulsars/src/Pulsar.cpp 2012-08-30 16:29:19 +0000
3538@@ -19,27 +19,23 @@
3539 #include "Pulsar.hpp"
3540 #include "Pulsars.hpp"
3541 #include "StelObject.hpp"
3542-#include "StelPainter.hpp"
3543 #include "StelApp.hpp"
3544 #include "StelCore.hpp"
3545-#include "StelTexture.hpp"
3546 #include "StelUtils.hpp"
3547 #include "StelTranslator.hpp"
3548 #include "StelModuleMgr.hpp"
3549 #include "StelSkyDrawer.hpp"
3550+#include "renderer/StelRenderer.hpp"
3551
3552 #include <QTextStream>
3553 #include <QDebug>
3554 #include <QVariant>
3555-#include <QtOpenGL>
3556 #include <QVariantMap>
3557 #include <QVariant>
3558 #include <QList>
3559
3560 #define PSR_INERTIA 1.0e45 /* Typical moment of inertia for a pulsar */
3561
3562-StelTextureSP Pulsar::markerTexture;
3563-
3564 Pulsar::Pulsar(const QVariantMap& map)
3565 : initialized(false)
3566 {
3567@@ -334,7 +330,8 @@
3568 labelsFader.update((int)(deltaTime*1000));
3569 }
3570
3571-void Pulsar::draw(StelCore* core, StelPainter& painter)
3572+void Pulsar::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector,
3573+ StelTextureNew* markerTexture)
3574 {
3575 StelSkyDrawer* sd = core->getSkyDrawer();
3576
3577@@ -345,27 +342,26 @@
3578 double mag = getVMagnitude(core, true);
3579
3580 StelUtils::spheToRect(RA, DE, XYZ);
3581- glEnable(GL_BLEND);
3582- glBlendFunc(GL_ONE, GL_ONE);
3583- painter.setColor(color[0], color[1], color[2], 1);
3584+ renderer->setBlendMode(BlendMode_Add);
3585+ renderer->setGlobalColor(color[0], color[1], color[2]);
3586
3587 if (mag <= sd->getLimitMagnitude())
3588 {
3589-
3590- Pulsar::markerTexture->bind();
3591- float size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
3592- float shift = 5.f + size/1.6f;
3593+ markerTexture->bind();
3594+ const float size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
3595+ const float shift = 5.f + size/1.6f;
3596 if (labelsFader.getInterstate()<=0.f)
3597 {
3598+ Vec3d win;
3599+ if(!projector->project(XYZ, win)){return;}
3600 if (GETSTELMODULE(Pulsars)->getDisplayMode())
3601 {
3602- painter.drawSprite2dMode(XYZ, 4);
3603- painter.drawText(XYZ, " ", 0, shift, shift, false);
3604+ renderer->drawTexturedRect(win[0] - 4, win[1] - 4, 8, 8);
3605 }
3606 else
3607 {
3608- painter.drawSprite2dMode(XYZ, 5);
3609- painter.drawText(XYZ, designation, 0, shift, shift, false);
3610+ renderer->drawTexturedRect(win[0] - 5, win[1] - 5, 10, 10);
3611+ renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
3612 }
3613 }
3614 }
3615
3616=== modified file 'plugins/Pulsars/src/Pulsar.hpp'
3617--- plugins/Pulsars/src/Pulsar.hpp 2012-05-20 11:10:52 +0000
3618+++ plugins/Pulsars/src/Pulsar.hpp 2012-08-30 16:29:19 +0000
3619@@ -27,11 +27,10 @@
3620 #include <QDateTime>
3621
3622 #include "StelObject.hpp"
3623-#include "StelTextureTypes.hpp"
3624-#include "StelPainter.hpp"
3625+#include "StelProjectorType.hpp"
3626+
3627 #include "StelFader.hpp"
3628
3629-class StelPainter;
3630
3631 //! @class Pulsar
3632 //! A Pulsar object represents one pulsar on the sky.
3633@@ -88,10 +87,8 @@
3634
3635 Vec3d XYZ; // holds J2000 position
3636
3637- static StelTextureSP hintTexture;
3638- static StelTextureSP markerTexture;
3639-
3640- void draw(StelCore* core, StelPainter& painter);
3641+ void draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector,
3642+ class StelTextureNew* markerTexture);
3643
3644 //! Variables for description of properties of pulsars
3645 QString designation; //! The designation of the pulsar (J2000 pulsar name)
3646
3647=== modified file 'plugins/Pulsars/src/Pulsars.cpp'
3648--- plugins/Pulsars/src/Pulsars.cpp 2012-06-17 08:17:55 +0000
3649+++ plugins/Pulsars/src/Pulsars.cpp 2012-08-30 16:29:19 +0000
3650@@ -17,7 +17,6 @@
3651 */
3652
3653 #include "StelProjector.hpp"
3654-#include "StelPainter.hpp"
3655 #include "StelApp.hpp"
3656 #include "StelCore.hpp"
3657 #include "StelGui.hpp"
3658@@ -25,7 +24,6 @@
3659 #include "StelLocaleMgr.hpp"
3660 #include "StelModuleMgr.hpp"
3661 #include "StelObjectMgr.hpp"
3662-#include "StelTextureMgr.hpp"
3663 #include "StelJsonParser.hpp"
3664 #include "StelFileMgr.hpp"
3665 #include "StelUtils.hpp"
3666@@ -34,6 +32,7 @@
3667 #include "Pulsar.hpp"
3668 #include "Pulsars.hpp"
3669 #include "PulsarsDialog.hpp"
3670+#include "renderer/StelRenderer.hpp"
3671
3672 #include <QNetworkAccessManager>
3673 #include <QNetworkReply>
3674@@ -47,6 +46,7 @@
3675 #include <QVariantMap>
3676 #include <QVariant>
3677 #include <QList>
3678+#include <QSettings>
3679 #include <QSharedPointer>
3680 #include <QStringList>
3681
3682@@ -81,7 +81,9 @@
3683 Constructor
3684 */
3685 Pulsars::Pulsars()
3686- : progressBar(NULL)
3687+ : texPointer(NULL)
3688+ , markerTexture(NULL)
3689+ , progressBar(NULL)
3690 {
3691 setObjectName("Pulsars");
3692 configDialog = new PulsarsDialog();
3693@@ -100,8 +102,14 @@
3694 void Pulsars::deinit()
3695 {
3696 psr.clear();
3697- Pulsar::markerTexture.clear();
3698- texPointer.clear();
3699+ if(NULL != markerTexture)
3700+ {
3701+ delete markerTexture;
3702+ }
3703+ if(NULL != texPointer)
3704+ {
3705+ delete texPointer;
3706+ }
3707 }
3708
3709 /*
3710@@ -136,9 +144,6 @@
3711
3712 jsonCatalogPath = StelFileMgr::findFile("modules/Pulsars", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/pulsars.json";
3713
3714- texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
3715- Pulsar::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Pulsars/pulsar.png");
3716-
3717 // key bindings and other actions
3718 // TRANSLATORS: Title of a group of key bindings in the Help window
3719 QString groupName = N_("Plugin Key Bindings");
3720@@ -195,27 +200,31 @@
3721 /*
3722 Draw our module. This should print name of first PSR in the main window
3723 */
3724-void Pulsars::draw(StelCore* core)
3725+void Pulsars::draw(StelCore* core, StelRenderer* renderer)
3726 {
3727 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
3728- StelPainter painter(prj);
3729- painter.setFont(font);
3730+ renderer->setFont(font);
3731
3732 foreach (const PulsarP& pulsar, psr)
3733 {
3734 if (pulsar && pulsar->initialized)
3735- pulsar->draw(core, painter);
3736+ {
3737+ if(NULL == markerTexture)
3738+ {
3739+ markerTexture = renderer->createTexture(":/Pulsars/pulsar.png");
3740+ }
3741+ pulsar->draw(core, renderer, prj, markerTexture);
3742+ }
3743 }
3744
3745 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
3746- drawPointer(core, painter);
3747-
3748+ {
3749+ drawPointer(core, renderer, prj);
3750+ }
3751 }
3752
3753-void Pulsars::drawPointer(StelCore* core, StelPainter& painter)
3754+void Pulsars::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
3755 {
3756- const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
3757-
3758 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Pulsar");
3759 if (!newSelected.empty())
3760 {
3761@@ -224,16 +233,21 @@
3762
3763 Vec3d screenpos;
3764 // Compute 2D pos and return if outside screen
3765- if (!painter.getProjector()->project(pos, screenpos))
3766- return;
3767+ if (!projector->project(pos, screenpos))
3768+ {
3769+ return;
3770+ }
3771
3772 const Vec3f& c(obj->getInfoColor());
3773- painter.setColor(c[0],c[1],c[2]);
3774+ renderer->setGlobalColor(c[0], c[1], c[2]);
3775+ if(NULL == texPointer)
3776+ {
3777+ texPointer = renderer->createTexture("textures/pointeur2.png");
3778+ }
3779 texPointer->bind();
3780- painter.enableTexture2d(true);
3781- glEnable(GL_BLEND);
3782- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
3783- painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
3784+ renderer->setBlendMode(BlendMode_Alpha);
3785+ renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, 26.0f,
3786+ StelApp::getInstance().getTotalRunTime() * 40.0f);
3787 }
3788 }
3789
3790
3791=== modified file 'plugins/Pulsars/src/Pulsars.hpp'
3792--- plugins/Pulsars/src/Pulsars.hpp 2012-06-17 08:17:55 +0000
3793+++ plugins/Pulsars/src/Pulsars.hpp 2012-08-30 16:29:19 +0000
3794@@ -22,8 +22,6 @@
3795 #include "StelObjectModule.hpp"
3796 #include "StelObject.hpp"
3797 #include "StelFader.hpp"
3798-#include "StelTextureTypes.hpp"
3799-#include "StelPainter.hpp"
3800 #include "Pulsar.hpp"
3801 #include <QFont>
3802 #include <QVariantMap>
3803@@ -38,7 +36,6 @@
3804 class QTimer;
3805 class PulsarsDialog;
3806
3807-class StelPainter;
3808
3809 typedef QSharedPointer<Pulsar> PulsarP;
3810
3811@@ -65,8 +62,8 @@
3812 virtual void init();
3813 virtual void deinit();
3814 virtual void update(double) {;}
3815- virtual void draw(StelCore* core);
3816- virtual void drawPointer(StelCore* core, StelPainter& painter);
3817+ virtual void draw(StelCore* core, class StelRenderer* renderer);
3818+ virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
3819 virtual double getCallOrder(StelModuleActionName actionName) const;
3820
3821 ///////////////////////////////////////////////////////////////////////////
3822@@ -180,7 +177,8 @@
3823
3824 QString jsonCatalogPath;
3825
3826- StelTextureSP texPointer;
3827+ class StelTextureNew* texPointer;
3828+ class StelTextureNew* markerTexture;
3829 QList<PulsarP> psr;
3830
3831 // variables and functions for the updater
3832
3833=== modified file 'plugins/Quasars/src/Quasar.cpp'
3834--- plugins/Quasars/src/Quasar.cpp 2012-08-08 10:11:01 +0000
3835+++ plugins/Quasars/src/Quasar.cpp 2012-08-30 16:29:19 +0000
3836@@ -19,24 +19,21 @@
3837 #include "Quasar.hpp"
3838 #include "Quasars.hpp"
3839 #include "StelObject.hpp"
3840-#include "StelPainter.hpp"
3841 #include "StelApp.hpp"
3842 #include "StelCore.hpp"
3843-#include "StelTexture.hpp"
3844 #include "StelUtils.hpp"
3845 #include "StelTranslator.hpp"
3846 #include "StelModuleMgr.hpp"
3847 #include "StelSkyDrawer.hpp"
3848+#include "renderer/StelRenderer.hpp"
3849
3850 #include <QTextStream>
3851 #include <QDebug>
3852 #include <QVariant>
3853-#include <QtOpenGL>
3854 #include <QVariantMap>
3855 #include <QVariant>
3856 #include <QList>
3857
3858-StelTextureSP Quasar::markerTexture;
3859
3860 Quasar::Quasar(const QVariantMap& map)
3861 : initialized(false)
3862@@ -170,11 +167,11 @@
3863 labelsFader.update((int)(deltaTime*1000));
3864 }
3865
3866-void Quasar::draw(StelCore* core, StelPainter& painter)
3867+void Quasar::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector, StelTextureNew* markerTexture)
3868 {
3869 StelSkyDrawer* sd = core->getSkyDrawer();
3870
3871- Vec3f color = sd->indexToColor(BvToColorIndex(bV))*0.75f;
3872+ const Vec3f color = sd->indexToColor(BvToColorIndex(bV))*0.75f;
3873 Vec3f dcolor = Vec3f(1.2f,0.5f,0.4f);
3874 if (StelApp::getInstance().getVisionModeNight())
3875 dcolor = StelUtils::getNightColor(dcolor);
3876@@ -183,42 +180,42 @@
3877 double mag;
3878
3879 StelUtils::spheToRect(qRA, qDE, XYZ);
3880- mag = getVMagnitude(core, true);
3881+ mag = getVMagnitude(core, true);
3882
3883 if (GETSTELMODULE(Quasars)->getDisplayMode())
3884 {
3885- glEnable(GL_BLEND);
3886- glBlendFunc(GL_ONE, GL_ONE);
3887- painter.setColor(dcolor[0], dcolor[1], dcolor[2], 1);
3888-
3889- Quasar::markerTexture->bind();
3890- size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
3891+ renderer->setBlendMode(BlendMode_Add);
3892+ renderer->setGlobalColor(dcolor[0], dcolor[1], dcolor[2], 1);
3893+ size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
3894 shift = 5.f + size/1.6f;
3895+ markerTexture->bind();
3896 if (labelsFader.getInterstate()<=0.f)
3897 {
3898- painter.drawSprite2dMode(XYZ, 4);
3899- painter.drawText(XYZ, " ", 0, shift, shift, false);
3900+ Vec3d win;
3901+ if(projector->project(XYZ, win))
3902+ {
3903+ renderer->drawTexturedRect(win[0] - 4, win[1] - 4, 8, 8);
3904+ }
3905 }
3906 }
3907 else
3908 {
3909- sd->preDrawPointSource(&painter);
3910+ sd->preDrawPointSource();
3911
3912 if (mag <= sd->getLimitMagnitude())
3913 {
3914 sd->computeRCMag(mag, rcMag);
3915- //sd->drawPointSource(&painter, Vec3f(XYZ[0], XYZ[1], XYZ[2]), rcMag, sd->indexToColor(BvToColorIndex(bV)), false);
3916- sd->drawPointSource(&painter, XYZ, rcMag, sd->indexToColor(BvToColorIndex(bV)), false);
3917- painter.setColor(color[0], color[1], color[2], 1);
3918- size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
3919+ sd->drawPointSource(projector, XYZ, rcMag, sd->indexToColor(BvToColorIndex(bV)), false);
3920+ renderer->setGlobalColor(color[0], color[1], color[2], 1.0f);
3921+ size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
3922 shift = 6.f + size/1.8f;
3923 if (labelsFader.getInterstate()<=0.f)
3924 {
3925- painter.drawText(XYZ, designation, 0, shift, shift, false);
3926+ renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
3927 }
3928 }
3929
3930- sd->postDrawPointSource(&painter);
3931+ sd->postDrawPointSource(projector);
3932 }
3933 }
3934
3935
3936=== modified file 'plugins/Quasars/src/Quasar.hpp'
3937--- plugins/Quasars/src/Quasar.hpp 2012-06-17 08:33:36 +0000
3938+++ plugins/Quasars/src/Quasar.hpp 2012-08-30 16:29:19 +0000
3939@@ -27,11 +27,9 @@
3940 #include <QDateTime>
3941
3942 #include "StelObject.hpp"
3943-#include "StelTextureTypes.hpp"
3944-#include "StelPainter.hpp"
3945 #include "StelFader.hpp"
3946+#include "StelProjectorType.hpp"
3947
3948-class StelPainter;
3949
3950 //! @class Quasar
3951 //! A Quasar object represents one Quasar on the sky.
3952@@ -83,10 +81,9 @@
3953
3954 Vec3d XYZ; // holds J2000 position
3955
3956- static StelTextureSP hintTexture;
3957- static StelTextureSP markerTexture;
3958+ void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector,
3959+ class StelTextureNew* markerTexture);
3960
3961- void draw(StelCore* core, StelPainter& painter);
3962 //! Calculate a color of quasar
3963 //! @param b_v value of B-V color index
3964 unsigned char BvToColorIndex(float b_v);
3965
3966=== modified file 'plugins/Quasars/src/Quasars.cpp'
3967--- plugins/Quasars/src/Quasars.cpp 2012-06-17 08:33:36 +0000
3968+++ plugins/Quasars/src/Quasars.cpp 2012-08-30 16:29:19 +0000
3969@@ -17,7 +17,6 @@
3970 */
3971
3972 #include "StelProjector.hpp"
3973-#include "StelPainter.hpp"
3974 #include "StelApp.hpp"
3975 #include "StelCore.hpp"
3976 #include "StelGui.hpp"
3977@@ -25,7 +24,6 @@
3978 #include "StelLocaleMgr.hpp"
3979 #include "StelModuleMgr.hpp"
3980 #include "StelObjectMgr.hpp"
3981-#include "StelTextureMgr.hpp"
3982 #include "StelJsonParser.hpp"
3983 #include "StelFileMgr.hpp"
3984 #include "StelUtils.hpp"
3985@@ -33,6 +31,7 @@
3986 #include "LabelMgr.hpp"
3987 #include "Quasar.hpp"
3988 #include "Quasars.hpp"
3989+#include "renderer/StelRenderer.hpp"
3990 #include "QuasarsDialog.hpp"
3991
3992 #include <QNetworkAccessManager>
3993@@ -41,14 +40,15 @@
3994 #include <QAction>
3995 #include <QProgressBar>
3996 #include <QDebug>
3997+#include <QFile>
3998 #include <QFileInfo>
3999-#include <QFile>
4000 #include <QTimer>
4001-#include <QVariantMap>
4002-#include <QVariant>
4003 #include <QList>
4004+#include <QSettings>
4005 #include <QSharedPointer>
4006 #include <QStringList>
4007+#include <QVariant>
4008+#include <QVariantMap>
4009
4010 #define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */
4011
4012@@ -81,7 +81,9 @@
4013 Constructor
4014 */
4015 Quasars::Quasars()
4016- : progressBar(NULL)
4017+ : texPointer(NULL)
4018+ , markerTexture(NULL)
4019+ , progressBar(NULL)
4020 {
4021 setObjectName("Quasars");
4022 configDialog = new QuasarsDialog();
4023@@ -99,9 +101,10 @@
4024
4025 void Quasars::deinit()
4026 {
4027+ if(NULL != texPointer) {delete texPointer;}
4028+ if(NULL != markerTexture) {delete markerTexture;}
4029+ texPointer = markerTexture = NULL;
4030 QSO.clear();
4031- Quasar::markerTexture.clear();
4032- texPointer.clear();
4033 }
4034
4035 /*
4036@@ -136,9 +139,6 @@
4037
4038 catalogJsonPath = StelFileMgr::findFile("modules/Quasars", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/quasars.json";
4039
4040- texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
4041- Quasar::markerTexture = StelApp::getInstance().getTextureManager().createTexture(":/Quasars/quasar.png");
4042-
4043 // key bindings and other actions
4044 // TRANSLATORS: Title of a group of key bindings in the Help window
4045 QString groupName = N_("Plugin Key Bindings");
4046@@ -195,45 +195,55 @@
4047 /*
4048 Draw our module. This should print name of first QSO in the main window
4049 */
4050-void Quasars::draw(StelCore* core)
4051+void Quasars::draw(StelCore* core, class StelRenderer* renderer)
4052 {
4053 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4054- StelPainter painter(prj);
4055- painter.setFont(font);
4056+ renderer->setFont(font);
4057+
4058+ if(NULL == markerTexture)
4059+ {
4060+ markerTexture = renderer->createTexture(":/Quasars/quasar.png");
4061+ }
4062
4063 foreach (const QuasarP& quasar, QSO)
4064 {
4065 if (quasar && quasar->initialized)
4066- quasar->draw(core, painter);
4067+ {
4068+ quasar->draw(core, renderer, prj, markerTexture);
4069+ }
4070 }
4071
4072 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
4073- drawPointer(core, painter);
4074-
4075+ {
4076+ drawPointer(core, renderer, prj);
4077+ }
4078 }
4079
4080-void Quasars::drawPointer(StelCore* core, StelPainter& painter)
4081+void Quasars::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
4082 {
4083- const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4084-
4085 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Quasar");
4086 if (!newSelected.empty())
4087 {
4088 const StelObjectP obj = newSelected[0];
4089 Vec3d pos=obj->getJ2000EquatorialPos(core);
4090
4091- Vec3d screenpos;
4092+ Vec3d screenPos;
4093 // Compute 2D pos and return if outside screen
4094- if (!painter.getProjector()->project(pos, screenpos))
4095+ if (!projector->project(pos, screenPos))
4096+ {
4097 return;
4098+ }
4099+ if(NULL == texPointer)
4100+ {
4101+ texPointer = renderer->createTexture("textures/pointeur2.png");
4102+ }
4103
4104 const Vec3f& c(obj->getInfoColor());
4105- painter.setColor(c[0],c[1],c[2]);
4106+ renderer->setGlobalColor(c[0], c[1], c[2]);
4107 texPointer->bind();
4108- painter.enableTexture2d(true);
4109- glEnable(GL_BLEND);
4110- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
4111- painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
4112+ renderer->setBlendMode(BlendMode_Alpha);
4113+ renderer->drawTexturedRect(screenPos[0] - 13.0f, screenPos[1] - 13.0f, 26.0f, 26.0f,
4114+ StelApp::getInstance().getTotalRunTime() * 40.0f);
4115 }
4116 }
4117
4118
4119=== modified file 'plugins/Quasars/src/Quasars.hpp'
4120--- plugins/Quasars/src/Quasars.hpp 2012-06-17 08:33:36 +0000
4121+++ plugins/Quasars/src/Quasars.hpp 2012-08-30 16:29:19 +0000
4122@@ -21,8 +21,6 @@
4123
4124 #include "StelObjectModule.hpp"
4125 #include "StelObject.hpp"
4126-#include "StelTextureTypes.hpp"
4127-#include "StelPainter.hpp"
4128 #include "Quasar.hpp"
4129 #include <QFont>
4130 #include <QVariantMap>
4131@@ -30,7 +28,6 @@
4132 #include <QList>
4133 #include <QSharedPointer>
4134
4135-class StelPainter;
4136
4137 class QNetworkAccessManager;
4138 class QNetworkReply;
4139@@ -64,8 +61,8 @@
4140 virtual void init();
4141 virtual void deinit();
4142 virtual void update(double) {;}
4143- virtual void draw(StelCore* core);
4144- virtual void drawPointer(StelCore* core, StelPainter& painter);
4145+ virtual void draw(StelCore* core, class StelRenderer* renderer);
4146+ virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
4147 virtual double getCallOrder(StelModuleActionName actionName) const;
4148
4149 ///////////////////////////////////////////////////////////////////////////
4150@@ -179,7 +176,8 @@
4151
4152 QString catalogJsonPath;
4153
4154- StelTextureSP texPointer;
4155+ class StelTextureNew* texPointer;
4156+ class StelTextureNew* markerTexture;
4157 QList<QuasarP> QSO;
4158
4159 // variables and functions for the updater
4160
4161=== modified file 'plugins/Satellites/src/Satellite.cpp'
4162--- plugins/Satellites/src/Satellite.cpp 2012-08-25 10:58:23 +0000
4163+++ plugins/Satellites/src/Satellite.cpp 2012-08-30 16:29:19 +0000
4164@@ -19,20 +19,21 @@
4165
4166 #include "Satellite.hpp"
4167 #include "StelObject.hpp"
4168-#include "StelPainter.hpp"
4169 #include "StelApp.hpp"
4170 #include "StelLocation.hpp"
4171 #include "StelCore.hpp"
4172-#include "StelTexture.hpp"
4173 #include "VecMath.hpp"
4174 #include "StelUtils.hpp"
4175 #include "StelTranslator.hpp"
4176+#include "renderer/StelCircleArcRenderer.hpp"
4177+#include "renderer/StelRenderer.hpp"
4178+#include "renderer/StelTextureNew.hpp"
4179+
4180
4181 #include <QTextStream>
4182 #include <QRegExp>
4183 #include <QDebug>
4184 #include <QVariant>
4185-#include <QtOpenGL>
4186 #include <QSettings>
4187 #include <QByteArray>
4188
4189@@ -41,7 +42,6 @@
4190 #include <cmath>
4191
4192 // static data members - will be initialised in the Satallites class (the StelObjectMgr)
4193-StelTextureSP Satellite::hintTexture;
4194 float Satellite::showLabels = true;
4195 float Satellite::hintBrightness = 0.0;
4196 float Satellite::hintScale = 1.f;
4197@@ -476,47 +476,45 @@
4198 return year + 1900;
4199 }
4200
4201-void Satellite::draw(const StelCore* core, StelPainter& painter, float)
4202+void Satellite::draw(const StelCore* core, StelRenderer* renderer,
4203+ StelProjectorP projector, StelTextureNew* hintTexture)
4204 {
4205 if (core->getJDay() < jdLaunchYearJan1) return;
4206
4207 XYZ = getJ2000EquatorialPos(core);
4208 Vec3f drawColor;
4209 (visibility==RADAR_NIGHT) ? drawColor = Vec3f(0.2f,0.2f,0.2f) : drawColor = hintColor;
4210- StelApp::getInstance().getVisionModeNight() ? glColor4f(0.6,0.0,0.0,1.0) : glColor4f(drawColor[0],drawColor[1],drawColor[2], Satellite::hintBrightness);
4211-
4212- StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4213+ StelApp::getInstance().getVisionModeNight()
4214+ ? renderer->setGlobalColor(0.6,0.0,0.0,1.0)
4215+ : renderer->setGlobalColor(drawColor[0],drawColor[1],drawColor[2], Satellite::hintBrightness);
4216
4217 Vec3d xy;
4218- if (prj->project(XYZ,xy))
4219+ if (core->getProjection(StelCore::FrameJ2000)->project(XYZ,xy))
4220 {
4221 if (Satellite::showLabels)
4222 {
4223- painter.drawText(xy[0], xy[1], name, 0, 10, 10, false);
4224- Satellite::hintTexture->bind();
4225+ renderer->drawText(TextParams(xy[0], xy[1], name).shift(10, 10).useGravity());
4226 }
4227- painter.drawSprite2dMode(xy[0], xy[1], 11);
4228+ renderer->drawTexturedRect(xy[0] - 11, xy[1] - 11, 22, 22);
4229
4230- if (orbitVisible && Satellite::orbitLinesFlag) drawOrbit(painter);
4231+ if (orbitVisible && Satellite::orbitLinesFlag) {drawOrbit(renderer, projector);}
4232 }
4233 }
4234
4235
4236-void Satellite::drawOrbit(StelPainter& painter)
4237+void Satellite::drawOrbit(StelRenderer* renderer, StelProjectorP projector)
4238 {
4239 Vec3d position,previousPosition;
4240
4241- glDisable(GL_TEXTURE_2D);
4242-
4243 QList<Vec3d>::iterator it= orbitPoints.begin();
4244
4245 //First point projection calculation
4246 previousPosition.set(it->operator [](0), it->operator [](1), it->operator [](2));
4247
4248 it++;
4249- StelVertexArray vertexArray;
4250- vertexArray.primitiveType=StelVertexArray::Lines;
4251
4252+ QVector<Vec3d> orbitArcPoints;
4253+ StelCircleArcRenderer circleArcRenderer(renderer, projector);
4254 //Rest of points
4255 for (int i=1; i<orbitPoints.size(); i++)
4256 {
4257@@ -528,21 +526,21 @@
4258 // Draw end (fading) parts of orbit lines one segment at a time.
4259 if (i<=orbitLineFadeSegments || orbitLineSegments-i < orbitLineFadeSegments)
4260 {
4261- painter.setColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], hintBrightness * calculateOrbitSegmentIntensity(i));
4262- painter.drawGreatCircleArc(previousPosition, position, &viewportHalfspace);
4263+ renderer->setGlobalColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2],
4264+ hintBrightness * calculateOrbitSegmentIntensity(i));
4265+ circleArcRenderer.drawGreatCircleArc(previousPosition, position, &viewportHalfspace);
4266 }
4267 else
4268 {
4269- vertexArray.vertex << previousPosition << position;
4270+ orbitArcPoints << previousPosition << position;
4271 }
4272 previousPosition = position;
4273 }
4274
4275 // Draw center section of orbit in one go
4276- painter.setColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2], hintBrightness);
4277- painter.drawGreatCircleArcs(vertexArray, &viewportHalfspace);
4278-
4279- glEnable(GL_TEXTURE_2D);
4280+ renderer->setGlobalColor((*orbitColor)[0], (*orbitColor)[1], (*orbitColor)[2],
4281+ hintBrightness);
4282+ circleArcRenderer.drawGreatCircleArcs(orbitArcPoints, PrimitiveType_Lines, &viewportHalfspace);
4283 }
4284
4285
4286
4287=== modified file 'plugins/Satellites/src/Satellite.hpp'
4288--- plugins/Satellites/src/Satellite.hpp 2012-08-25 10:58:23 +0000
4289+++ plugins/Satellites/src/Satellite.hpp 2012-08-30 16:29:19 +0000
4290@@ -28,14 +28,12 @@
4291 #include <QDateTime>
4292
4293 #include "StelObject.hpp"
4294-#include "StelTextureTypes.hpp"
4295 #include "StelSphereGeometry.hpp"
4296+#include "StelProjectorType.hpp"
4297
4298-#include "StelPainter.hpp"
4299 #include "gSatWrapper.hpp"
4300
4301
4302-class StelPainter;
4303 class StelLocation;
4304
4305 typedef struct
4306@@ -120,7 +118,7 @@
4307 private:
4308 //draw orbits methods
4309 void computeOrbitPoints();
4310- void drawOrbit(StelPainter& painter);
4311+ void drawOrbit(class StelRenderer* renderer, StelProjectorP projector);
4312 //! returns 0 - 1.0 for the DRAWORBIT_FADE_NUMBER segments at
4313 //! each end of an orbit, with 1 in the middle.
4314 float calculateOrbitSegmentIntensity(int segNum);
4315@@ -155,7 +153,6 @@
4316 QStringList groupIDs;
4317 QDateTime lastUpdated;
4318
4319- static StelTextureSP hintTexture;
4320 static SphericalCap viewportHalfspace;
4321 static float hintBrightness;
4322 static float hintScale;
4323@@ -164,15 +161,16 @@
4324 static int orbitLineSegmentDuration; //measured in seconds
4325 static bool orbitLinesFlag;
4326
4327- void draw(const StelCore* core, StelPainter& painter, float maxMagHints);
4328+ void draw(const StelCore* core, class StelRenderer* renderer,
4329+ StelProjectorP projector, class StelTextureNew* hintTexture);
4330
4331- //Satellite Orbit Position calculation
4332- gSatWrapper *pSatWrapper;
4333- Vec3d position;
4334- Vec3d velocity;
4335- Vec3d latLongSubPointPosition;
4336- Vec3d elAzPosition;
4337- int visibility;
4338+ //Satellite Orbit Position calculation
4339+ gSatWrapper *pSatWrapper;
4340+ Vec3d position;
4341+ Vec3d velocity;
4342+ Vec3d latLongSubPointPosition;
4343+ Vec3d elAzPosition;
4344+ int visibility;
4345
4346 //Satellite Orbit Draw
4347 QFont font;
4348
4349=== modified file 'plugins/Satellites/src/Satellites.cpp'
4350--- plugins/Satellites/src/Satellites.cpp 2012-08-25 09:46:49 +0000
4351+++ plugins/Satellites/src/Satellites.cpp 2012-08-30 16:29:19 +0000
4352@@ -17,7 +17,6 @@
4353 */
4354
4355 #include "StelProjector.hpp"
4356-#include "StelPainter.hpp"
4357 #include "StelApp.hpp"
4358 #include "StelCore.hpp"
4359 #include "StelGui.hpp"
4360@@ -27,7 +26,6 @@
4361 #include "StelModuleMgr.hpp"
4362 #include "StelLocaleMgr.hpp"
4363 #include "StelFileMgr.hpp"
4364-#include "StelTextureMgr.hpp"
4365 #include "StelIniParser.hpp"
4366 #include "Satellites.hpp"
4367 #include "Satellite.hpp"
4368@@ -37,6 +35,7 @@
4369 #include "SatellitesDialog.hpp"
4370 #include "LabelMgr.hpp"
4371 #include "StelTranslator.hpp"
4372+#include "renderer/StelRenderer.hpp"
4373
4374 #include <QNetworkAccessManager>
4375 #include <QNetworkReply>
4376@@ -72,9 +71,16 @@
4377 Q_EXPORT_PLUGIN2(Satellites, SatellitesStelPluginInterface)
4378
4379 Satellites::Satellites()
4380- : pxmapGlow(NULL), pxmapOnIcon(NULL), pxmapOffIcon(NULL), toolbarButton(NULL),
4381- earth(NULL), defaultHintColor(0.0, 0.4, 0.6), defaultOrbitColor(0.0, 0.3, 0.6),
4382- progressBar(NULL)
4383+ : hintTexture(NULL)
4384+ , texPointer(NULL)
4385+ , pxmapGlow(NULL)
4386+ , pxmapOnIcon(NULL)
4387+ , pxmapOffIcon(NULL)
4388+ , toolbarButton(NULL)
4389+ , earth(NULL)
4390+ , defaultHintColor(0.0, 0.4, 0.6)
4391+ , defaultOrbitColor(0.0, 0.3, 0.6)
4392+ , progressBar(NULL)
4393 {
4394 setObjectName("Satellites");
4395 configDialog = new SatellitesDialog();
4396@@ -82,8 +88,14 @@
4397
4398 void Satellites::deinit()
4399 {
4400- Satellite::hintTexture.clear();
4401- texPointer.clear();
4402+ if(NULL != hintTexture)
4403+ {
4404+ delete hintTexture;
4405+ }
4406+ if(NULL != texPointer)
4407+ {
4408+ delete texPointer;
4409+ }
4410 }
4411
4412 Satellites::~Satellites()
4413@@ -120,8 +132,6 @@
4414 satellitesJsonPath = StelFileMgr::findFile("modules/Satellites", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/satellites.json";
4415
4416 // Load and find resources used in the plugin
4417- texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur5.png");
4418- Satellite::hintTexture = StelApp::getInstance().getTextureManager().createTexture(":/satellites/hint.png");
4419
4420 // key bindings and other actions
4421 // TRANSLATORS: Title of a group of key bindings in the Help window
4422@@ -1160,7 +1170,7 @@
4423 }
4424 }
4425
4426-void Satellites::draw(StelCore* core)
4427+void Satellites::draw(StelCore* core, StelRenderer* renderer)
4428 {
4429 if (core->getCurrentLocation().planetName != earth->getEnglishName() ||
4430 (core->getJDay()<2436116.3115) || // do not draw anything before Oct 4, 1957, 19:28:34GMT ;-)
4431@@ -1168,26 +1178,32 @@
4432 return;
4433
4434 StelProjectorP prj = core->getProjection(StelCore::FrameAltAz);
4435- StelPainter painter(prj);
4436- painter.setFont(labelFont);
4437+ renderer->setFont(labelFont);
4438 Satellite::hintBrightness = hintFader.getInterstate();
4439
4440- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
4441- glEnable(GL_BLEND);
4442- glEnable(GL_TEXTURE_2D);
4443- Satellite::hintTexture->bind();
4444- Satellite::viewportHalfspace = painter.getProjector()->getBoundingCap();
4445+ renderer->setBlendMode(BlendMode_Alpha);
4446+
4447+ if(NULL == hintTexture)
4448+ {
4449+ hintTexture = renderer->createTexture(":/satellites/hint.png");
4450+ }
4451+ hintTexture->bind();
4452+ Satellite::viewportHalfspace = prj->getBoundingCap();
4453 foreach (const SatelliteP& sat, satellites)
4454 {
4455 if (sat && sat->initialized && sat->visible)
4456- sat->draw(core, painter, 1.0);
4457+ {
4458+ sat->draw(core, renderer, prj, hintTexture);
4459+ }
4460 }
4461
4462 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
4463- drawPointer(core, painter);
4464+ {
4465+ drawPointer(core, renderer);
4466+ }
4467 }
4468
4469-void Satellites::drawPointer(StelCore* core, StelPainter& painter)
4470+void Satellites::drawPointer(StelCore* core, StelRenderer* renderer)
4471 {
4472 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4473
4474@@ -1200,25 +1216,33 @@
4475
4476 // Compute 2D pos and return if outside screen
4477 if (!prj->project(pos, screenpos))
4478+ {
4479 return;
4480+ }
4481+ if(NULL == texPointer)
4482+ {
4483+ texPointer = renderer->createTexture("textures/pointeur5.png");
4484+ }
4485 if (StelApp::getInstance().getVisionModeNight())
4486- glColor3f(0.8f,0.0f,0.0f);
4487+ renderer->setGlobalColor(0.8f,0.0f,0.0f);
4488 else
4489- glColor3f(0.4f,0.5f,0.8f);
4490+ renderer->setGlobalColor(0.4f,0.5f,0.8f);
4491 texPointer->bind();
4492
4493- glEnable(GL_TEXTURE_2D);
4494- glEnable(GL_BLEND);
4495- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
4496+ renderer->setBlendMode(BlendMode_Alpha);
4497
4498 // Size on screen
4499 float size = obj->getAngularSize(core)*M_PI/180.*prj->getPixelPerRadAtCenter();
4500 size += 12.f + 3.f*std::sin(2.f * StelApp::getInstance().getTotalRunTime());
4501- // size+=20.f + 10.f*std::sin(2.f * StelApp::getInstance().getTotalRunTime());
4502- painter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]-size/2, 20, 90);
4503- painter.drawSprite2dMode(screenpos[0]-size/2, screenpos[1]+size/2, 20, 0);
4504- painter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]+size/2, 20, -90);
4505- painter.drawSprite2dMode(screenpos[0]+size/2, screenpos[1]-size/2, 20, -180);
4506+ const float halfSize = size * 0.5;
4507+ const float left = screenpos[0] - halfSize - 20;
4508+ const float right = screenpos[0] + halfSize - 20;
4509+ const float top = screenpos[1] - halfSize - 20;
4510+ const float bottom = screenpos[1] + halfSize - 20;
4511+ renderer->drawTexturedRect(left, top, 40, 40, 90);
4512+ renderer->drawTexturedRect(left, bottom, 40, 40, 0);
4513+ renderer->drawTexturedRect(right, bottom, 40, 40, -90);
4514+ renderer->drawTexturedRect(right, top, 40, 40, -180);
4515 }
4516 }
4517
4518
4519=== modified file 'plugins/Satellites/src/Satellites.hpp'
4520--- plugins/Satellites/src/Satellites.hpp 2012-07-29 19:00:03 +0000
4521+++ plugins/Satellites/src/Satellites.hpp 2012-08-30 16:29:19 +0000
4522@@ -93,8 +93,8 @@
4523 virtual void init();
4524 virtual void deinit();
4525 virtual void update(double deltaTime);
4526- virtual void draw(StelCore* core);
4527- virtual void drawPointer(StelCore* core, StelPainter& painter);
4528+ virtual void draw(StelCore* core, class StelRenderer* renderer);
4529+ virtual void drawPointer(StelCore* core, class StelRenderer* renderer);
4530 virtual double getCallOrder(StelModuleActionName actionName) const;
4531
4532 ///////////////////////////////////////////////////////////////////////////
4533@@ -298,7 +298,8 @@
4534 QString satellitesJsonPath;
4535 QList<SatelliteP> satellites;
4536 LinearFader hintFader;
4537- StelTextureSP texPointer;
4538+ class StelTextureNew* hintTexture;
4539+ class StelTextureNew* texPointer;
4540 QPixmap* pxmapGlow;
4541 QPixmap* pxmapOnIcon;
4542 QPixmap* pxmapOffIcon;
4543
4544=== modified file 'plugins/SolarSystemEditor/src/SolarSystemEditor.cpp'
4545--- plugins/SolarSystemEditor/src/SolarSystemEditor.cpp 2012-01-11 10:50:37 +0000
4546+++ plugins/SolarSystemEditor/src/SolarSystemEditor.cpp 2012-08-30 16:29:19 +0000
4547@@ -127,7 +127,7 @@
4548 //
4549 }
4550
4551-void SolarSystemEditor::draw(StelCore*) //core
4552+void SolarSystemEditor::draw(StelCore*, class StelRenderer*) //core
4553 {
4554 //
4555 }
4556
4557=== modified file 'plugins/SolarSystemEditor/src/SolarSystemEditor.hpp'
4558--- plugins/SolarSystemEditor/src/SolarSystemEditor.hpp 2012-01-11 10:50:37 +0000
4559+++ plugins/SolarSystemEditor/src/SolarSystemEditor.hpp 2012-08-30 16:29:19 +0000
4560@@ -77,7 +77,7 @@
4561 //! Dialog windows don't need explicit drawing, it's done automatically.
4562 //! If a plug-in draws on the screen, it should be able to respect
4563 //! the night vision mode.
4564- virtual void draw(StelCore * core);
4565+ virtual void draw(StelCore * core, class StelRenderer* renderer);
4566 virtual double getCallOrder(StelModuleActionName actionName) const;
4567 //! called when the "configure" button in the "Plugins" tab is pressed
4568 virtual bool configureGui(bool show);
4569
4570=== modified file 'plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp'
4571--- plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp 2012-02-13 18:59:16 +0000
4572+++ plugins/SolarSystemEditor/src/gui/ManualImportWindow.cpp 2012-08-30 16:29:19 +0000
4573@@ -31,6 +31,7 @@
4574 #include "StelApp.hpp"
4575 #include "StelFileMgr.hpp"
4576 #include "StelModuleMgr.hpp"
4577+#include "StelUtils.hpp"
4578 //#include "StelTranslator.hpp"
4579
4580
4581@@ -235,13 +236,13 @@
4582 return false;
4583 }
4584
4585- if (!verifyPowerOfTwo(texture.height()))
4586+ if (!StelUtils::isPowerOfTwo(texture.height()))
4587 {
4588 qDebug() << "Invalid texure height:" << texture.height()
4589 << "for file" << filePath;
4590 return false;
4591 }
4592- if (!verifyPowerOfTwo(texture.width()))
4593+ if (!StelUtils::isPowerOfTwo(texture.width()))
4594 {
4595 qDebug() << "Invalid texture width:" << texture.width()
4596 << "for file" << filePath;
4597@@ -250,11 +251,3 @@
4598
4599 return true;
4600 }
4601-
4602-bool ManualImportWindow::verifyPowerOfTwo(int value)
4603-{
4604- if (value > 0 && (value & (value-1)) == 0)
4605- return true;
4606- else
4607- return false;
4608-}
4609
4610=== modified file 'plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp'
4611--- plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp 2012-02-13 18:59:16 +0000
4612+++ plugins/SolarSystemEditor/src/gui/ManualImportWindow.hpp 2012-08-30 16:29:19 +0000
4613@@ -68,10 +68,9 @@
4614 void setColorButtonColor(QColor newColor);
4615
4616 void selectTextureFile(QLineEdit * filePathLineEdit);
4617- //! Check if a file is a valid graphics file with OpenGL texture dimensions.
4618- //! OpenGL accepts only dimentions that are powers of 2 (512, 1024, etc.)
4619+ //! Check if a file is a valid graphics file with power-of-two texture dimensions.
4620+ //! StelRenderer only guarantees support for dimentions that are powers of 2 (512, 1024, etc.)
4621 bool verifyTextureFile(QString filePath);
4622- bool verifyPowerOfTwo(int value);
4623
4624 protected:
4625 virtual void createDialogContent();
4626
4627=== modified file 'plugins/Supernovae/src/Supernova.cpp'
4628--- plugins/Supernovae/src/Supernova.cpp 2012-08-08 10:11:01 +0000
4629+++ plugins/Supernovae/src/Supernova.cpp 2012-08-30 16:29:19 +0000
4630@@ -18,19 +18,17 @@
4631
4632 #include "Supernova.hpp"
4633 #include "StelObject.hpp"
4634-#include "StelPainter.hpp"
4635 #include "StelApp.hpp"
4636 #include "StelCore.hpp"
4637-#include "StelTexture.hpp"
4638 #include "StelUtils.hpp"
4639 #include "StelTranslator.hpp"
4640 #include "StelModuleMgr.hpp"
4641 #include "StelSkyDrawer.hpp"
4642+#include "StelRenderer.hpp"
4643
4644 #include <QTextStream>
4645 #include <QDebug>
4646 #include <QVariant>
4647-#include <QtOpenGL>
4648 #include <QVariantMap>
4649 #include <QVariant>
4650 #include <QList>
4651@@ -202,7 +200,7 @@
4652 labelsFader.update((int)(deltaTime*1000));
4653 }
4654
4655-void Supernova::draw(StelCore* core, StelPainter& painter)
4656+void Supernova::draw(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
4657 {
4658 StelSkyDrawer* sd = core->getSkyDrawer();
4659
4660@@ -215,21 +213,20 @@
4661
4662 StelUtils::spheToRect(snra, snde, XYZ);
4663 mag = getVMagnitude(core, true);
4664- sd->preDrawPointSource(&painter);
4665+ sd->preDrawPointSource();
4666
4667 if (mag <= sd->getLimitMagnitude())
4668 {
4669 sd->computeRCMag(mag, rcMag);
4670-// sd->drawPointSource(&painter, Vec3f(XYZ[0], XYZ[1], XYZ[2]), rcMag, color, false);
4671- sd->drawPointSource(&painter, XYZ, rcMag, color, false);
4672- painter.setColor(color[0], color[1], color[2], 1);
4673- size = getAngularSize(NULL)*M_PI/180.*painter.getProjector()->getPixelPerRadAtCenter();
4674+ sd->drawPointSource(projector, XYZ, rcMag, color, false);
4675+ renderer->setGlobalColor(color[0], color[1], color[2], 1);
4676+ size = getAngularSize(NULL)*M_PI/180.*projector->getPixelPerRadAtCenter();
4677 shift = 6.f + size/1.8f;
4678 if (labelsFader.getInterstate()<=0.f)
4679 {
4680- painter.drawText(XYZ, designation, 0, shift, shift, false);
4681+ renderer->drawText(TextParams(XYZ, projector, designation).shift(shift, shift).useGravity());
4682 }
4683 }
4684
4685- sd->postDrawPointSource(&painter);
4686+ sd->postDrawPointSource(projector);
4687 }
4688
4689=== modified file 'plugins/Supernovae/src/Supernova.hpp'
4690--- plugins/Supernovae/src/Supernova.hpp 2012-01-11 10:50:37 +0000
4691+++ plugins/Supernovae/src/Supernova.hpp 2012-08-30 16:29:19 +0000
4692@@ -27,11 +27,9 @@
4693 #include <QDateTime>
4694
4695 #include "StelObject.hpp"
4696-#include "StelTextureTypes.hpp"
4697-#include "StelPainter.hpp"
4698 #include "StelFader.hpp"
4699+#include "StelProjectorType.hpp"
4700
4701-class StelPainter;
4702
4703 //! @class Supernova
4704 //! A Supernova object represents one supernova on the sky.
4705@@ -83,9 +81,7 @@
4706
4707 Vec3d XYZ; // holds J2000 position
4708
4709- static StelTextureSP hintTexture;
4710-
4711- void draw(StelCore* core, StelPainter& painter);
4712+ void draw(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
4713
4714 // Supernova
4715 QString designation; //! The ID of the supernova
4716
4717=== modified file 'plugins/Supernovae/src/Supernovae.cpp'
4718--- plugins/Supernovae/src/Supernovae.cpp 2012-07-29 09:54:59 +0000
4719+++ plugins/Supernovae/src/Supernovae.cpp 2012-08-30 16:29:19 +0000
4720@@ -17,7 +17,6 @@
4721 */
4722
4723 #include "StelProjector.hpp"
4724-#include "StelPainter.hpp"
4725 #include "StelApp.hpp"
4726 #include "StelCore.hpp"
4727 #include "StelGui.hpp"
4728@@ -25,7 +24,6 @@
4729 #include "StelLocaleMgr.hpp"
4730 #include "StelModuleMgr.hpp"
4731 #include "StelObjectMgr.hpp"
4732-#include "StelTextureMgr.hpp"
4733 #include "StelJsonParser.hpp"
4734 #include "StelFileMgr.hpp"
4735 #include "StelUtils.hpp"
4736@@ -33,6 +31,8 @@
4737 #include "LabelMgr.hpp"
4738 #include "Supernova.hpp"
4739 #include "Supernovae.hpp"
4740+#include "renderer/StelRenderer.hpp"
4741+#include "renderer/StelTextureNew.hpp"
4742 #include "SupernovaeDialog.hpp"
4743
4744 #include <QNetworkAccessManager>
4745@@ -41,14 +41,15 @@
4746 #include <QAction>
4747 #include <QProgressBar>
4748 #include <QDebug>
4749+#include <QFile>
4750 #include <QFileInfo>
4751-#include <QFile>
4752 #include <QTimer>
4753-#include <QVariantMap>
4754-#include <QVariant>
4755 #include <QList>
4756+#include <QSettings>
4757 #include <QSharedPointer>
4758 #include <QStringList>
4759+#include <QVariant>
4760+#include <QVariantMap>
4761
4762 #define CATALOG_FORMAT_VERSION 1 /* Version of format of catalog */
4763
4764@@ -81,7 +82,8 @@
4765 Constructor
4766 */
4767 Supernovae::Supernovae()
4768- : progressBar(NULL)
4769+ : texPointer(NULL)
4770+ , progressBar(NULL)
4771 {
4772 setObjectName("Supernovae");
4773 configDialog = new SupernovaeDialog();
4774@@ -99,7 +101,10 @@
4775
4776 void Supernovae::deinit()
4777 {
4778- texPointer.clear();
4779+ if(NULL != texPointer)
4780+ {
4781+ delete texPointer;
4782+ }
4783 }
4784
4785 /*
4786@@ -133,9 +138,6 @@
4787 readSettingsFromConfig();
4788
4789 sneJsonPath = StelFileMgr::findFile("modules/Supernovae", (StelFileMgr::Flags)(StelFileMgr::Directory|StelFileMgr::Writable)) + "/supernovae.json";
4790-
4791- texPointer = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
4792-
4793 // key bindings and other actions
4794 // TRANSLATORS: Title of a group of key bindings in the Help window
4795 QString groupName = N_("Plugin Key Bindings");
4796@@ -192,27 +194,27 @@
4797 /*
4798 Draw our module. This should print name of first SNe in the main window
4799 */
4800-void Supernovae::draw(StelCore* core)
4801+void Supernovae::draw(StelCore* core, StelRenderer* renderer)
4802 {
4803 StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4804- StelPainter painter(prj);
4805- painter.setFont(font);
4806+ renderer->setFont(font);
4807
4808 foreach (const SupernovaP& sn, snstar)
4809 {
4810 if (sn && sn->initialized)
4811- sn->draw(core, painter);
4812+ {
4813+ sn->draw(core, renderer, prj);
4814+ }
4815 }
4816
4817 if (GETSTELMODULE(StelObjectMgr)->getFlagSelectedObjectPointer())
4818- drawPointer(core, painter);
4819-
4820+ {
4821+ drawPointer(core, renderer, prj);
4822+ }
4823 }
4824
4825-void Supernovae::drawPointer(StelCore* core, StelPainter& painter)
4826+void Supernovae::drawPointer(StelCore* core, StelRenderer* renderer, StelProjectorP projector)
4827 {
4828- const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4829-
4830 const QList<StelObjectP> newSelected = GETSTELMODULE(StelObjectMgr)->getSelectedObject("Supernova");
4831 if (!newSelected.empty())
4832 {
4833@@ -221,16 +223,21 @@
4834
4835 Vec3d screenpos;
4836 // Compute 2D pos and return if outside screen
4837- if (!painter.getProjector()->project(pos, screenpos))
4838+ if (!projector->project(pos, screenpos))
4839+ {
4840 return;
4841+ }
4842
4843 const Vec3f& c(obj->getInfoColor());
4844- painter.setColor(c[0],c[1],c[2]);
4845+ renderer->setGlobalColor(c[0],c[1],c[2]);
4846+ if(NULL == texPointer)
4847+ {
4848+ texPointer = renderer->createTexture("textures/pointeur2.png");
4849+ }
4850 texPointer->bind();
4851- painter.enableTexture2d(true);
4852- glEnable(GL_BLEND);
4853- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
4854- painter.drawSprite2dMode(screenpos[0], screenpos[1], 13.f, StelApp::getInstance().getTotalRunTime()*40.);
4855+ renderer->setBlendMode(BlendMode_Alpha);
4856+ renderer->drawTexturedRect(screenpos[0] - 13.0f, screenpos[1] - 13.0f, 26.0f, 26.0f,
4857+ StelApp::getInstance().getTotalRunTime() * 40.0f);
4858 }
4859 }
4860
4861
4862=== modified file 'plugins/Supernovae/src/Supernovae.hpp'
4863--- plugins/Supernovae/src/Supernovae.hpp 2012-07-29 09:54:59 +0000
4864+++ plugins/Supernovae/src/Supernovae.hpp 2012-08-30 16:29:19 +0000
4865@@ -22,8 +22,6 @@
4866 #include "StelObjectModule.hpp"
4867 #include "StelObject.hpp"
4868 #include "StelFader.hpp"
4869-#include "StelTextureTypes.hpp"
4870-#include "StelPainter.hpp"
4871 #include "Supernova.hpp"
4872 #include <QFont>
4873 #include <QVariantMap>
4874@@ -39,8 +37,6 @@
4875 class QTimer;
4876 class SupernovaeDialog;
4877
4878-class StelPainter;
4879-
4880 typedef QSharedPointer<Supernova> SupernovaP;
4881
4882 //! This is an example of a plug-in which can be dynamically loaded into stellarium
4883@@ -66,8 +62,8 @@
4884 virtual void init();
4885 virtual void deinit();
4886 virtual void update(double) {;}
4887- virtual void draw(StelCore* core);
4888- virtual void drawPointer(StelCore* core, StelPainter& painter);
4889+ virtual void draw(StelCore* core, class StelRenderer* renderer);
4890+ virtual void drawPointer(StelCore* core, class StelRenderer* renderer, StelProjectorP projector);
4891 virtual double getCallOrder(StelModuleActionName actionName) const;
4892
4893 ///////////////////////////////////////////////////////////////////////////
4894@@ -181,7 +177,7 @@
4895
4896 QString sneJsonPath;
4897
4898- StelTextureSP texPointer;
4899+ class StelTextureNew* texPointer;
4900 QList<SupernovaP> snstar;
4901 QHash<QString, double> snlist;
4902
4903
4904=== modified file 'plugins/TelescopeControl/src/TelescopeControl.cpp'
4905--- plugins/TelescopeControl/src/TelescopeControl.cpp 2012-01-11 10:50:37 +0000
4906+++ plugins/TelescopeControl/src/TelescopeControl.cpp 2012-08-30 16:29:19 +0000
4907@@ -42,10 +42,11 @@
4908 #include "StelMovementMgr.hpp"
4909 #include "StelObject.hpp"
4910 #include "StelObjectMgr.hpp"
4911-#include "StelPainter.hpp"
4912 #include "StelProjector.hpp"
4913 #include "StelStyle.hpp"
4914-#include "StelTextureMgr.hpp"
4915+#include "renderer/StelGeometryBuilder.hpp"
4916+#include "renderer/StelRenderer.hpp"
4917+#include "renderer/StelTextureNew.hpp"
4918
4919 #include <QAction>
4920 #include <QDateTime>
4921@@ -85,6 +86,13 @@
4922 ////////////////////////////////////////////////////////////////////////////////
4923 // Constructor and destructor
4924 TelescopeControl::TelescopeControl()
4925+ : pixmapHover(NULL)
4926+ , pixmapOnIcon(NULL)
4927+ , pixmapOffIcon(NULL)
4928+ , reticleTexture(NULL)
4929+ , selectionTexture(NULL)
4930+ , telescopeDialog(NULL)
4931+ , slewDialog(NULL)
4932 {
4933 setObjectName("TelescopeControl");
4934
4935@@ -138,10 +146,6 @@
4936 //Load and start all telescope clients
4937 loadTelescopes();
4938
4939- //Load OpenGL textures
4940- reticleTexture = StelApp::getInstance().getTextureManager().createTexture(":/telescopeControl/telescope_reticle.png");
4941- selectionTexture = StelApp::getInstance().getTextureManager().createTexture("textures/pointeur2.png");
4942-
4943 StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
4944
4945 //Create telescope key bindings
4946@@ -165,7 +169,7 @@
4947 connect(gui->getGuiActions(name), SIGNAL(triggered()), this, SLOT(slewTelescopeToViewDirection()));
4948 }
4949
4950- //Create and initialize dialog windows
4951+ //Create and initialize dialog windows
4952 telescopeDialog = new TelescopeDialog();
4953 slewDialog = new SlewDialog();
4954
4955@@ -175,10 +179,10 @@
4956 connect(slewDialog, SIGNAL(visibleChanged(bool)), gui->getGuiActions("actionShow_Slew_Window"), SLOT(setChecked(bool)));
4957
4958 //Create toolbar button
4959- pixmapHover = new QPixmap(":/graphicGui/glow32x32.png");
4960- pixmapOnIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_on.png");
4961- pixmapOffIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_off.png");
4962- toolbarButton = new StelButton(NULL, *pixmapOnIcon, *pixmapOffIcon, *pixmapHover, gui->getGuiActions("actionShow_Slew_Window"));
4963+ pixmapHover = new QPixmap(":/graphicGui/glow32x32.png");
4964+ pixmapOnIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_on.png");
4965+ pixmapOffIcon = new QPixmap(":/telescopeControl/button_Slew_Dialog_off.png");
4966+ toolbarButton = new StelButton(NULL, *pixmapOnIcon, *pixmapOffIcon, *pixmapHover, gui->getGuiActions("actionShow_Slew_Window"));
4967 gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup");
4968 }
4969 catch (std::runtime_error &e)
4970@@ -216,6 +220,18 @@
4971 ++iterator;
4972 }
4973
4974+ if(NULL != reticleTexture) {delete reticleTexture;}
4975+ if(NULL != selectionTexture) {delete selectionTexture;}
4976+ if(NULL != telescopeDialog) {delete telescopeDialog;}
4977+ if(NULL != slewDialog) {delete slewDialog;}
4978+ if(NULL != pixmapHover) {delete pixmapHover;}
4979+ if(NULL != pixmapOnIcon) {delete pixmapOnIcon;}
4980+ if(NULL != pixmapOffIcon) {delete pixmapOffIcon;}
4981+ reticleTexture = selectionTexture = NULL;
4982+ telescopeDialog = NULL;
4983+ slewDialog = NULL;
4984+ pixmapHover = pixmapOnIcon = pixmapOffIcon;
4985+
4986 //TODO: Decide if it should be saved on change
4987 //Save the configuration on exit
4988 saveConfiguration();
4989@@ -230,15 +246,17 @@
4990 communicate();
4991 }
4992
4993-void TelescopeControl::draw(StelCore* core)
4994+void TelescopeControl::draw(StelCore* core, StelRenderer* renderer)
4995 {
4996 const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
4997- StelPainter sPainter(prj);
4998- sPainter.setFont(labelFont);
4999- glEnable(GL_TEXTURE_2D);
5000- glEnable(GL_BLEND);
The diff has been truncated for viewing.