MeVisLab Toolbox Reference
mlGLHiDPI.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2013, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_GL_HIDPI_H
14#define ML_GL_HIDPI_H
15
16
18
19#include "mlOpenGLSystem.h"
20#include "mlOpenGL.h"
21
24
26
28
31
33
36
38
41
43
46
48
51
54
57
60
62
64
67template <class T>
69 return static_cast<T>(static_cast<GLfloat>(x) * ML_OPENGL_NAMESPACE::getGLHiDPIScaleFactor());
70}
71
72#endif // __mlGLHiDPI_H
@ T
MLOPENGL_EXPORT GLfloat getGLHiDPIScaleFactor()
Returns the scale factor that is applied to size parameters of GL functions.
MLOPENGL_EXPORT GLfloat setGLHiDPIScaleFactor(GLfloat factor)
Sets the scale factor that is applied to size parameters of GL functions.
MLOPENGL_EXPORT void pushAndSetGLHiDPIScaleFactor(GLfloat factor)
Pushes the current scale factor onto the scale factor stack and sets the given scale factor.
MLOPENGL_EXPORT void popGLHiDPIScaleFactor()
Restores the previous scale factor from the scale factor stack.
MLOPENGL_EXPORT void glPointSizeScaled(GLfloat size)
Sets the diameter of rasterized points.
MLOPENGL_EXPORT void glLineStippleScaled(GLint factor, GLushort pattern)
Sets the line stipple pattern.
ML_OPENGL_START_NAMESPACE MLOPENGL_EXPORT void glLineWidthScaled(GLfloat width)
Sets the width of rasterized lines.
ML_OPENGL_END_NAMESPACE T GLHiDPIScale(T x)
Convenience template function to scale a value.
Definition mlGLHiDPI.h:68
#define ML_OPENGL_END_NAMESPACE
Closes the namespace for all ML stuff after the usage of ML_UTILS_START_NAMESPACE.
#define ML_OPENGL_START_NAMESPACE
Macro to put all following stuff into the namespace ML_NAMESPACE to avoid collisions with symbols of ...
#define MLOPENGL_EXPORT
Target mlrange_cast(Source arg)
Generic version of checked ML casts.