1 #ifndef __GL_CONFIG_H__ 2 #define __GL_CONFIG_H__ 3 4 #include "util/glheader.h" 5 #include "util/format/u_format.h" 6 7 /** 8 * Framebuffer configuration (aka visual / pixelformat) 9 * Note: some of these fields should be boolean, but it appears that 10 * code in drivers/dri/common/util.c requires int-sized fields. 11 */ 12 struct gl_config 13 { 14 /* if color_format is not PIPE_FORMAT_NONE, then all the properties of the 15 * gl_config must match the pipe_formats; if it is PIPE_FORMAT_NONE then 16 * the config properties are the only ones which can be trusted */ 17 enum pipe_format color_format; 18 enum pipe_format zs_format; 19 enum pipe_format accum_format; 20 21 GLboolean floatMode; 22 GLuint doubleBufferMode; 23 GLuint stereoMode; 24 25 GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 26 GLuint redMask, greenMask, blueMask, alphaMask; 27 GLint redShift, greenShift, blueShift, alphaShift; 28 GLint rgbBits; /* total bits for rgb */ 29 30 GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 31 GLint depthBits; 32 GLint stencilBits; 33 34 /* ARB_multisample / SGIS_multisample */ 35 GLuint samples; 36 37 /* EXT_framebuffer_sRGB */ 38 GLint sRGBCapable; 39 }; 40 41 42 #endif 43