11 // Initialize the library; in particular, will query the GPU for information
12 // that is needed by various components. For instance, it verifies that
13 // we have all the OpenGL extensions we need.
15 // The first parameter gives which directory to read .frag files from.
16 // This is a temporary hack until we add something more solid.
18 // The second parameter specifies whether debugging is on or off.
19 // If it is on, Movit will write intermediate graphs and the final
20 // generated shaders to the current directory.
22 // If you call init_movit() twice with different parameters,
23 // only the first will count.
24 void init_movit(const std::string& data_directory, MovitDebugLevel debug_level);
26 // GPU features. These are not intended for end-user use.
28 // Whether init_movit() has been called.
29 extern bool movit_initialized;
31 // The current debug level.
32 extern MovitDebugLevel movit_debug_level;
34 // An estimate on the smallest values the linear texture interpolation
35 // of the GPU can distinguish between, i.e., for a GPU with N-bit
36 // texture subpixel precision, this value will be 2^-N.
38 // From reading the little specs that exist and through practical tests,
39 // the broad picture seems to be that Intel cards have 6-bit precision,
40 // nVidia cards have 8-bit, and Radeon cards have 6-bit before R6xx
41 // (at least when not using trilinear sampling), but can reach
42 // 8-bit precision on R6xx or newer in some (unspecified) cases.
44 // We currently don't bother to test for more than 1024 levels.
45 extern float movit_texel_subpixel_precision;
47 // Whether the GPU in use supports GL_EXT_texture_sRGB.
48 extern bool movit_srgb_textures_supported;
50 #endif // !defined(_MOVIT_INIT_H)