]> git.sesse.net Git - movit/blob - init.h
Only run the pkg-config line for Eigen3 once.
[movit] / init.h
1 #ifndef _INIT_H
2 #define _INIT_H
3
4 // Initialize the library; in particular, will query the GPU for information
5 // that is needed by various components. For instance, it verifies that
6 // we have all the OpenGL extensions we need.
7 void init_movit();
8
9 // GPU features. These are not intended for end-user use.
10
11 // Whether init_movit() has been called.
12 extern bool movit_initialized;
13
14 // An estimate on the smallest values the linear texture interpolation
15 // of the GPU can distinguish between, i.e., for a GPU with N-bit
16 // texture subpixel precision, this value will be 2^-N.
17 //
18 // From reading the little specs that exist and through practical tests,
19 // the broad picture seems to be that Intel cards have 6-bit precision,
20 // nVidia cards have 8-bit, and Radeon cards have 6-bit before R6xx
21 // (at least when not using trilinear sampling), but can reach
22 // 8-bit precision on R6xx or newer in some (unspecified) cases.
23 //
24 // We currently don't bother to test for more than 1024 levels.
25 extern float movit_texel_subpixel_precision;
26
27 // Whether the GPU in use supports GL_EXT_texture_sRGB.
28 extern bool movit_srgb_textures_supported;
29
30 #endif  // !defined(_INIT_H)