MeVisLab Resolution Independence API
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 
25 ML_OPENGL_START_NAMESPACE
26 
28 
30 MLOPENGL_EXPORT void glLineWidthScaled( GLfloat width );
31 
33 
35 MLOPENGL_EXPORT void glPointSizeScaled( GLfloat size );
36 
38 
40 MLOPENGL_EXPORT void glLineStippleScaled( GLint factor, GLushort pattern );
41 
43 
46 
48 
50 MLOPENGL_EXPORT GLfloat setGLHiDPIScaleFactor( GLfloat factor );
51 
54 
57 
60 
62 
63 ML_OPENGL_END_NAMESPACE
64 
67 template <class T>
69  return static_cast<T>(static_cast<GLfloat>(x) * ML_OPENGL_NAMESPACE::getGLHiDPIScaleFactor());
70 }
71 
72 #endif // __mlGLHiDPI_H
@ T
Definition: SoKeyGrabber.h:71
void popGLHiDPIScaleFactor()
Restores the previous scale factor from the scale factor stack.
GLfloat getGLHiDPIScaleFactor()
Returns the scale factor that is applied to size parameters of GL functions.
void pushAndSetGLHiDPIScaleFactor(GLfloat factor)
Pushes the current scale factor onto the scale factor stack and sets the given scale factor.
GLfloat setGLHiDPIScaleFactor(GLfloat factor)
Sets the scale factor that is applied to size parameters of GL functions.
T GLHiDPIScale(T x)
Convenience template function to scale a value.
Definition: mlGLHiDPI.h:68
void glLineWidthScaled(GLfloat width)
Sets the width of rasterized lines.
void glLineStippleScaled(GLint factor, GLushort pattern)
Sets the line stipple pattern.
void glPointSizeScaled(GLfloat size)
Sets the diameter of rasterized points.
#define MLOPENGL_EXPORT
Macro to put all following stuff into the namespace ML_NAMESPACE to avoid collisions with symbols of ...