1#ifndef LIBOSMSCOUT_OPENGLPROJECTION_H
2#define LIBOSMSCOUT_OPENGLPROJECTION_H
53 auto SetGLf = [shaderProgram](
const std::string_view& uniformName, GLfloat f) {
54 glUniform1f(glGetUniformLocation(shaderProgram, uniformName.data()), f);
56 auto SetGLui = [shaderProgram](
const std::string_view& uniformName, GLuint i) {
57 glUniform1ui(glGetUniformLocation(shaderProgram, uniformName.data()), i);
60 SetGLf(
"centerLat",
center.GetLat());
61 SetGLf(
"centerLon",
center.GetLon());
66 SetGLf(
"scale",
scale);
67 SetGLf(
"angle",
angle);
70 SetGLf(
"windowHeight",
height);
71 SetGLf(
"windowWidth",
width);
#define OSMSCOUT_MAP_OPENGL_API
Definition MapOpenGLImportExport.h:45
MercatorProjection()=default
double scaledLatDeriv
center scaled by gradtorad * scale
Definition MercatorProjection.h:53
double scale
Definition MercatorProjection.h:50
bool useLinearInterpolation
switch to enable linear interpolation of latitude to pixel computation
Definition MercatorProjection.h:55
double angleNegCos
Definition MercatorProjection.h:48
double latOffset
Absolute and untransformed screen position of lat coordinate.
Definition MercatorProjection.h:44
double scaleGradtorad
Precalculated scale*Gradtorad.
Definition MercatorProjection.h:51
double angleNegSin
Definition MercatorProjection.h:47
bool valid
projection is valid
Definition MercatorProjection.h:42
OpenGLProjection(OpenGLProjection &&)=default
OpenGLProjection(const OpenGLProjection &)=default
OpenGLProjection & operator=(OpenGLProjection &&)=default
OpenGLProjection()=default
OpenGLProjection & operator=(const OpenGLProjection &)=default
~OpenGLProjection() override=default
void SetShaderUniforms(GLuint shaderProgram) const
Definition OpenGLProjection.h:47
GeoCoord center
Coordinate of the center of the displayed area.
Definition Projection.h:48
size_t width
Width of image.
Definition Projection.h:52
size_t height
Height of image.
Definition Projection.h:53
double angle
Display rotation angle in radians, canvas clockwise.
Definition Projection.h:49