7 #ifndef __opengl_headers_h__ 8 #define __opengl_headers_h__ 10 #if FE_OS==FE_WIN32 || FE_OS==FE_WIN64 20 inline float compute_dpi(
void) {
return float(0); }
21 inline float determine_multiplication(Real a_dpi) {
return float(1); }
31 inline float compute_dpi(
void)
33 Display* pDisplayHandle=XOpenDisplay(NULL);
39 Screen* pScreen=DefaultScreenOfDisplay(pDisplayHandle);
42 XCloseDisplay(pDisplayHandle);
46 const int screenWidth=XWidthOfScreen(pScreen);
47 const int screenHeight=XHeightOfScreen(pScreen);
49 const int screenWidthMM=XWidthMMOfScreen(pScreen);
50 const int screenHeightMM=XHeightMMOfScreen(pScreen);
52 XCloseDisplay(pDisplayHandle);
54 const float screenWidthInches=screenWidthMM/float(25.4);
55 const float screenHeightInches=screenHeightMM/float(25.4);
57 const float dpiX=screenWidth/screenWidthInches;
58 const float dpiY=screenHeight/screenHeightInches;
66 return 0.5*(dpiX+dpiY);
68 inline float determine_multiplication(Real a_dpi)
71 return fe::maximum(1,
int(a_dpi/100));
79 #include <OpenGL/gl.h> 80 #include <OpenGL/glu.h> 85 inline float compute_dpi(
void) {
return float(0); }
86 inline float determine_multiplication(Real a_dpi) {
return float(1); }
90 #error "platform not recognized" kernel
Definition: namespace.dox:3