CalcMySky
v0.3.1
|
#include <memory>
#include <functional>
#include <QObject>
#include <QVector4D>
#include <qopengl.h>
#include "Settings.hpp"
#include "Exception.hpp"
Go to the source code of this file.
Classes | |
class | ShowMySky::AtmosphereRenderer |
struct | ShowMySky::AtmosphereRenderer::SpectralRadiance |
Spectral radiance of a pixel. More... | |
struct | ShowMySky::AtmosphereRenderer::Direction |
View direction of a pixel. More... | |
struct | ShowMySky::AtmosphereRenderer::LoadingStatus |
Status of data loading process. More... | |
Macros | |
#define | ShowMySky_ABI_version 15 |
ABI version of the header. More... | |
#define | SHOWMYSKY_LIB_NAME (QT_VERSION_MAJOR==5 ? "ShowMySky-Qt5" : "ShowMySky-Qt6") |
Name of library to be dlopen()-ed. More... | |
Functions | |
SHOWMYSKY_DLL_PUBLIC ShowMySky::AtmosphereRenderer * | ShowMySky_AtmosphereRenderer_create (QOpenGLFunctions_3_3_Core *gl, QString const *pathToData, ShowMySky::Settings *tools, std::function< void(QOpenGLShaderProgram &)> const *drawSurface) |
Entry point for the creator of AtmosphereRenderer. More... | |
#define ShowMySky_ABI_version 15 |
This constant denotes the ABI version of the header used at compilation time. A symbol with the same name, of type uint32_t
, resides in the library, and is available via dlsym
, GetProcAddress
, QLibrary::resolve
or a similar API provided by Qt or your OS.
If the value of the symbol doesn't match the value of this constant, the library loaded is incompatible with the header against which the binary was compiled. Mixing incompatible header and library leads to undefined behavior.
#define SHOWMYSKY_LIB_NAME (QT_VERSION_MAJOR==5 ? "ShowMySky-Qt5" : "ShowMySky-Qt6") |
This is the name that should be passed to dlopen-like functions. Use this macro for portability instead of hard-coding a string.
SHOWMYSKY_DLL_PUBLIC ShowMySky::AtmosphereRenderer* ShowMySky_AtmosphereRenderer_create | ( | QOpenGLFunctions_3_3_Core * | gl, |
QString const * | pathToData, | ||
ShowMySky::Settings * | tools, | ||
std::function< void(QOpenGLShaderProgram &)> const * | drawSurface | ||
) |
This function creates an instance of AtmosphereRenderer in the heap and returns a pointer to it. All the parameters are forwarded to the constructor, AtmosphereRenderer::AtmosphereRenderer.
The purpose of this function is to make it possible to link dynamically to a dlopen
ed ShowMySky
library instead of linking to it via the import table of the application binary.